Skip to content

Instantly share code, notes, and snippets.

@NicMcPhee
Created February 7, 2021 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NicMcPhee/d40c7d08c443165e9797ff3017d236ce to your computer and use it in GitHub Desktop.
Save NicMcPhee/d40c7d08c443165e9797ff3017d236ce to your computer and use it in GitHub Desktop.
The `docker-compose.yml` file for the Cloud Computing class Docker lab
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