computer-playbook/templates/docker-postgres-service.yml.j2

18 lines
479 B
Plaintext
Raw Normal View History

2023-12-28 00:28:30 +01:00
database:
image: postgres:{{database_version}}-alpine
environment:
- POSTGRES_PASSWORD={{database_password}}
- POSTGRES_USER={{database_username}}
- POSTGRES_DB={{database_databasename}}
restart: always
2023-12-28 00:28:30 +01:00
healthcheck:
2023-12-28 18:30:31 +01:00
test: ["CMD-SHELL", "pg_isready -U {{database_databasename}}"]
2023-12-28 00:28:30 +01:00
interval: 10s
timeout: 5s
retries: 6
volumes:
- type: volume
source: database
target: /var/lib/postgresql/data