Created
February 7, 2021 21:23
-
-
Save NicMcPhee/d40c7d08c443165e9797ff3017d236ce to your computer and use it in GitHub Desktop.
The `docker-compose.yml` file for the Cloud Computing class Docker lab
This file contains hidden or 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
services: | |
server: | |
container_name: server | |
build: ./server # Location of the Dockerfile for the client | |
restart: always | |
environment: | |
MONGO_ADDR: mongo # hostname of the mongo container | |
MONGO_DB: prod | |
WAIT_HOSTS: mongo:27017 # wait for mongo to start up before starting the server | |
depends_on: | |
- mongo | |
networks: | |
- mongo-network | |
ports: | |
- "80:4567" | |
mongo: | |
container_name: mongo | |
image: mongo | |
restart: always | |
environment: | |
MONGO_DB: prod | |
networks: | |
- mongo-network | |
volumes: | |
- mongo-data:/data/db | |
- ./database:/docker-entrypoint-initdb.d | |
networks: | |
mongo-network: | |
volumes: | |
mongo-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment