diff --git a/docker-compose.yml b/docker-compose.yml index 2ee0875..ae929ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,8 +25,6 @@ services: build: context: . dockerfile: webapp/Dockerfile - args: - - DB_URI=${DB_URI} container_name: infinity-webapp restart: always depends_on: diff --git a/webapp/Dockerfile b/webapp/Dockerfile index 127b894..2098f92 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -11,10 +11,13 @@ RUN npm ci COPY webapp/ . # Set environment variables for build -ARG DB_URI -ENV DB_URI=${DB_URI:-"mongodb://dummy:password@localhost:27017/dummy"} +# Use a dummy DB_URI during build to prevent connection attempts +ENV DB_URI="mongodb://dummy:password@localhost:27017/dummy" ENV NODE_ENV=production +# Disable Next.js telemetry during build +ENV NEXT_TELEMETRY_DISABLED=1 + # Build the application RUN npm run build