mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Added draft for central postgres and mariadb. variables and networks still need to be adapted
This commit is contained in:
@@ -6,8 +6,6 @@ services:
|
||||
restart: always
|
||||
logging:
|
||||
driver: journald
|
||||
depends_on:
|
||||
- database
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
environment:
|
||||
@@ -15,25 +13,13 @@ services:
|
||||
MYSQL_USER: "{{database_username}}"
|
||||
MYSQL_PASSWORD: "{{database_password}}"
|
||||
MYSQL_HOST: {{database_host}}:3306
|
||||
database:
|
||||
logging:
|
||||
driver: journald
|
||||
image: mariadb:10.5
|
||||
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW"
|
||||
environment:
|
||||
MYSQL_DATABASE: "{{database_databasename}}"
|
||||
MYSQL_USER: "{{database_username}}"
|
||||
MYSQL_PASSWORD: "{{database_password}}"
|
||||
MYSQL_ROOT_PASSWORD: "{{database_password}}"
|
||||
MARIADB_AUTO_UPGRADE: "1"
|
||||
volumes:
|
||||
- database:/var/lib/mysql
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: "/usr/bin/mariadb --user={{database_username}} --password={{database_password}} --execute \"SHOW DATABASES;\""
|
||||
interval: 3s
|
||||
timeout: 1s
|
||||
retries: 5
|
||||
{% if not ( enable_central_database | lower | bool ) %}
|
||||
depends_on:
|
||||
- database
|
||||
|
||||
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||
{% endif %}
|
||||
|
||||
web:
|
||||
image: nginx:alpine
|
||||
logging:
|
||||
@@ -59,10 +45,14 @@ services:
|
||||
- data:/var/www/html
|
||||
entrypoint: /cron.sh
|
||||
depends_on:
|
||||
{% if not ( enable_central_database | lower | bool ) %}
|
||||
- database
|
||||
{% endif %}
|
||||
- redis
|
||||
volumes:
|
||||
{% if not ( enable_central_database | lower | bool ) %}
|
||||
database:
|
||||
{% endif %}
|
||||
data:
|
||||
redis:
|
||||
networks:
|
||||
|
Reference in New Issue
Block a user