I have this setup which work fine but recently I moved all my codes to sub folder functions.
web get exited with 0
mongo run fine.
Note : I'm creating that subfolder functions because i'm trying to use firebase.
docker-compose.yml
version: "3"
services:
web:
build: .
ports:
- "8080:8080"
links:
- mongo
volumes:
- .:/usr/src/app
mongo:
image: mongo
ports:
- "27018:27017"
volumes:
- mongodata:/data/db
volumes:
mongodata:
Dockerfile
FROM node:latest
WORKDIR /usr/src/app
COPY functions/package*.json ./
RUN npm install
COPY . .
EXPOSE 8080
RUN npm install -g nodemon
CMD [ "nodemon", "functions/index.js" ]
.dockerignore
node_modules
npm-debug.log
