diff --git a/app.dockerfile b/app.dockerfile index 105cf86..9452f94 100644 --- a/app.dockerfile +++ b/app.dockerfile @@ -1,4 +1,4 @@ -FROM node:alpine +FROM node:alpine as builder ARG NEXT_PUBLIC_WS_URL ARG NEXT_PUBLIC_API_URL @@ -12,4 +12,6 @@ COPY ui /home/perplexica/ RUN yarn install RUN yarn build -CMD ["yarn", "start"] \ No newline at end of file +FROM nginx:stable-alpine-slim + +COPY --from=builder /home/perplexica/out /usr/share/nginx/html \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 5eef31e..61c7138 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -31,7 +31,7 @@ services: depends_on: - perplexica-backend ports: - - 3000:3000 + - 3000:80 networks: - perplexica-network diff --git a/ui/next.config.mjs b/ui/next.config.mjs index c3f2e1a..b099816 100644 --- a/ui/next.config.mjs +++ b/ui/next.config.mjs @@ -1,5 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + output: 'export', images: { remotePatterns: [ {