Skip to content

Instantly share code, notes, and snippets.

@naeemaei
Last active January 13, 2022 19:49
Show Gist options
  • Save naeemaei/22ea93c29d2979f7a19d97d14d5b6199 to your computer and use it in GitHub Desktop.
Save naeemaei/22ea93c29d2979f7a19d97d14d5b6199 to your computer and use it in GitHub Desktop.
version: '3.5'
services:
postgres:
container_name: postgres_container
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
ports:
- "6543:5432"
networks:
- postgres
restart: unless-stopped
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-mysecretpassword}
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- pgadmin:/var/lib/pgadmin
ports:
- "${PGADMIN_PORT:-5050}:80"
networks:
- postgres
restart: unless-stopped
networks:
postgres:
driver: bridge
volumes:
postgres:
pgadmin:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment