Created
September 25, 2022 06:36
-
-
Save jordiup/1d16a83e88533f3d485596e789cd80d9 to your computer and use it in GitHub Desktop.
postgres/pg-web docker compose file
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:12 | |
ports: | |
- '5432:5432' | |
environment: | |
- POSTGRES_USER=postgres | |
- POSTGRES_PASSWORD=postgres | |
- POSTGRES_HOST=postgres | |
- POSTGRES_PORT=5432 | |
- POSTGRES_DB=postgres | |
healthcheck: | |
test: ['CMD-SHELL', 'pg_isready -U postgres'] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
# volumes: | |
# - postgres:/var/lib/postgres | |
# https://hub.docker.com/r/sosedoff/pgweb/ | |
pgweb: | |
container_name: pgweb | |
restart: always | |
image: sosedoff/pgweb | |
ports: | |
- '8081:8081' | |
links: | |
- postgres:postgres # my database container is called postgres, not db | |
environment: | |
- DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres?sslmode=disable | |
depends_on: | |
- postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment