34 lines
606 B
YAML
34 lines
606 B
YAML
services:
|
|
postgres:
|
|
image: postgres:18
|
|
container_name: postgres
|
|
restart: always
|
|
healthcheck:
|
|
interval: 30s
|
|
retries: 5
|
|
start_period: 20s
|
|
test:
|
|
- CMD-SHELL
|
|
- pg_isready -U $${POSTGRES_USER}
|
|
timeout: 5s
|
|
env_file:
|
|
- .env
|
|
secrets:
|
|
- PGROOT_PASS
|
|
# - PSUSER_PASS
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/18/docker
|
|
networks:
|
|
- db
|
|
volumes:
|
|
pgdata:
|
|
name: pgdata
|
|
secrets:
|
|
PGROOT_PASS:
|
|
file: .secrets/PGROOT_PASS
|
|
# PSUSER_PASS:
|
|
# file: .secrets/PSUSER_PASS
|
|
networks:
|
|
db:
|
|
external:
|
|
true |