Skip to content

Instantly share code, notes, and snippets.

@aaronmbos
Created February 10, 2023 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronmbos/86e72bc3142c0c0eb79aa412e7a91568 to your computer and use it in GitHub Desktop.
Save aaronmbos/86e72bc3142c0c0eb79aa412e7a91568 to your computer and use it in GitHub Desktop.
docker_postgres
services:
postgres-db:
image: postgres:14.1
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
ports:
- "5433:5432"
networks:
- pg_network
volumes:
- db_data:/var/lib/postgresql/data
pgadmin4:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "8088:80"
networks:
- pg_network
networks:
pg_network:
driver: bridge
volumes:
db_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment