Created
March 30, 2020 18:20
-
-
Save 2u4u/2b13910c220f5a647f15d198a50ebe2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
server: | |
build: | |
context: . | |
dockerfile: Dockerfile | |
image: myapp-server-img | |
container_name: myapp-node-express | |
volumes: | |
- .:/usr/src/app | |
- /usr/src/app/node_modules | |
ports: | |
- "8080:8080" | |
depends_on: | |
- mongo | |
env_file: .env | |
environment: | |
- MONGO_HOSTNAME=$MONGO_HOSTNAME | |
- MONGO_PORT=$MONGO_PORT | |
- MONGO_DB=$MONGO_DB | |
mongo: | |
image: mongo | |
container_name: myapp-mongodb | |
ports: | |
- "27017:27017" | |
client: | |
build: | |
context: ./client/ | |
dockerfile: Dockerfile | |
image: client | |
container_name: myapp-react-client | |
command: npm start | |
volumes: | |
- ./client/:/usr/app | |
- /usr/app/node_modules | |
depends_on: | |
- server | |
ports: | |
- "3000:3000" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment