Last active
October 11, 2022 14:33
-
-
Save Maurifc/0f1f0c73f422762111357b2379fa795f to your computer and use it in GitHub Desktop.
Docker - Docker compose boilerplate
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
version: '3.7' | |
services: | |
mongodb: | |
image: mongo:5.0-focal | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: root | |
MONGO_INITDB_DATABASE: computers-api | |
ports: | |
- "27017:27017" | |
volumes: | |
- mongodb_data:/data/db | |
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro | |
volumes: | |
mongodb_data: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment