Compare commits

..

No commits in common. "3f4592146ac04a80e113a6053d4beec081249a16" and "c2fe8a95c0b9c4b204f4b5b8f0c9e222c1c26f34" have entirely different histories.

36 changed files with 234 additions and 225 deletions

View File

@ -34,15 +34,10 @@
notify: restart backup-docker-to-local.timer notify: restart backup-docker-to-local.timer
when: run_once_backup_docker_to_local is not defined when: run_once_backup_docker_to_local is not defined
- name: seed database values - name: create {{backup_docker_to_local_folder}}databases.csv
command: copy:
cmd: "python database_entry_seeder.py databases.csv {{database_instance}} {{database_host}} {{database_databasename}} {{database_username}} {{database_password}}" src: "{{ inventory_dir }}/files/{{ inventory_hostname }}{{backup_docker_to_local_folder}}databases.csv"
chdir: "{{backup_docker_to_local_folder}}" dest: "{{backup_docker_to_local_folder}}databases.csv"
- name: Set file permissions for databases.csv to be readable, writable, and executable by root only
ansible.builtin.file:
path: "{{ backup_docker_to_local_folder }}databases.csv"
mode: '0700'
owner: root owner: root
group: root group: root
when: run_once_backup_docker_to_local is not defined when: run_once_backup_docker_to_local is not defined

View File

@ -19,6 +19,11 @@
notify: reload cleanup-failed-docker-backups.service daemon notify: reload cleanup-failed-docker-backups.service daemon
when: run_once_cleanup_failed_docker_backups is not defined when: run_once_cleanup_failed_docker_backups is not defined
- name: run the cleanup_failed_docker_backups tasks once
set_fact:
run_once_cleanup_failed_docker_backups: true
when: run_once_cleanup_failed_docker_backups is not defined
- name: create cleanup-failed-docker-backups.timer - name: create cleanup-failed-docker-backups.timer
template: template:
src: cleanup-failed-docker-backups.timer.j2 src: cleanup-failed-docker-backups.timer.j2
@ -26,9 +31,3 @@
register: cleanup_failed_docker_backups_timer register: cleanup_failed_docker_backups_timer
changed_when: cleanup_failed_docker_backups_timer.changed or activate_all_timers | bool changed_when: cleanup_failed_docker_backups_timer.changed or activate_all_timers | bool
notify: restart cleanup-failed-docker-backups.timer notify: restart cleanup-failed-docker-backups.timer
when: run_once_cleanup_failed_docker_backups is not defined
- name: run the cleanup_failed_docker_backups tasks once
set_fact:
run_once_cleanup_failed_docker_backups: true
when: run_once_cleanup_failed_docker_backups is not defined

View File

@ -1,9 +1,9 @@
# These could be changed # These could be changed
MYSQL_DATABASE={{database_databasename}} MYSQL_DATABASE=akaunting
MYSQL_USER={{database_username}} MYSQL_USER=admin
# This should definitely be changed to something long and random # This should definitely be changed to something long and random
MYSQL_PASSWORD={{database_password}} MYSQL_PASSWORD={{akaunting_database_password}}
# You should probably leave this # You should probably leave this
MYSQL_ROOT_PASSWORD={{database_password}} MYSQL_ROOT_PASSWORD={{akaunting_database_password}}

View File

@ -1,6 +1 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}akaunting/" docker_compose_instance_directory: "{{path_docker_compose_instances}}akaunting/"
database_instance: "akaunting"
database_host: "akaunting-db"
database_databasename: "{{database_instance}}"
database_username: "admin"
database_password: "{{akaunting_database_password}}"

View File

@ -24,9 +24,24 @@ services:
volumes: volumes:
- .:/usr/share/nginx/html - .:/usr/share/nginx/html
- .:/var/www - .:/var/www
database:
{% include 'templates/docker-mariadb-service.yml.j2' %} logging:
driver: journald
image: mariadb
restart: always
environment:
MYSQL_DATABASE: "attendize"
MYSQL_USER: "attendize"
MYSQL_PASSWORD: "{{attendize_database_password}}"
MYSQL_ROOT_PASSWORD: "{{attendize_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mariadb --user=attendize --password={{attendize_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
maildev: maildev:
image: maildev/maildev image: maildev/maildev
ports: ports:

View File

@ -1,8 +1,3 @@
--- ---
docker_compose_instance_directory: "{{path_docker_compose_instances}}attendize/" docker_compose_instance_directory: "{{path_docker_compose_instances}}attendize/"
mail_interface_domain: "mail.{{domain}}" mail_interface_domain: "mail.{{domain}}"
database_instance: "attendize"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{attendize_database_password}}"

View File

@ -1,6 +1 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}bigbluebutton/" docker_compose_instance_directory: "{{path_docker_compose_instances}}bigbluebutton/"
database_instance: "bigbluebutton"
database_host: "postgres"
database_databasename: "greenlight-v3"
database_username: "postgres"
database_password: ""

View File

@ -10,10 +10,10 @@ services:
- USER_UID=1000 - USER_UID=1000
- USER_GID=1000 - USER_GID=1000
- DB_TYPE=mysql - DB_TYPE=mysql
- DB_HOST={{database_host}}:3306 - DB_HOST=database:3306
- DB_NAME={{database_databasename}} - DB_NAME=gitea
- DB_USER={{database_username}} - DB_USER=gitea
- DB_PASSWD={{database_password}} - DB_PASSWD={{gitea_database_password}}
- SSH_PORT={{ssh_port}} - SSH_PORT={{ssh_port}}
- SSH_LISTEN_PORT=22 - SSH_LISTEN_PORT=22
- DOMAIN={{domain}} - DOMAIN={{domain}}
@ -31,9 +31,24 @@ services:
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
depends_on: depends_on:
- database - database
database:
{% include 'templates/docker-mariadb-service.yml.j2' %} logging:
driver: journald
image: mariadb
restart: always
environment:
MYSQL_DATABASE: "gitea"
MYSQL_USER: "gitea"
MYSQL_PASSWORD: "{{gitea_database_password}}"
MYSQL_ROOT_PASSWORD: "{{gitea_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mariadb --user=gitea --password={{gitea_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
volumes: volumes:
database: database:
data: data:

View File

@ -1,6 +1 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}gitea/" docker_compose_instance_directory: "{{path_docker_compose_instances}}gitea/"
database_instance: "gitea"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{gitea_database_password}}"

View File

@ -6,10 +6,10 @@ services:
logging: logging:
driver: journald driver: journald
environment: environment:
JOOMLA_DB_HOST: "{{database_host}}:3306" JOOMLA_DB_HOST: "database:3306"
JOOMLA_DB_USER: "{{database_username}}" JOOMLA_DB_USER: "joomla"
JOOMLA_DB_PASSWORD: "{{database_password}}" JOOMLA_DB_PASSWORD: "{{joomla_database_password}}"
JOOMLA_DB_NAME: "{{database_databasename}}" JOOMLA_DB_NAME: "joomla"
restart: always restart: always
links: links:
- database - database
@ -17,9 +17,19 @@ services:
- data:/var/www/html - data:/var/www/html
ports: ports:
- "127.0.0.1:{{http_port}}:80" - "127.0.0.1:{{http_port}}:80"
database:
{% include 'templates/docker-mariadb-service.yml.j2' %} image: mariadb
logging:
driver: journald
environment:
MYSQL_DATABASE: "joomla"
MYSQL_USER: "joomla"
MYSQL_PASSWORD: "{{joomla_database_password}}"
MYSQL_ROOT_PASSWORD: "{{joomla_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
restart: always
volumes: volumes:
database: database:
data: data:

View File

@ -1,6 +1 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}joomla/" docker_compose_instance_directory: "{{path_docker_compose_instances}}joomla/"
database_instance: "joomla"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{joomla_database_password}}"

View File

@ -1,22 +1,35 @@
version: "3.7" version: "3.7"
x-application-defaults: &application-defaults
restart: unless-stopped
image: listmonk/listmonk:latest
ports:
- "127.0.0.1:{{http_port}}:9000"
networks:
- listmonk
environment:
- TZ=Etc/UTC
x-database-defaults: &database-defaults
image: postgres:13-alpine
ports:
- "9432:5432"
networks:
- listmonk
environment:
- POSTGRES_PASSWORD={{listmonk_database_password}}
- POSTGRES_USER=listmonk
- POSTGRES_DB=listmonk
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U listmonk"]
interval: 10s
timeout: 5s
retries: 6
services: services:
database: database:
image: postgres:13-alpine <<: *database-defaults
ports:
- "9432:5432"
networks:
- listmonk
environment:
- POSTGRES_PASSWORD={{database_password}}
- POSTGRES_USER={{database_username}}
- POSTGRES_DB={{database_databasename}}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U {{database_username}}"]
interval: 10s
timeout: 5s
retries: 6
container_name: database container_name: database
volumes: volumes:
- type: volume - type: volume
@ -24,14 +37,7 @@ services:
target: /var/lib/postgresql/data target: /var/lib/postgresql/data
application: application:
restart: unless-stopped <<: *application-defaults
image: listmonk/listmonk:latest
ports:
- "127.0.0.1:{{http_port}}:9000"
networks:
- listmonk
environment:
- TZ=Etc/UTC
container_name: listmonk_application container_name: listmonk_application
depends_on: depends_on:
- database - database

View File

@ -1,6 +1 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}listmonk/" docker_compose_instance_directory: "{{path_docker_compose_instances}}listmonk/"
database_instance: "listmonk"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{listmonk_database_password}}"

View File

@ -21,8 +21,24 @@ services:
dns: dns:
- 192.168.203.254 - 192.168.203.254
{% include 'templates/docker-mariadb-service.yml.j2' %} database:
image: mariadb
restart: always
environment:
MYSQL_DATABASE: "mailu"
MYSQL_USER: "mailu"
MYSQL_PASSWORD: "{{mailu_database_password}}"
MYSQL_ROOT_PASSWORD: "{{mailu_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mariadb --user=mailu --password={{mailu_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
logging:
driver: journald
depends_on: depends_on:
- resolver - resolver
dns: dns:

View File

@ -140,15 +140,15 @@ LOG_LEVEL=WARNING
# Database settings # Database settings
################################### ###################################
DB_FLAVOR=mysql DB_FLAVOR=mysql
DB_USER={{database_username}} DB_USER=mailu
DB_PW={{database_password}} DB_PW={{mailu_database_password}}
DB_HOST={{database_host}}:3306 DB_HOST=database:3306
DB_NAME={{database_databasename}} DB_NAME=mailu
ROUNDCUBE_DB_FLAVOR=mysql ROUNDCUBE_DB_FLAVOR=mysql
ROUNDCUBE_DB_USER={{database_username}} ROUNDCUBE_DB_USER=mailu
ROUNDCUBE_DB_PW={{database_password}} ROUNDCUBE_DB_PW={{mailu_database_password}}
ROUNDCUBE_DB_NAME={{database_databasename}} ROUNDCUBE_DB_NAME=mailu
ROUNDCUBE_DB_HOST={{database_host}}:3306 ROUNDCUBE_DB_HOST=database:3306
API_TOKEN={{mailu_api_token}} API_TOKEN={{mailu_api_token}}

View File

@ -1,6 +1 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}mailu/" docker_compose_instance_directory: "{{path_docker_compose_instances}}mailu/"
database_instance: "mailu"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{mailu_database_password}}"

View File

@ -5,11 +5,11 @@ SECRET_KEY_BASE={{mastodon_secret_key_base}}
OTP_SECRET={{mastodon_otp_secret}} OTP_SECRET={{mastodon_otp_secret}}
VAPID_PRIVATE_KEY={{mastodon_vapid_private_key}} VAPID_PRIVATE_KEY={{mastodon_vapid_private_key}}
VAPID_PUBLIC_KEY={{mastodon_vapid_public_key}} VAPID_PUBLIC_KEY={{mastodon_vapid_public_key}}
DB_HOST={{database_host}} DB_HOST=database
DB_PORT=5432 DB_PORT=5432
DB_NAME={{database_databasename}} DB_NAME=postgres
DB_USER={{database_username}} DB_USER=postgres
DB_PASS={{database_password}} DB_PASS=
REDIS_HOST=redis REDIS_HOST=redis
REDIS_PORT=6379 REDIS_PORT=6379
REDIS_PASSWORD= REDIS_PASSWORD=

View File

@ -1,6 +1 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}mastodon/" docker_compose_instance_directory: "{{path_docker_compose_instances}}mastodon/"
database_instance: "mastodon"
database_host: "database"
database_databasename: "postgres" # todo: Change this to standart name scheme for future setups
database_username: "postgres" # todo: Change this to standart name scheme for future setups
database_password: "" # todo: Change this to standart name scheme for future setups

View File

@ -9,20 +9,35 @@ services:
ports: ports:
- "127.0.0.1:{{http_port}}:80" - "127.0.0.1:{{http_port}}:80"
environment: environment:
MATOMO_DATABASE_HOST: "{{database_host}}:3306" MATOMO_DATABASE_HOST: "database:3306"
MATOMO_DATABASE_ADAPTER: "mysql" MATOMO_DATABASE_ADAPTER: "mysql"
MATOMO_DATABASE_USERNAME: "{{database_username}}" MATOMO_DATABASE_USERNAME: "matomo"
MATOMO_DATABASE_PASSWORD: "{{database_password}}" MATOMO_DATABASE_PASSWORD: "{{matomo_database_password}}"
MATOMO_DATABASE_DBNAME: "{{database_databasename}}" MATOMO_DATABASE_DBNAME: "matomo"
links: links:
- database - database
depends_on: depends_on:
- database - database
volumes: volumes:
- data:/var/www/html - data:/var/www/html
database:
{% include 'templates/docker-mariadb-service.yml.j2' %} logging:
driver: journald
image: mariadb
restart: always
environment:
MYSQL_DATABASE: "matomo"
MYSQL_USER: "matomo"
MYSQL_PASSWORD: "{{matomo_database_password}}"
MYSQL_ROOT_PASSWORD: "{{matomo_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mariadb --user=matomo --password={{matomo_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
volumes: volumes:
database: database:
data: data:

View File

@ -1,7 +1,2 @@
--- ---
docker_compose_instance_directory: "{{path_docker_compose_instances}}matomo/" docker_compose_instance_directory: "{{path_docker_compose_instances}}matomo/"
database_instance: "matomo"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{matomo_database_password}}"

View File

@ -26,12 +26,12 @@ services:
volumes: volumes:
- database:/var/lib/postgresql/data - database:/var/lib/postgresql/data
environment: environment:
- POSTGRES_DB={{database_databasename}} - POSTGRES_DB=matrix
- POSTGRES_USER={{database_username}} - POSTGRES_USER=matrix
- POSTGRES_PASSWORD={{database_password}} - POSTGRES_PASSWORD={{matrix_database_password}}
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C - POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U {{database_username}}"] test: ["CMD-SHELL", "pg_isready -U matrix"]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 6 retries: 6

View File

@ -1,7 +1,2 @@
--- ---
docker_compose_instance_directory: "{{path_docker_compose_instances}}matrix/" docker_compose_instance_directory: "{{path_docker_compose_instances}}matrix/"
database_instance: "matrix"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{matrix_database_password}}"

View File

@ -25,9 +25,24 @@ services:
volumes: volumes:
- "{{docker_compose_instance_confd_directory}}:{{target_mount_conf_d_directory}}:ro" - "{{docker_compose_instance_confd_directory}}:{{target_mount_conf_d_directory}}:ro"
- "data:/var/www/html:ro" - "data:/var/www/html:ro"
database:
{% include 'templates/docker-mariadb-service.yml.j2' %} logging:
driver: journald
image: mariadb
restart: always
environment:
MYSQL_DATABASE: "mybb"
MYSQL_USER: "mybb"
MYSQL_PASSWORD: "{{mybb_database_password}}"
MYSQL_ROOT_PASSWORD: "{{mybb_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mariadb --user=mybb --password={{mybb_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
volumes: volumes:
database: database:
data: data:

View File

@ -4,8 +4,3 @@ docker_compose_instance_confd_directory: "{{docker_compose_instance_directory}}c
docker_compose_instance_confd_defaultconf_file: "{{docker_compose_instance_confd_directory}}default.conf" docker_compose_instance_confd_defaultconf_file: "{{docker_compose_instance_confd_directory}}default.conf"
target_mount_conf_d_directory: "{{nginx_servers_directory}}" target_mount_conf_d_directory: "{{nginx_servers_directory}}"
source_domain: "mybb.{{top_domain}}" source_domain: "mybb.{{top_domain}}"
database_instance: "mybb"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{mybb_database_password}}"

View File

@ -11,26 +11,26 @@ services:
volumes: volumes:
- data:/var/www/html - data:/var/www/html
environment: environment:
MYSQL_DATABASE: "{{database_databasename}}" MYSQL_DATABASE: "nextcloud"
MYSQL_USER: "{{database_username}}" MYSQL_USER: "nextcloud"
MYSQL_PASSWORD: "{{database_password}}" MYSQL_PASSWORD: "{{nextcloud_database_password}}"
MYSQL_HOST: {{database_host}}:3306 MYSQL_HOST: database:3306
database: database:
logging: logging:
driver: journald driver: journald
image: mariadb:10.5 image: mariadb:10.5
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW"
environment: environment:
MYSQL_DATABASE: "{{database_databasename}}" MYSQL_DATABASE: "nextcloud"
MYSQL_USER: "{{database_username}}" MYSQL_USER: "nextcloud"
MYSQL_PASSWORD: "{{database_password}}" MYSQL_PASSWORD: "{{nextcloud_database_password}}"
MYSQL_ROOT_PASSWORD: "{{database_password}}" MYSQL_ROOT_PASSWORD: "{{nextcloud_database_password}}"
MARIADB_AUTO_UPGRADE: "1" MARIADB_AUTO_UPGRADE: "1"
volumes: volumes:
- database:/var/lib/mysql - database:/var/lib/mysql
restart: always restart: always
healthcheck: healthcheck:
test: "/usr/bin/mariadb --user={{database_username}} --password={{database_password}} --execute \"SHOW DATABASES;\"" test: "/usr/bin/mariadb --user=nextcloud --password={{nextcloud_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s interval: 3s
timeout: 1s timeout: 1s
retries: 5 retries: 5

View File

@ -1,7 +1,2 @@
--- ---
docker_compose_instance_directory: "{{path_docker_compose_instances}}nextcloud/" docker_compose_instance_directory: "{{path_docker_compose_instances}}nextcloud/"
database_instance: "nextcloud"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{nextcloud_database_password}}"

View File

@ -12,8 +12,8 @@ OPENPROJECT_HOST__NAME={{domain}}
PORT=127.0.0.1:{{http_port}} PORT=127.0.0.1:{{http_port}}
OPENPROJECT_RAILS__RELATIVE__URL__ROOT= OPENPROJECT_RAILS__RELATIVE__URL__ROOT=
IMAP_ENABLED=false IMAP_ENABLED=false
POSTGRES_PASSWORD="{{ database_password }}" POSTGRES_PASSWORD="{{ openproject_database_password }}"
DATABASE_URL="postgres://{{ database_username }}:{{ database_password }}@{{database_host}}/{{database_databasename}}?pool=20&encoding=unicode&reconnect=true" DATABASE_URL="postgres://postgres:{{ openproject_database_password }}@db/openproject?pool=20&encoding=unicode&reconnect=true"
RAILS_MIN_THREADS=4 RAILS_MIN_THREADS=4
RAILS_MAX_THREADS=16 RAILS_MAX_THREADS=16

View File

@ -2,8 +2,3 @@ repository_directory: "{{ path_docker_compose_instances }}openproject/"
docker_compose_instance_directory: "{{repository_directory}}compose/" docker_compose_instance_directory: "{{repository_directory}}compose/"
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml" docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
docker_compose_backup_path: "/tmp/openproject-docker-compose-backup.yml" docker_compose_backup_path: "/tmp/openproject-docker-compose-backup.yml"
database_instance: "openproject"
database_host: "db"
database_databasename: "{{database_instance}}"
database_username: "postgres"
database_password: "{{openproject_database_password}}"

View File

@ -1,11 +1,11 @@
# Database / Postgres service configuration # Database / Postgres service configuration
POSTGRES_USER={{database_username}} POSTGRES_USER=peertube
POSTGRES_PASSWORD={{peertube_database_password}} POSTGRES_PASSWORD={{peertube_database_password}}
POSTGRES_DB={{database_databasename}} POSTGRES_DB=peertube
PEERTUBE_DB_USERNAME={{database_username}} PEERTUBE_DB_USERNAME=peertube
PEERTUBE_DB_PASSWORD={{peertube_database_password}} PEERTUBE_DB_PASSWORD={{peertube_database_password}}
PEERTUBE_DB_SSL=false PEERTUBE_DB_SSL=false
PEERTUBE_DB_HOSTNAME={{database_host}} PEERTUBE_DB_HOSTNAME=database
# PeerTube server configuration # PeerTube server configuration
PEERTUBE_WEBSERVER_HOSTNAME={{domain}} PEERTUBE_WEBSERVER_HOSTNAME={{domain}}

View File

@ -1,6 +1 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}peertube/" docker_compose_instance_directory: "{{path_docker_compose_instances}}peertube/"
database_instance: "peertube"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{peertube_database_password}}"

View File

@ -38,9 +38,20 @@ services:
interval: 60s interval: 60s
timeout: 5s timeout: 5s
retries: 1 retries: 1
database:
{% include 'templates/docker-mariadb-service.yml.j2' %} logging:
driver: journald
image: mariadb
restart: always
env_file:
- ./env
volumes:
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mariadb --user=pixelfed --password={{pixelfed_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
redis: redis:
image: redis:alpine image: redis:alpine
restart: always restart: always

View File

@ -1,7 +1,2 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}pixelfed/" docker_compose_instance_directory: "{{path_docker_compose_instances}}pixelfed/"
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;" nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
database_instance: "pixelfed"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{pixelfed_database_password}}"

View File

@ -11,19 +11,34 @@ services:
ports: ports:
- "127.0.0.1:{{http_port}}:80" - "127.0.0.1:{{http_port}}:80"
environment: environment:
WORDPRESS_DB_HOST: "{{database_host}}:3306" WORDPRESS_DB_HOST: database:3306
WORDPRESS_DB_USER: "{{database_username}}" WORDPRESS_DB_USER: "wordpress"
WORDPRESS_DB_PASSWORD: "{{database_password}}" WORDPRESS_DB_PASSWORD: "{{wordpress_database_password}}"
WORDPRESS_DB_NAME: "{{database_databasename}}" WORDPRESS_DB_NAME: "wordpress"
links: links:
- database - database
volumes: volumes:
- data:/var/www/html - data:/var/www/html
depends_on: depends_on:
- database - database
database:
{% include 'templates/docker-mariadb-service.yml.j2' %} logging:
driver: journald
image: mariadb
restart: always
environment:
MYSQL_DATABASE: "wordpress"
MYSQL_USER: "wordpress"
MYSQL_PASSWORD: "{{wordpress_database_password}}"
MYSQL_ROOT_PASSWORD: "{{wordpress_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mariadb --user=wordpress --password={{wordpress_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
volumes: volumes:
database: database:
data: data:

View File

@ -1,7 +1,2 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}wordpress/" docker_compose_instance_directory: "{{path_docker_compose_instances}}wordpress/"
wordpress_max_upload_size: "64M" wordpress_max_upload_size: "64M"
database_instance: "wordpress"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{wordpress_database_password}}"

View File

@ -1,6 +1 @@
docker_compose_instance_directory: "{{path_docker_compose_instances}}yourls/" docker_compose_instance_directory: "{{path_docker_compose_instances}}yourls/"
database_instance: "yourls"
database_host: "database"
database_databasename: "{{database_instance}}"
database_username: "{{database_instance}}"
database_password: "{{yourls_database_password}}"

View File

@ -1,18 +0,0 @@
database:
logging:
driver: journald
image: mariadb
restart: always
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
healthcheck:
test: "/usr/bin/mariadb --user={{database_username}} --password={{database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5