mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-10 06:51:04 +01:00
21 lines
648 B
Django/Jinja
21 lines
648 B
Django/Jinja
{% if not enable_central_database %}
|
|
database:
|
|
image: postgres:{{database_version}}-alpine
|
|
environment:
|
|
- POSTGRES_PASSWORD={{database_password}}
|
|
- POSTGRES_USER={{database_username}}
|
|
- POSTGRES_DB={{database_databasename}}
|
|
- POSTGRES_INITDB_ARGS="--encoding=UTF8 --locale=C"
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U {{database_databasename}}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 6
|
|
volumes:
|
|
- type: volume
|
|
source: database
|
|
target: /var/lib/postgresql/data
|
|
networks:
|
|
- {{docker_compose_project_name}}_network
|
|
{% endif %} |