Created
September 21, 2020 06:33
-
-
Save ashutosh1919/ebba91851b66e1e22818c3fe88aff761 to your computer and use it in GitHub Desktop.
docker-compose.yml file for Dockerized Flask + MongoDB application
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
app: | |
build: . | |
command: python -u app.py | |
ports: | |
- "5000:5000" | |
volumes: | |
- .:/app | |
links: | |
- db | |
db: | |
image: mongo:latest | |
hostname: test_mongodb | |
environment: | |
- MONGO_INITDB_DATABASE=animal_db | |
- MONGO_INITDB_ROOT_USERNAME=root | |
- MONGO_INITDB_ROOT_PASSWORD=pass | |
volumes: | |
- ./init-db.js:/docker-entrypoint-initdb.d/init-db.js:ro | |
ports: | |
- 27017:27017 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment