In fd1d660dda
a volume is set to override /pgadmin4, which is where the pgadmin code lies, so it cannot start.
This change moves the server JSON to another path, so pgadmin4 can start again.
87 lines
2.3 KiB
YAML
87 lines
2.3 KiB
YAML
---
|
|
version: '3.8'
|
|
x-common:
|
|
database: &db-environment
|
|
POSTGRES_DB: database
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: DaVinci
|
|
TZ: America/Chicago
|
|
POSTGRES_LOCATION: &db-location "~/db:/var/lib/postgresql/data"
|
|
backup: &backup-environment
|
|
SCHEDULE: "@daily"
|
|
BACKUP_KEEP_DAYS: 7
|
|
BACKUP_KEEP_WEEKS: 4
|
|
BACKUP_KEEP_MONTHS: 6
|
|
BACKUP_LOCATION: &bk-location "~/backups:/backups"
|
|
admin: &admin-environment
|
|
PGADMIN_DEFAULT_EMAIL: admin@admin.com
|
|
PGADMIN_DEFAULT_PASSWORD: root
|
|
PGADMIN_PORT: &pgadmin-port "3001:80"
|
|
PGADMIN_SERVER_JSON_FILE: /pgadmin4-config/servers.json
|
|
#
|
|
# ------------------------------------------------------------------------------------------
|
|
# DANGER ZONE BELOW
|
|
#
|
|
# The remainder of this file likely does not need to be changed.
|
|
# Please only make modifications
|
|
# below if you understand what you are doing.
|
|
#
|
|
services:
|
|
postgres:
|
|
container_name: resolve_pgsql
|
|
image: postgres:13
|
|
restart: always
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
<<: [*db-environment]
|
|
volumes:
|
|
- *db-location
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
pgbackups:
|
|
container_name: resolve_pgbackup
|
|
image: prodrigestivill/postgres-backup-local:13
|
|
restart: always
|
|
volumes:
|
|
- *bk-location
|
|
depends_on:
|
|
- postgres
|
|
environment:
|
|
<<: [*db-environment, *backup-environment]
|
|
POSTGRES_HOST: postgres
|
|
POSTGRES_EXTRA_OPTS: --blobs --format=custom --quote-all-identifiers
|
|
BACKUP_SUFFIX: .backup
|
|
HEALTHCHECK_PORT: 8080
|
|
healthcheck:
|
|
interval: 30s
|
|
pgadmin:
|
|
container_name: resolve_pgadmin
|
|
image: dpage/pgadmin4
|
|
restart: always
|
|
environment:
|
|
<<: [*admin-environment]
|
|
ports:
|
|
- *pgadmin-port
|
|
volumes:
|
|
- pgadmin-config:/pgadmin4-config
|
|
depends_on:
|
|
- postgres
|
|
- pgadmin-config
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost/ || exit 1"]
|
|
pgadmin-config:
|
|
container_name: resolve_pgadmin-config-creator
|
|
image: ghcr.io/elliotmatson/pgadmin-config-creator:latest
|
|
restart: on-failure
|
|
environment:
|
|
<<: [*db-environment]
|
|
volumes:
|
|
- pgadmin-config:/config
|
|
|
|
volumes:
|
|
pgadmin-config:
|