mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Renamed Database roles
This commit is contained in:
21
roles/cmp-rdbms/templates/services/postgres.yml.j2
Normal file
21
roles/cmp-rdbms/templates/services/postgres.yml.j2
Normal file
@@ -0,0 +1,21 @@
|
||||
# This template needs to be included in docker-compose.yml, which depend on a postgres database
|
||||
{% if not applications | is_feature_enabled('central_database',application_id) %}
|
||||
{{ database_host }}:
|
||||
image: postgres:{{applications['postgres'].version}}-alpine
|
||||
container_name: {{application_id}}-database
|
||||
env_file:
|
||||
- {{database_env}}
|
||||
restart: {{docker_restart_policy}}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U {{database_name}}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
volumes:
|
||||
- type: volume
|
||||
source: database
|
||||
target: /var/lib/postgresql/data
|
||||
networks:
|
||||
- default
|
||||
{% endif %}
|
||||
{{ "\n" }}
|
Reference in New Issue
Block a user