I have Nextjs app and several commands to launch server, first of all I use:
- yarn install - install all dependencies and create node_modules directory
- yarn postgraphile- listen on 5000 port and try to connect to db port 5432
- yarn dev - create server on 3000 port and try to connect to 5000 postgraphile port
Also have the following Dockerfile
FROM node:alpine
WORKDIR /app
COPY . .
RUN yarn install
CMD ["/bin/bash", "-c", "yarn dev"]
For my goal, should I create another Dockerfile with the same instructions but set CMD to ["/bin/bash", "-c", "yarn postgraphile"]?