Files
templates/blueprints/postgres-pgadmin/docker-compose.yml
T
Mauricio SiuandClaude Opus 5.5 d8087ee88a Merge canary and drop the obsolete version key from new templates
Resolves the conflicts with canary and removes the top-level version key from
the templates added since this PR was opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:44:18 -06:00

46 lines
1.4 KiB
YAML

services:
postgres:
image: postgres:18-alpine
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- postgres-data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
expose:
- "5432"
pgadmin:
image: dpage/pgadmin4:9.17
restart: unless-stopped
# pgpass must be 0600 and readable by the pgadmin user (uid 5050), so copy the
# mounted file into the data volume before starting pgAdmin.
entrypoint:
- /bin/sh
- -c
- cp /pgadmin4/pgpass /var/lib/pgadmin/pgpass && chmod 600 /var/lib/pgadmin/pgpass && exec /entrypoint.sh
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
- PGADMIN_CONFIG_SERVER_MODE=False
- PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
- PGADMIN_SERVER_JSON_FILE=/pgadmin4/servers.json
volumes:
- pgadmin-data:/var/lib/pgadmin
- ../files/servers.json:/pgadmin4/servers.json:ro
- ../files/pgpass:/pgadmin4/pgpass:ro
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-data:
pgadmin-data: