Skip to content

Instantly share code, notes, and snippets.

@miladr0
Created October 11, 2020 09:41
Show Gist options
  • Save miladr0/8e7af1b228966592785f451f571652ce to your computer and use it in GitHub Desktop.
Save miladr0/8e7af1b228966592785f451f571652ce to your computer and use it in GitHub Desktop.
define containers
version: "2"
services:
mongodb:
image: mongo
volumes:
- ./volumes/mongodata:/data/db
environment:
- MONGO_INITDB_ROOT_USERNAME=mongoadmin
- MONGO_INITDB_ROOT_PASSWORD=mongoadmin
ports:
- "127.0.0.1:27017:27017"
networks:
- ebm
redis:
image: redis:5.0.5-alpine
ports:
- "127.0.0.1:6379:6379"
volumes:
- ./volumes/redis_data:/data
networks:
- ebm
networks:
ebm:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment