Skip to content

Instantly share code, notes, and snippets.

@sgyyz
Last active July 4, 2022 04:13
Show Gist options
  • Save sgyyz/1012e697542ccd3d5e3fe71bc7f98521 to your computer and use it in GitHub Desktop.
Save sgyyz/1012e697542ccd3d5e3fe71bc7f98521 to your computer and use it in GitHub Desktop.
Postgres & PgAdmin docker-compose.yml
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:
@davidshare
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment