added production enviroment check

This commit is contained in:
2023-01-13 20:15:52 -03:00
parent a62cee3ccd
commit 6d1d2cea96
2 changed files with 6 additions and 2 deletions

View File

@@ -12,4 +12,6 @@ WORKDIR "/usr/src"
RUN yarn RUN yarn
CMD ["yarn", "dev"] ARG NODE_ENV
CMD if [ "$NODE_ENV" = "development" ] ; then yarn dev ; else yarn start ; fi

View File

@@ -8,4 +8,6 @@ services:
- /usr/src/node_modules - /usr/src/node_modules
ports: ports:
- 3000:3000 - 3000:3000
- 27017:27017 - 27017:27017
enviroment:
NODE_ENV: ${NODE_ENV}