Last active
June 30, 2022 12:38
-
-
Save davidboothe/7a55efdb81be23c74fd6c7c640b63afd to your computer and use it in GitHub Desktop.
Docker Templates
This file contains hidden or 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.1' | |
services: | |
mongo: | |
image: mongo | |
restart: always | |
environment: | |
MONGO_INITDB_DATABASE: database_name | |
MONGO_INITDB_ROOT_USERNAME: user | |
MONGO_INITDB_ROOT_PASSWORD: pa55word | |
ports: | |
- 27017:27017 | |
volumes: | |
- ~/docker/volumes/mongodata:/data/db | |
mongo-express: | |
image: mongo-express | |
restart: always | |
ports: | |
- 8081:8081 | |
environment: | |
ME_CONFIG_MONGODB_URL: mongodb://user:pa55word@mongo:27017/ | |
ME_CONFIG_MONGODB_ADMINUSERNAME: user | |
ME_CONFIG_MONGODB_ADMINPASSWORD: pa55word | |
postgresql: | |
image: 'postgres:latest' | |
restart: always | |
ports: | |
- 5432:5432 | |
volumes: | |
- ~/docker/volumes/postgresqldata:/var/lib/postgresql/data/ | |
environment: | |
POSTGRES_USER: username # The PostgreSQL user (useful to connect to the database) | |
POSTGRES_PASSWORD: pa55word # The PostgreSQL password (useful to connect to the database) | |
POSTGRES_DB: default_database # The PostgreSQL default database (automatically created at first launch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment