diff --git a/docker-compose.yml b/docker-compose.yml index 986d7b3..d6a22cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,15 @@ services: - "8002:8002" restart: unless-stopped + frontend: + build: ./frontend + image: lva_frontend:latest + ports: + - "3000:3000" + restart: unless-stopped + environment: + - NEXT_PUBLIC_BACKEND_URL=http://localhost:8003 + # ollama: # # This is a placeholder image; ensure you have an Ollama-compatible image and models available. # image: ollama/ollama:latest diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..0b8752b --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,14 @@ +Dockerfile +.dockerignore +node_modules +npm-debug.log +README.md +.env +.env.local +.env.production.local +.env.development.local +.git +.gitignore +.next +.vercel +*.md \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..d132d37 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,8 @@ +FROM node:18 + +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +EXPOSE 3000 +CMD npm run dev \ No newline at end of file diff --git a/frontend/next.config.js b/frontend/next.config.js index 2160bf3..1e01949 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -1,8 +1,9 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + output: 'standalone', env: { - NEXT_PUBLIC_BACKEND_URL: process.env.NEXT_PUBLIC_BACKEND_URL, + NEXT_PUBLIC_BACKEND_URL: process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8003', }, }