Use prod environment by default in the docker image

This commit is contained in:
saadi 2023-04-03 12:27:47 +02:00
parent 9fbe0fbad9
commit be1bcf8485
3 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ COPY tsconfig.prod.json ./tsconfig.prod.json
RUN yarn run build
FROM node:16-alpine3.15 as app
FROM node:18-alpine3.17 as app
USER node
WORKDIR /app
@ -24,4 +24,4 @@ COPY --from=build /app/env /app/dist/env
COPY --from=build /app/package.json /app/package.json
COPY --from=build /app/dist /app/dist
ENTRYPOINT node dist/src/server.js
ENTRYPOINT node dist/src/server.js -e production

View file

@ -17,6 +17,7 @@ services:
- DATABASE_CONNECTION_STRING=mongodb://mongo:27017
depends_on:
- mongo
entrypoint: node dist/src/server.js -e development
volumes:
mongo_volume:

3
env/production.env vendored
View file

@ -1,5 +1,4 @@
## Server ##
PORT=3000
PORT=8080
NODE_ENV=production
DATABASE_CONNECTION_STRING=mongodb://localhost:27017
DATABASE_NAME=my-finance-pal