Skip to content

Instantly share code, notes, and snippets.

@torchhound
Last active November 3, 2018 06:25
Show Gist options
  • Save torchhound/a7984c88c492e09fc33b5ca11f55503a to your computer and use it in GitHub Desktop.
Save torchhound/a7984c88c492e09fc33b5ca11f55503a to your computer and use it in GitHub Desktop.
mongo-crud docker/docker-compose.yml
version: '3'
services:
backend:
build:
context: ../
dockerfile: docker/Dockerfile.production
args:
port: ${PORT}
env_file:
- ../.env
restart: always
ports:
- "${PORT}:${PORT}"
environment:
WAIT_HOSTS: database:27017
database:
image: mongo:4.0
env_file:
- ../.env
volumes:
- ".${MONGO_DATA_DIR}:${MONGO_DATA_DIR}"
expose:
- 27017
command: "mongod --smallfiles --logpath=${MONGO_LOG_FILE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment