Last active
February 10, 2022 13:45
-
-
Save philippeoz/ec02d81e59e20fc5ddd9106a55b385b2 to your computer and use it in GitHub Desktop.
Postgres + PgAdmin 4
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: "2" | |
services: | |
db: | |
image: postgres | |
container_name: postgres_docker | |
environment: | |
- POSTGRES_USER=postgres | |
- POSTGRES_PASSWORD=my_postgres_password | |
- POSTGRES_DB=postgres | |
ports: | |
- "5432:5432" | |
volumes: | |
- pgdata:/var/lib/postgresql/data | |
restart: always | |
pgadmin: | |
image: dpage/pgadmin4:latest | |
container_name: pgadmin | |
restart: always | |
environment: | |
- [email protected] | |
- PGADMIN_DEFAULT_PASSWORD=my_pgadmin_password | |
volumes: | |
- pgadmindata:/pgadmin4 | |
- ./:/var/lib/pgadmin/storage | |
ports: | |
- "5050:80" | |
links: | |
- db | |
mongo: | |
image: mongo | |
container_name: mongo_docker | |
environment: | |
- MONGO_INITDB_DATABASE=my_init_database_name | |
- MONGO_INITDB_ROOT_USERNAME=my_root_username | |
- MONGO_INITDB_ROOT_PASSWORD=my_root_password | |
volumes: | |
- mongodata:/data/db | |
ports: | |
- "27017-27019:27017-27019" | |
restart: always | |
mongo-express: | |
image: mongo-express | |
ports: | |
- 8091:8081 | |
environment: | |
ME_CONFIG_BASICAUTH_USERNAME: my_username | |
ME_CONFIG_BASICAUTH_PASSWORD: my_password | |
ME_CONFIG_MONGODB_SERVER: mongo | |
ME_CONFIG_MONGODB_PORT: 27017 | |
ME_CONFIG_MONGODB_ADMINUSERNAME: my_root_username | |
ME_CONFIG_MONGODB_ADMINPASSWORD: my_root_password | |
ME_CONFIG_MONGODB_AUTH_DATABASE: admin | |
ME_CONFIG_MONGODB_AUTH_USERNAME: my_root_username | |
ME_CONFIG_MONGODB_AUTH_PASSWORD: my_root_password | |
links: | |
- mongo | |
volumes: | |
pgdata: | |
pgadmindata: | |
mongodata: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment