1
This is a generic skeleton of a Docker-Compose.yml file
version: '3'
services:
db:
image: mongo:3.4
backend:
image: node:8.1
volumes:
-./backend:/backend
ports:
- 3000:3000
command: bash -c "cd /backend && npm i && node app"
frontend:
image: nginx:1.13
volumes:
- ./frontend:/usr/shared/nginx/html
ports:
- 80:80
Assuming the Dockerfile file is on the same root as the Docker-Compose.yml file as I could run Dockerfile through the Docker-Compose.yml file ?
I’m open to questions
Instead of "image" put "build: ."
– Woss
@Andersoncarloswoss thank you so much for helping me, would you put your suggestion? Because you explaining so I can not have idea, please!
– wladyband