Fix build by removing DB_URI build argument and using dummy connection
This commit is contained in:
parent
40ed4d773e
commit
750ef0398f
@ -25,8 +25,6 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: webapp/Dockerfile
|
dockerfile: webapp/Dockerfile
|
||||||
args:
|
|
||||||
- DB_URI=${DB_URI}
|
|
||||||
container_name: infinity-webapp
|
container_name: infinity-webapp
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@ -11,10 +11,13 @@ RUN npm ci
|
|||||||
COPY webapp/ .
|
COPY webapp/ .
|
||||||
|
|
||||||
# Set environment variables for build
|
# Set environment variables for build
|
||||||
ARG DB_URI
|
# Use a dummy DB_URI during build to prevent connection attempts
|
||||||
ENV DB_URI=${DB_URI:-"mongodb://dummy:password@localhost:27017/dummy"}
|
ENV DB_URI="mongodb://dummy:password@localhost:27017/dummy"
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
# Disable Next.js telemetry during build
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user