mirror of
https://github.com/Dokploy/templates.git
synced 2026-06-20 06:35:23 +02:00
* feat: add PostgreSQL with PgDog template Add postgres-pgdog template providing PostgreSQL database with PgDog connection pooler, load balancer, and horizontal scaling proxy. Modern alternative to PgBouncer with multi-threading support. - Configurable PostgreSQL (default: 18-alpine) and PgDog (default: v0.1.26) images - Optional admin interface on port 6433 - Includes healthcheck and dependency management * 🐛 fix(postgres-pgdog): add config mounts and fix postgres volume path - Add [[config.mounts]] for pgdog.toml and users.toml - Mount config files from ../files/ in docker-compose - Change postgres volume to /var/lib/postgresql (postgres 18+ standard) - Add explicit command with config paths to prevent warnings * 🐛 fix(postgres-pgdog): correct binary path and use default config locations - Mount configs to /pgdog/ (default WorkingDir) instead of /etc/pgdog/ - Remove explicit command (binary is /usr/local/bin/pgdog, not /pgdog/pgdog) - Use image's default CMD with default config paths * 🐛 fix(postgres-pgdog): remove invalid admin_port config field - Remove admin_port from [general] section (not a valid field) - Admin DB uses same port 6432 with special database name - Remove commented admin domain config * 🐛 fix(postgres-pgdog): enable external access via fixed port mapping - Add fixed port 6432:6432 to postgres-pgdog service - Remove HTTP domain config (incompatible with TCP protocol) - Add comment for internal-only option Fixes UnsupportedStartup errors when using domain config for PostgreSQL protocol access. * 🐛 fix(postgres-pgdog): use standard port format per convention - Change port mapping from '6432:6432' to '6432' format - Follows Dokploy template convention for port declarations - External access requires checking Dokploy UI for assigned host port * 📝 docs(postgres-pgdog): clarify port settings comment * 🐛 fix(postgres-pgdog): default to internal access with opt-in external port - Remove obsolete version field - Port mapping commented by default for security - Users uncomment to enable external access on port 6432
34 lines
840 B
YAML
34 lines
840 B
YAML
services:
|
|
postgres-pgdog:
|
|
image: ${PGDOG_IMAGE}
|
|
restart: unless-stopped
|
|
# Uncomment 'ports' settings below to enable external access
|
|
# ports:
|
|
# - "6432:6432"
|
|
volumes:
|
|
- ../files/pgdog.toml:/pgdog/pgdog.toml
|
|
- ../files/users.toml:/pgdog/users.toml
|
|
environment:
|
|
- RUST_LOG=${RUST_LOG}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
postgres:
|
|
image: ${POSTGRES_IMAGE}
|
|
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
|
|
|
|
volumes:
|
|
postgres-data:
|