generated from admin/template
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16
|
|
container_name: salon_is_db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-salon}
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me}
|
|
# Allows password connections from other machines on the LAN.
|
|
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
|
|
# Guarantees correct Russian text in the init script.
|
|
PGCLIENTENCODING: UTF8
|
|
TZ: Europe/Moscow
|
|
ports:
|
|
- "${DB_PORT:-5433}:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
- ./sql:/docker-entrypoint-initdb.d:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-salon}"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
|
|
pgadmin:
|
|
image: dpage/pgadmin4:latest
|
|
container_name: salon_is_pgadmin
|
|
profiles: ["pgadmin"]
|
|
restart: unless-stopped
|
|
environment:
|
|
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@admin.com}
|
|
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin}
|
|
ports:
|
|
- "${PGADMIN_PORT:-5050}:80"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
pgdata:
|