Last active
July 4, 2022 04:13
-
-
Save sgyyz/1012e697542ccd3d5e3fe71bc7f98521 to your computer and use it in GitHub Desktop.
Postgres & PgAdmin docker-compose.yml
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' | |
services: | |
postgres: | |
image: postgres | |
ports: | |
- "5432:5432" | |
volumes: | |
- pg-dataset:/var/lib/postgresql/data | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: | |
pgadmin: | |
image: dpage/pgadmin4 | |
depends_on: | |
- postgres | |
ports: | |
- "53603:53603" | |
- "80:80" | |
environment: | |
PGADMIN_DEFAULT_EMAIL: [email protected] | |
PGADMIN_DEFAULT_PASSWORD: root | |
volumes: | |
pg-dataset: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for this. I am using a similar setup, but I am not able to login to pgadmin. Seems it uses a default user and password I am not aware of, and ignores the one I specified in the environments.
I created a StackOverflow question here, in case you want to look at the details.
https://stackoverflow.com/questions/68588110/pgadmin4-does-not-change-default-email-and-password-in-docker-compose