mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-24 13:41:03 +01:00
Compare commits
No commits in common. "f6652ad51cad039be284841822c1ecb6f1b212d8" and "2fe38a4059f799629a5bb2eb6f55a60d4038c903" have entirely different histories.
f6652ad51c
...
2fe38a4059
@ -1,18 +1,19 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
|
|
||||||
|
- name: Create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "include tasks update-repository-with-docker-compose.yml"
|
- name: "include tasks update-repository-with-docker-compose.yml"
|
||||||
include_tasks: update-repository-with-docker-compose.yml
|
include_tasks: update-repository-with-docker-compose.yml
|
||||||
|
|
||||||
|
- name: configure db.env
|
||||||
|
template: src=db.env.j2 dest={{docker_compose_instance_directory}}/env/db.env
|
||||||
|
notify: docker compose project setup
|
||||||
|
|
||||||
- name: configure run.env
|
- name: configure run.env
|
||||||
template: src=run.env.j2 dest={{docker_compose_instance_directory}}/env/run.env
|
template: src=run.env.j2 dest={{docker_compose_instance_directory}}/env/run.env
|
||||||
notify: docker compose project setup
|
notify: docker compose project setup
|
||||||
|
9
roles/docker-akaunting/templates/db.env.j2
Normal file
9
roles/docker-akaunting/templates/db.env.j2
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# These could be changed
|
||||||
|
MYSQL_DATABASE={{database_databasename}}
|
||||||
|
MYSQL_USER={{database_username}}
|
||||||
|
|
||||||
|
# This should definitely be changed to something long and random
|
||||||
|
MYSQL_PASSWORD={{database_password}}
|
||||||
|
|
||||||
|
# You should probably leave this
|
||||||
|
MYSQL_ROOT_PASSWORD={{database_password}}
|
@ -1,9 +1,6 @@
|
|||||||
version: '3.7'
|
version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
image: docker.io/akaunting/akaunting:{{version_akaunting}}
|
image: docker.io/akaunting/akaunting:{{version_akaunting}}
|
||||||
build:
|
build:
|
||||||
@ -17,10 +14,15 @@ services:
|
|||||||
- env/run.env
|
- env/run.env
|
||||||
environment:
|
environment:
|
||||||
- AKAUNTING_SETUP
|
- AKAUNTING_SETUP
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
|
- database
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
volumes:
|
||||||
data:
|
data:
|
||||||
|
{% if not enable_central_database %}
|
||||||
{% include 'templates/docker-compose-networks.yml.j2' %}
|
database:
|
||||||
|
{% endif %}
|
@ -3,12 +3,12 @@ APP_URL=https://{{domain}}
|
|||||||
LOCALE=en-US
|
LOCALE=en-US
|
||||||
|
|
||||||
# Don't change this unless you rename your database container or use rootless podman, in case of using rootless podman you should set it to 127.0.0.1 (NOT localhost)
|
# Don't change this unless you rename your database container or use rootless podman, in case of using rootless podman you should set it to 127.0.0.1 (NOT localhost)
|
||||||
DB_HOST={{database_host}}
|
DB_HOST=akaunting-db
|
||||||
|
|
||||||
# Change these to match env/db.env
|
# Change these to match env/db.env
|
||||||
DB_DATABASE={{database_databasename}}
|
DB_DATABASE=akaunting
|
||||||
DB_USERNAME={{database_username}}
|
DB_USERNAME=admin
|
||||||
DB_PASSWORD={{database_password}}
|
DB_PASSWORD={{akaunting_database_password}}
|
||||||
|
|
||||||
# You should change this to a random string of three numbers or letters followed by an underscore
|
# You should change this to a random string of three numbers or letters followed by an underscore
|
||||||
DB_PREFIX=asd_
|
DB_PREFIX=asd_
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
docker_compose_project_name: "akaunting"
|
docker_compose_project_name: "akaunting"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
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/{{docker_compose_project_name}}-docker-compose-backup.yml"
|
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml"
|
||||||
database_type: "mariadb"
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "admin"
|
||||||
database_password: "{{akaunting_database_password}}"
|
database_password: "{{akaunting_database_password}}"
|
||||||
repository_address: "https://github.com/akaunting/docker.git"
|
repository_address: "https://github.com/akaunting/docker.git"
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: receive {{ mail_interface_domain }} certificate
|
- name: receive {{ mail_interface_domain }} certificate
|
||||||
command: certbot certonly --agree-tos --email {{ administrator_email }} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{ mail_interface_domain }}
|
command: certbot certonly --agree-tos --email {{ administrator_email }} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{ mail_interface_domain }}
|
||||||
|
|
||||||
@ -19,5 +11,10 @@
|
|||||||
dest: "{{nginx_servers_directory}}{{domain}}.conf"
|
dest: "{{nginx_servers_directory}}{{domain}}.conf"
|
||||||
notify: restart nginx
|
notify: restart nginx
|
||||||
|
|
||||||
|
- name: Create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "include tasks update-repository-with-docker-compose.yml"
|
- name: "include tasks update-repository-with-docker-compose.yml"
|
||||||
include_tasks: update-repository-with-docker-compose.yml
|
include_tasks: update-repository-with-docker-compose.yml
|
@ -4,39 +4,47 @@ services:
|
|||||||
image: attendize_web:latest
|
image: attendize_web:latest
|
||||||
ports:
|
ports:
|
||||||
- "{{http_port}}:80"
|
- "{{http_port}}:80"
|
||||||
|
#- "8081:443"
|
||||||
volumes:
|
volumes:
|
||||||
- .:/usr/share/nginx/html
|
- .:/usr/share/nginx/html
|
||||||
- .:/var/www
|
- .:/var/www
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
maildev:
|
{% if not enable_central_database %}
|
||||||
redis:
|
- database
|
||||||
worker:
|
{% endif %}
|
||||||
|
- maildev
|
||||||
|
- redis
|
||||||
|
- worker
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
image: attendize_worker:latest
|
image: attendize_worker:latest
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
maildev:
|
{% if not enable_central_database %}
|
||||||
redis:
|
- database
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
{% endif %}
|
||||||
|
- maildev
|
||||||
|
- redis
|
||||||
volumes:
|
volumes:
|
||||||
- .:/usr/share/nginx/html
|
- .:/usr/share/nginx/html
|
||||||
- .:/var/www
|
- .:/var/www
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
|
||||||
|
|
||||||
maildev:
|
maildev:
|
||||||
image: maildev/maildev
|
image: maildev/maildev
|
||||||
ports:
|
ports:
|
||||||
- "{{ mail_interface_http_port }}:1080"
|
- "{{ mail_interface_http_port }}:1080"
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker-service-redis.yml.j2' %}
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
depends_on:
|
||||||
|
- database
|
||||||
|
|
||||||
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
volumes:
|
||||||
redis:
|
redis:
|
||||||
|
{% if not enable_central_database %}
|
||||||
{% include 'templates/docker-compose-networks.yml.j2' %}
|
database:
|
||||||
|
{% endif %}
|
@ -1,8 +1,11 @@
|
|||||||
---
|
---
|
||||||
docker_compose_project_name: "attendize"
|
docker_compose_project_name: "attendize"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
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/{{docker_compose_project_name}}-docker-compose-backup.yml"
|
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml"
|
||||||
mail_interface_domain: "mail.{{domain}}"
|
mail_interface_domain: "mail.{{domain}}"
|
||||||
database_type: "mariadb"
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{attendize_database_password}}"
|
database_password: "{{attendize_database_password}}"
|
||||||
repository_address: "https://github.com/Attendize/Attendize.git"
|
repository_address: "https://github.com/Attendize/Attendize.git"
|
@ -1,12 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
|
|
||||||
|
@ -12,15 +12,5 @@ services:
|
|||||||
- data:/baserow/data
|
- data:/baserow/data
|
||||||
ports:
|
ports:
|
||||||
- "{{http_port}}:80"
|
- "{{http_port}}:80"
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
volumes:
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker-service-redis.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
|
||||||
data:
|
data:
|
||||||
redis:
|
|
||||||
|
|
||||||
{% include 'templates/docker-compose-networks.yml.j2' %}
|
|
@ -8,13 +8,3 @@ EMAIL_SMTP_PORT={{ system_email_smtp_port }}
|
|||||||
EMAIL_SMTP_USER={{ system_email_username }}
|
EMAIL_SMTP_USER={{ system_email_username }}
|
||||||
EMAIL_SMTP_PASSWORD={{ system_email_password }}
|
EMAIL_SMTP_PASSWORD={{ system_email_password }}
|
||||||
EMAIL_SMTP_USE_TLS={{ system_email_tls | upper }}
|
EMAIL_SMTP_USE_TLS={{ system_email_tls | upper }}
|
||||||
|
|
||||||
DATABASE_USER={{ database_username }}
|
|
||||||
DATABASE_NAME={{ database_databasename }}
|
|
||||||
DATABASE_HOST={{ database_host }}
|
|
||||||
DATABASE_PORT=5432
|
|
||||||
DATABASE_PASSWORD={{ database_password }}
|
|
||||||
|
|
||||||
REDIS_HOST=redis
|
|
||||||
REDIS_PORT=6379
|
|
||||||
REDIS_PASSWORD=
|
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
docker_compose_project_name: "baserow"
|
docker_compose_project_name: "baserow"
|
||||||
database_password: "{{ baserow_database_password }}"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
database_version: "{{ baserow_database_version | default(postgres_default_version) }}"
|
|
||||||
database_type: "postgres"
|
|
@ -1,6 +1,6 @@
|
|||||||
docker_compose_project_name: "bigbluebutton"
|
docker_compose_project_name: "bigbluebutton"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
database_host: "postgres"
|
database_host: "postgres"
|
||||||
database_databasename: "greenlight-v3"
|
database_databasename: "greenlight-v3"
|
||||||
database_username: "postgres"
|
database_username: "postgres"
|
||||||
database_password: ""
|
database_password: ""
|
@ -1,12 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
loop: "{{ domains }}"
|
loop: "{{ domains }}"
|
||||||
|
@ -63,21 +63,13 @@ env:
|
|||||||
## TODO: The SMTP mail server used to validate new accounts and send notifications
|
## TODO: The SMTP mail server used to validate new accounts and send notifications
|
||||||
# SMTP ADDRESS, username, and password are required
|
# SMTP ADDRESS, username, and password are required
|
||||||
# WARNING the char '#' in SMTP password can cause problems!
|
# WARNING the char '#' in SMTP password can cause problems!
|
||||||
DISCOURSE_SMTP_ADDRESS: {{ system_email_host }}
|
DISCOURSE_SMTP_ADDRESS: {{system_email_host}}
|
||||||
DISCOURSE_SMTP_PORT: {{ system_email_smtp_port }}
|
DISCOURSE_SMTP_PORT: {{system_email_smtp_port}}
|
||||||
DISCOURSE_SMTP_USER_NAME: {{ system_email }}
|
DISCOURSE_SMTP_USER_NAME: {{system_email}}
|
||||||
DISCOURSE_SMTP_PASSWORD: {{ system_email_password }}
|
DISCOURSE_SMTP_PASSWORD: {{system_email_password}}
|
||||||
DISCOURSE_SMTP_ENABLE_START_TLS: {{ system_email_start_tls | upper }}
|
DISCOURSE_SMTP_ENABLE_START_TLS: {{ system_email_start_tls | upper }}
|
||||||
DISCOURSE_SMTP_DOMAIN: {{ system_email_domain }}
|
DISCOURSE_SMTP_DOMAIN: {{system_email_domain}}
|
||||||
DISCOURSE_NOTIFICATION_EMAIL: {{ system_email }}
|
DISCOURSE_NOTIFICATION_EMAIL: {{system_email}}
|
||||||
|
|
||||||
{% if enable_central_database %}
|
|
||||||
# Database Configuration
|
|
||||||
DISCOURSE_DB_USERNAME: {{ database_username }}
|
|
||||||
DISCOURSE_DB_PASSWORD: {{ database_password }}
|
|
||||||
DISCOURSE_DB_HOST: {{ database_host }}
|
|
||||||
DISCOURSE_DB_NAME: {{ database_databasename }}
|
|
||||||
{% if enable_central_database %}
|
|
||||||
|
|
||||||
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
|
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
|
||||||
#LETSENCRYPT_ACCOUNT_EMAIL: administrator@veen.world
|
#LETSENCRYPT_ACCOUNT_EMAIL: administrator@veen.world
|
||||||
@ -93,7 +85,7 @@ env:
|
|||||||
## The Docker container is stateless; all data is stored in /shared
|
## The Docker container is stateless; all data is stored in /shared
|
||||||
volumes:
|
volumes:
|
||||||
- volume:
|
- volume:
|
||||||
host: discourse_data
|
host: discourse_application_data
|
||||||
guest: /shared
|
guest: /shared
|
||||||
- volume:
|
- volume:
|
||||||
host: /var/discourse/shared/standalone/log/var-log
|
host: /var/discourse/shared/standalone/log/var-log
|
||||||
|
@ -1,4 +1 @@
|
|||||||
docker_compose_project_name: "attendize"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}discourse/"
|
||||||
database_password: "{{ baserow_database_password }}"
|
|
||||||
database_version: "{{ baserow_database_version | default(postgres_default_version) }}"
|
|
||||||
database_type: "postgres"
|
|
||||||
|
@ -23,6 +23,8 @@ services:
|
|||||||
# Use single node discovery in order to disable production mode and avoid bootstrap checks.
|
# Use single node discovery in order to disable production mode and avoid bootstrap checks.
|
||||||
# see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
|
# see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
|
||||||
discovery.type: single-node
|
discovery.type: single-node
|
||||||
|
networks:
|
||||||
|
- elk
|
||||||
|
|
||||||
logstash:
|
logstash:
|
||||||
build:
|
build:
|
||||||
@ -45,6 +47,8 @@ services:
|
|||||||
- "9600:9600"
|
- "9600:9600"
|
||||||
environment:
|
environment:
|
||||||
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
|
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
|
||||||
|
networks:
|
||||||
|
- elk
|
||||||
depends_on:
|
depends_on:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
|
|
||||||
@ -60,8 +64,14 @@ services:
|
|||||||
read_only: true
|
read_only: true
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{ http_port }}:5601"
|
- "127.0.0.1:{{ http_port }}:5601"
|
||||||
|
networks:
|
||||||
|
- elk
|
||||||
depends_on:
|
depends_on:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
|
|
||||||
|
networks:
|
||||||
|
elk:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
|
|
||||||
|
- name: Create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -2,7 +2,7 @@ version: "3"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
{% include 'templates/docker-service-redis.yml.j2' %}
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
|
|
||||||
env_file: .env
|
env_file: .env
|
||||||
|
|
||||||
@ -10,7 +10,9 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||||
depends_on:
|
depends_on:
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
- postgres
|
||||||
|
% endif %}
|
||||||
- redis
|
- redis
|
||||||
env_file: .env
|
env_file: .env
|
||||||
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0}
|
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0}
|
||||||
@ -18,24 +20,23 @@ services:
|
|||||||
- C_FORCE_ROOT=true
|
- C_FORCE_ROOT=true
|
||||||
volumes:
|
volumes:
|
||||||
- "data:${MEDIA_ROOT}"
|
- "data:${MEDIA_ROOT}"
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
|
|
||||||
celerybeat:
|
celerybeat:
|
||||||
restart: always
|
restart: always
|
||||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||||
depends_on:
|
depends_on:
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
- postgres
|
||||||
|
% endif %}
|
||||||
- redis
|
- redis
|
||||||
env_file: .env
|
env_file: .env
|
||||||
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
api:
|
api:
|
||||||
restart: always
|
restart: always
|
||||||
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||||
depends_on:
|
depends_on:
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
env_file: .env
|
env_file: .env
|
||||||
volumes:
|
volumes:
|
||||||
@ -43,7 +44,6 @@ services:
|
|||||||
#- "${STATIC_ROOT}:${STATIC_ROOT}"
|
#- "${STATIC_ROOT}:${STATIC_ROOT}"
|
||||||
ports:
|
ports:
|
||||||
- "5000"
|
- "5000"
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
front:
|
front:
|
||||||
restart: always
|
restart: always
|
||||||
@ -61,12 +61,15 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
# override those variables in your .env file if needed
|
# override those variables in your .env file if needed
|
||||||
- "${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}:80"
|
- "${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}:80"
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
{% include 'templates/docker-postgres-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
volumes:
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
|
|
||||||
{% include 'templates/docker-compose-networks.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
@ -1,5 +1,7 @@
|
|||||||
docker_compose_project_name: "funkwhale"
|
docker_compose_project_name: "funkwhale"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
|
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{funkwhale_database_password}}"
|
database_password: "{{funkwhale_database_password}}"
|
||||||
database_version: "{{ funkwhale_database_version | default(postgres_default_version) }}"
|
database_version: "{{ funkwhale_database_version | default(postgres_default_version) }}"
|
||||||
database_type: "postgres"
|
|
@ -1,15 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
|
|
||||||
|
- name: create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -27,10 +27,18 @@ services:
|
|||||||
- data:/data
|
- data:/data
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
|
- database
|
||||||
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
volumes:
|
||||||
data:
|
data:
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker-compose-networks.yml.j2' %}
|
networks:
|
||||||
|
default:
|
||||||
|
driver: bridge
|
@ -1,3 +1,6 @@
|
|||||||
docker_compose_project_name: "gitea"
|
docker_compose_project_name: "gitea"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{gitea_database_password}}"
|
database_password: "{{gitea_database_password}}"
|
||||||
database_type: "mariadb"
|
|
@ -1,15 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
|
|
||||||
|
- name: create database in central Postgres
|
||||||
|
include_role:
|
||||||
|
name: docker-postgres
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -39,12 +39,17 @@ services:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
redis:
|
redis:
|
||||||
|
|
||||||
{% include 'templates/docker-service-redis.yml.j2' %}
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
{% include 'templates/docker-postgres-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
volumes:
|
||||||
redis:
|
redis:
|
||||||
config:
|
config:
|
||||||
logs:
|
logs:
|
||||||
data:
|
data:
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
docker_compose_project_name: "gitlab"
|
docker_compose_project_name: "gitlab"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{gitlab_database_password}}"
|
database_password: "{{gitlab_database_password}}"
|
||||||
database_version: "{{ gitlab_database_version | default(postgres_default_version) }}"
|
database_version: "{{ gitlab_database_version | default(postgres_default_version) }}"
|
||||||
database_type: "postgres"
|
|
@ -1,18 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
loop: "{{ domains }}"
|
loop: "{{ domains }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: domain
|
loop_var: domain
|
||||||
|
|
||||||
|
- name: create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -11,19 +11,21 @@ services:
|
|||||||
JOOMLA_DB_PASSWORD: "{{database_password}}"
|
JOOMLA_DB_PASSWORD: "{{database_password}}"
|
||||||
JOOMLA_DB_NAME: "{{database_databasename}}"
|
JOOMLA_DB_NAME: "{{database_databasename}}"
|
||||||
restart: always
|
restart: always
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
depends_on:
|
||||||
|
- database
|
||||||
|
{% endif %}
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{http_port}}:80"
|
- "127.0.0.1:{{http_port}}:80"
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
{% if enable_central_database %}
|
|
||||||
depends_on:
|
|
||||||
database:
|
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
volumes:
|
||||||
data:
|
data:
|
||||||
|
{% if not enable_central_database %}
|
||||||
{% include 'templates/docker-compose-networks.yml.j2' %}
|
database:
|
||||||
|
{% endif %}
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
docker_compose_project_name: "joomla"
|
docker_compose_project_name: "joomla"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{joomla_database_password}}"
|
database_password: "{{joomla_database_password}}"
|
||||||
database_type: "postgres"
|
|
@ -1,15 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
|
|
||||||
|
- name: create database in central Postgres
|
||||||
|
include_role:
|
||||||
|
name: docker-postgres
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -11,9 +11,13 @@ services:
|
|||||||
- TZ=Etc/UTC
|
- TZ=Etc/UTC
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.toml:/listmonk/config.toml
|
- ./config.toml:/listmonk/config.toml
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
depends_on:
|
||||||
|
- database
|
||||||
|
|
||||||
{% include 'templates/docker-compose-networks.yml.j2' %}
|
{% include 'templates/docker-postgres-service.yml.j2' %}
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
database:
|
||||||
|
{% endif %}
|
@ -1,4 +1,7 @@
|
|||||||
docker_compose_project_name: "listmonk"
|
docker_compose_project_name: "listmonk"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{listmonk_database_password}}"
|
database_password: "{{listmonk_database_password}}"
|
||||||
database_version: "{{ listmonk_database_version | default(postgres_default_version) }}"
|
database_version: "{{ listmonk_database_version | default(postgres_default_version) }}"
|
||||||
database_type: "postgres"
|
|
@ -1,12 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
vars:
|
vars:
|
||||||
@ -36,6 +28,11 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
|
- name: create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template:
|
template:
|
||||||
src: "docker-compose.yml.j2"
|
src: "docker-compose.yml.j2"
|
||||||
|
@ -2,9 +2,20 @@ version: '2.2'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
{% include 'templates/docker-service-redis.yml.j2' %}
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
|
env_file: mailu.env
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
depends_on:
|
||||||
|
- resolver
|
||||||
|
dns:
|
||||||
|
- 192.168.203.254
|
||||||
|
depends_on:
|
||||||
|
- resolver
|
||||||
|
dns:
|
||||||
|
- 192.168.203.254
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- webmail
|
||||||
|
- radicale
|
||||||
|
|
||||||
# Core services
|
# Core services
|
||||||
resolver:
|
resolver:
|
||||||
@ -14,10 +25,6 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
ipv4_address: 192.168.203.254
|
ipv4_address: 192.168.203.254
|
||||||
{{docker_compose_project_name}}_network:
|
|
||||||
{% if enable_central_database %}
|
|
||||||
central_{{ database_type }}_network:
|
|
||||||
{% endif %}
|
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
|
|
||||||
@ -46,10 +53,10 @@ services:
|
|||||||
database:
|
database:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
networks:
|
||||||
default:
|
- default
|
||||||
webmail:
|
- webmail
|
||||||
radicale:
|
- radicale
|
||||||
dns:
|
dns:
|
||||||
- 192.168.203.254
|
- 192.168.203.254
|
||||||
|
|
||||||
@ -61,16 +68,16 @@ services:
|
|||||||
- "admin_data:/data"
|
- "admin_data:/data"
|
||||||
- "dkim:/dkim"
|
- "dkim:/dkim"
|
||||||
depends_on:
|
depends_on:
|
||||||
resolver:
|
- resolver
|
||||||
front:
|
- front
|
||||||
redis:
|
- redis
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
- database
|
||||||
|
{% endif %}
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
dns:
|
dns:
|
||||||
- 192.168.203.254
|
- 192.168.203.254
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
imap:
|
imap:
|
||||||
image: ghcr.io/mailu/dovecot:{{version_mailu}}
|
image: ghcr.io/mailu/dovecot:{{version_mailu}}
|
||||||
restart: always
|
restart: always
|
||||||
@ -85,7 +92,6 @@ services:
|
|||||||
- 192.168.203.254
|
- 192.168.203.254
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
smtp:
|
smtp:
|
||||||
image: ghcr.io/mailu/postfix:{{version_mailu}}
|
image: ghcr.io/mailu/postfix:{{version_mailu}}
|
||||||
@ -101,7 +107,6 @@ services:
|
|||||||
- 192.168.203.254
|
- 192.168.203.254
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
oletools:
|
oletools:
|
||||||
image: ghcr.io/mailu/oletools:{{version_mailu}}
|
image: ghcr.io/mailu/oletools:{{version_mailu}}
|
||||||
@ -111,8 +116,8 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- 192.168.203.254
|
- 192.168.203.254
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
networks:
|
||||||
noinet:
|
- noinet
|
||||||
|
|
||||||
antispam:
|
antispam:
|
||||||
image: ghcr.io/mailu/rspamd:{{version_mailu}}
|
image: ghcr.io/mailu/rspamd:{{version_mailu}}
|
||||||
@ -129,12 +134,11 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- 192.168.203.254
|
- 192.168.203.254
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- noinet
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
default:
|
|
||||||
noinet:
|
|
||||||
|
|
||||||
|
|
||||||
# Optional services
|
# Optional services
|
||||||
antivirus:
|
antivirus:
|
||||||
@ -149,7 +153,6 @@ services:
|
|||||||
- 192.168.203.254
|
- 192.168.203.254
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
webdav:
|
webdav:
|
||||||
image: ghcr.io/mailu/radicale:{{version_mailu}}
|
image: ghcr.io/mailu/radicale:{{version_mailu}}
|
||||||
@ -165,7 +168,6 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- 192.168.203.254
|
- 192.168.203.254
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
fetchmail:
|
fetchmail:
|
||||||
image: ghcr.io/mailu/fetchmail:{{version_mailu}}
|
image: ghcr.io/mailu/fetchmail:{{version_mailu}}
|
||||||
@ -182,7 +184,6 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
dns:
|
dns:
|
||||||
- 192.168.203.254
|
- 192.168.203.254
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
webmail:
|
webmail:
|
||||||
image: ghcr.io/mailu/webmail:{{version_mailu}}
|
image: ghcr.io/mailu/webmail:{{version_mailu}}
|
||||||
@ -197,13 +198,18 @@ services:
|
|||||||
- resolver
|
- resolver
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
|
networks:
|
||||||
|
- webmail
|
||||||
dns:
|
dns:
|
||||||
- 192.168.203.254
|
- 192.168.203.254
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
webmail:
|
{% include 'templates/docker-postgres-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
smtp_queue:
|
smtp_queue:
|
||||||
admin_data:
|
admin_data:
|
||||||
webdav_data:
|
webdav_data:
|
||||||
@ -212,8 +218,7 @@ volumes:
|
|||||||
dkim:
|
dkim:
|
||||||
dovecot_mail:
|
dovecot_mail:
|
||||||
redis:
|
redis:
|
||||||
|
networks:
|
||||||
{% include 'templates/docker-compose-networks.yml.j2' %}
|
|
||||||
default:
|
default:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
ipam:
|
ipam:
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
- name: Create Docker network for MariaDB
|
- name: Create Docker network for MariaDB
|
||||||
docker_network:
|
docker_network:
|
||||||
name: central_mariadb_network
|
name: mariadb_network
|
||||||
state: present
|
state: present
|
||||||
when: run_once_docker_mariadb is not defined
|
when: run_once_docker_mariadb is not defined
|
||||||
|
|
||||||
- name: install MariaDB
|
- name: install MariaDB
|
||||||
docker_container:
|
docker_container:
|
||||||
name: central-mariadb
|
name: mariadb
|
||||||
image: mariadb:latest #could lead to problems with nextcloud
|
image: mariadb:latest #could lead to problems with nextcloud
|
||||||
detach: yes
|
detach: yes
|
||||||
env:
|
env:
|
||||||
MARIADB_ROOT_PASSWORD: "{{central_mariadb_root_password}}"
|
MARIADB_ROOT_PASSWORD: "{{central_mariadb_root_password}}"
|
||||||
MARIADB_AUTO_UPGRADE: "1"
|
MARIADB_AUTO_UPGRADE: "1"
|
||||||
networks:
|
networks:
|
||||||
- name: central_mariadb_network
|
- name: mariadb_network
|
||||||
volumes:
|
|
||||||
- database:/var/lib/mysql
|
|
||||||
published_ports:
|
published_ports:
|
||||||
- "127.0.0.1:3306:3306"
|
- "127.0.0.1:3306:3306"
|
||||||
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud
|
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW" #for nextcloud
|
||||||
|
@ -1,18 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include create-domains.yml"
|
- name: "include create-domains.yml"
|
||||||
include_tasks: create-domains.yml
|
include_tasks: create-domains.yml
|
||||||
loop: "{{ domains }}"
|
loop: "{{ domains }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: domain
|
loop_var: domain
|
||||||
|
|
||||||
|
- name: create database in central Postgres
|
||||||
|
include_role:
|
||||||
|
name: docker-postgres
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -10,11 +10,9 @@ DB_PORT=5432
|
|||||||
DB_NAME={{database_databasename}}
|
DB_NAME={{database_databasename}}
|
||||||
DB_USER={{database_username}}
|
DB_USER={{database_username}}
|
||||||
DB_PASS={{database_password}}
|
DB_PASS={{database_password}}
|
||||||
|
|
||||||
REDIS_HOST=redis
|
REDIS_HOST=redis
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
REDIS_PASSWORD=
|
REDIS_PASSWORD=
|
||||||
|
|
||||||
SMTP_SERVER={{system_email_host}}
|
SMTP_SERVER={{system_email_host}}
|
||||||
SMTP_PORT={{system_email_smtp_port}}
|
SMTP_PORT={{system_email_smtp_port}}
|
||||||
SMTP_LOGIN={{system_email_username}}
|
SMTP_LOGIN={{system_email_username}}
|
||||||
|
@ -1,64 +1,83 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
{% include 'templates/docker-service-redis.yml.j2' %}
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
networks:
|
||||||
|
- internal_network
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: tootsuite/mastodon:{{version_mastodon}}
|
image: tootsuite/mastodon:{{version_mastodon}}
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
||||||
|
networks:
|
||||||
|
- external_network
|
||||||
|
- internal_network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
# prettier-ignore
|
||||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{http_port}}:3000"
|
- "127.0.0.1:{{http_port}}:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
redis:
|
- database
|
||||||
condition: service_healthy
|
{% endif %}
|
||||||
|
- redis
|
||||||
volumes:
|
volumes:
|
||||||
- data:/mastodon/public/system
|
- data:/mastodon/public/system
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
streaming:
|
streaming:
|
||||||
image: tootsuite/mastodon:{{version_mastodon}}
|
image: tootsuite/mastodon:{{version_mastodon}}
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: node ./streaming
|
command: node ./streaming
|
||||||
|
networks:
|
||||||
|
- external_network
|
||||||
|
- internal_network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
# prettier-ignore
|
||||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{stream_port}}:4000"
|
- "127.0.0.1:{{stream_port}}:4000"
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
redis:
|
{% if not enable_central_database %}
|
||||||
condition: service_healthy
|
- database
|
||||||
|
{% endif %}
|
||||||
|
- redis
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
|
||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
image: tootsuite/mastodon:{{version_mastodon}}
|
image: tootsuite/mastodon:{{version_mastodon}}
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: bundle exec sidekiq
|
command: bundle exec sidekiq
|
||||||
depends_on:
|
depends_on:
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
redis:
|
- database
|
||||||
condition: service_healthy
|
{% endif %}
|
||||||
|
- redis
|
||||||
|
networks:
|
||||||
|
- external_network
|
||||||
|
- internal_network
|
||||||
volumes:
|
volumes:
|
||||||
- data:/mastodon/public/system
|
- data:/mastodon/public/system
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
{% include 'templates/docker-postgres-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
volumes:
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
redis:
|
redis:
|
||||||
data:
|
data:
|
||||||
|
networks:
|
||||||
{% include 'templates/docker-compose-networks.yml.j2' %}
|
external_network:
|
||||||
|
internal_network:
|
||||||
|
internal: true
|
@ -1,4 +1,7 @@
|
|||||||
docker_compose_project_name: "mastodon"
|
docker_compose_project_name: "mastodon"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{mastodon_database_password}}"
|
database_password: "{{mastodon_database_password}}"
|
||||||
database_version: "{{ mastodon_database_version | default(postgres_default_version) }}"
|
database_version: "{{ mastodon_database_version | default(postgres_default_version) }}"
|
||||||
database_type: "postgres"
|
|
@ -1,15 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
|
|
||||||
|
- name: create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -19,9 +19,14 @@ services:
|
|||||||
{% if not enable_central_database %}
|
{% if not enable_central_database %}
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
volumes:
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
data:
|
data:
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
driver: bridge
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
---
|
---
|
||||||
docker_compose_project_name: "matomo"
|
docker_compose_project_name: "matomo"
|
||||||
database_type: "mariadb"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{matomo_database_password}}"
|
database_password: "{{matomo_database_password}}"
|
@ -1,18 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
vars:
|
vars:
|
||||||
domain: "{{synapse_domain}}"
|
domain: "{{synapse_domain}}"
|
||||||
http_port: "{{synapse_http_port}}"
|
http_port: "{{synapse_http_port}}"
|
||||||
|
|
||||||
|
- name: create database in central Postgres
|
||||||
|
include_role:
|
||||||
|
name: docker-postgres
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
vars:
|
vars:
|
||||||
|
@ -19,7 +19,7 @@ services:
|
|||||||
{% if not enable_central_database %}
|
{% if not enable_central_database %}
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% include 'templates/docker-postgres-service.yml.j2' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
element:
|
element:
|
||||||
@ -59,9 +59,15 @@ services:
|
|||||||
# volumes:
|
# volumes:
|
||||||
# - instagram_bridge_data:/data
|
# - instagram_bridge_data:/data
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
volumes:
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
synapse_data:
|
synapse_data:
|
||||||
#telegram_bridge_data:
|
#telegram_bridge_data:
|
||||||
#whatsapp_bridge_data:
|
#whatsapp_bridge_data:
|
||||||
#facebook_bridge_data:
|
#facebook_bridge_data:
|
||||||
#instagram_bridge_data:
|
#instagram_bridge_data:
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
driver: bridge
|
@ -1,5 +1,7 @@
|
|||||||
---
|
---
|
||||||
docker_compose_project_name: "matrix"
|
docker_compose_project_name: "matrix"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{matrix_database_password}}"
|
database_password: "{{matrix_database_password}}"
|
||||||
database_version: "{{ baserow_database_version | default(postgres_default_version) }}"
|
|
||||||
database_type: "postgres"
|
|
@ -1,18 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks create-proxy-with-domain-replace.yml"
|
- name: "include tasks create-proxy-with-domain-replace.yml"
|
||||||
include_tasks: create-proxy-with-domain-replace.yml
|
include_tasks: create-proxy-with-domain-replace.yml
|
||||||
loop: "{{ domains + [source_domain] }}"
|
loop: "{{ domains + [source_domain] }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: domain
|
loop_var: domain
|
||||||
|
|
||||||
|
- name: create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_confd_directory}} and parent directories"
|
- name: "create {{docker_compose_instance_confd_directory}} and parent directories"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_confd_directory}}"
|
path: "{{docker_compose_instance_confd_directory}}"
|
||||||
|
@ -26,7 +26,15 @@ services:
|
|||||||
- "{{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"
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
volumes:
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
data:
|
data:
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
driver: bridge
|
@ -1,8 +1,11 @@
|
|||||||
---
|
---
|
||||||
docker_compose_project_name: "mybb"
|
docker_compose_project_name: "mybb"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
docker_compose_instance_confd_directory: "{{docker_compose_instance_directory}}conf.d/"
|
docker_compose_instance_confd_directory: "{{docker_compose_instance_directory}}conf.d/"
|
||||||
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_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{mybb_database_password}}"
|
database_password: "{{mybb_database_password}}"
|
||||||
database_type: "mariadb"
|
|
@ -1,12 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include task certbot-matomo.yml"
|
- name: "include task certbot-matomo.yml"
|
||||||
include_tasks: certbot-matomo.yml
|
include_tasks: certbot-matomo.yml
|
||||||
|
|
||||||
@ -28,6 +20,11 @@
|
|||||||
dest: "{{path_docker_volumes}}nextcloud/nginx.conf"
|
dest: "{{path_docker_volumes}}nextcloud/nginx.conf"
|
||||||
notify: docker compose project setup
|
notify: docker compose project setup
|
||||||
|
|
||||||
|
- name: create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -17,7 +17,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
web:
|
web:
|
||||||
@ -34,7 +34,7 @@ services:
|
|||||||
volumes_from:
|
volumes_from:
|
||||||
- application
|
- application
|
||||||
|
|
||||||
{% include 'templates/docker-service-redis.yml.j2' %}
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
|
|
||||||
cron:
|
cron:
|
||||||
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
|
||||||
@ -44,9 +44,17 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- data:/var/www/html
|
||||||
entrypoint: /cron.sh
|
entrypoint: /cron.sh
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
redis:
|
{% if not enable_central_database %}
|
||||||
|
- database
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
{% endif %}
|
||||||
|
- redis
|
||||||
|
volumes:
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
driver: bridge
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
---
|
---
|
||||||
docker_compose_project_name: "nextcloud"
|
docker_compose_project_name: "nextcloud"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{nextcloud_database_password}}"
|
database_password: "{{nextcloud_database_password}}"
|
||||||
database_type: "mariadb"
|
|
@ -1,15 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
|
|
||||||
|
- name: create database in central Postgres
|
||||||
|
include_role:
|
||||||
|
name: docker-postgres
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "include tasks update-repository-with-docker-compose.yml"
|
- name: "include tasks update-repository-with-docker-compose.yml"
|
||||||
include_tasks: update-repository-with-docker-compose.yml
|
include_tasks: update-repository-with-docker-compose.yml
|
||||||
|
|
||||||
|
@ -4,7 +4,10 @@ networks:
|
|||||||
frontend:
|
frontend:
|
||||||
backend:
|
backend:
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
volumes:
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
data:
|
data:
|
||||||
|
|
||||||
x-op-restart-policy: &restart_policy
|
x-op-restart-policy: &restart_policy
|
||||||
@ -33,7 +36,9 @@ x-op-app: &app
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% if not enable_central_database %}
|
||||||
|
{% include 'templates/docker-postgres-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
@ -67,9 +72,12 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
cache:
|
{% if not enable_central_database %}
|
||||||
seeder:
|
- database
|
||||||
|
{% endif %}
|
||||||
|
- cache
|
||||||
|
- seeder
|
||||||
labels:
|
labels:
|
||||||
- autoheal=true
|
- autoheal=true
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@ -93,18 +101,24 @@ services:
|
|||||||
command: "./docker/prod/worker"
|
command: "./docker/prod/worker"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
cache:
|
{% if not enable_central_database %}
|
||||||
seeder:
|
- database
|
||||||
|
{% endif %}
|
||||||
|
- cache
|
||||||
|
- seeder
|
||||||
|
|
||||||
cron:
|
cron:
|
||||||
<<: *app
|
<<: *app
|
||||||
command: "./docker/prod/cron"
|
command: "./docker/prod/cron"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
cache:
|
{% if not enable_central_database %}
|
||||||
seeder:
|
- database
|
||||||
|
{% endif %}
|
||||||
|
- cache
|
||||||
|
- seeder
|
||||||
|
|
||||||
seeder:
|
seeder:
|
||||||
<<: *app
|
<<: *app
|
||||||
|
@ -3,7 +3,8 @@ repository_directory: "{{ path_docker_compose_instances }}{{docker
|
|||||||
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/{{docker_compose_project_name}}-docker-compose-backup.yml"
|
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "postgres"
|
||||||
database_password: "{{openproject_database_password}}"
|
database_password: "{{openproject_database_password}}"
|
||||||
repository_address: "https://github.com/opf/openproject-deploy"
|
repository_address: "https://github.com/opf/openproject-deploy"
|
||||||
database_version: "{{ openproject_database_version | default(postgres_default_version) }}"
|
|
||||||
database_type: "postgres"
|
|
@ -1,18 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include create-domains.yml"
|
- name: "include create-domains.yml"
|
||||||
include_tasks: create-domains.yml
|
include_tasks: create-domains.yml
|
||||||
loop: "{{ domains }}"
|
loop: "{{ domains }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: domain
|
loop_var: domain
|
||||||
|
|
||||||
|
- name: create database in central Postgres
|
||||||
|
include_role:
|
||||||
|
name: docker-postgres
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -18,16 +18,18 @@ services:
|
|||||||
{% if not enable_central_database %}
|
{% if not enable_central_database %}
|
||||||
- database
|
- database
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% include 'templates/docker-postgres-service.yml.j2' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker-service-redis.yml.j2' %}
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
volumes:
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
|
||||||
assets:
|
assets:
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
config:
|
config:
|
@ -1,3 +1,6 @@
|
|||||||
docker_compose_project_name: "peertube"
|
docker_compose_project_name: "peertube"
|
||||||
database_type: "mariadb"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{peertube_database_password}}"
|
database_password: "{{peertube_database_password}}"
|
@ -1,15 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
|
|
||||||
|
- name: create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker-service-redis.yml.j2' %}
|
|
||||||
|
|
||||||
application:
|
application:
|
||||||
image: zknt/pixelfed
|
image: zknt/pixelfed
|
||||||
restart: always
|
restart: always
|
||||||
@ -19,8 +14,11 @@ services:
|
|||||||
- "./env:/var/www/.env"
|
- "./env:/var/www/.env"
|
||||||
ports:
|
ports:
|
||||||
- "{{http_port}}:80"
|
- "{{http_port}}:80"
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
redis:
|
{% if not enable_central_database %}
|
||||||
|
- database
|
||||||
|
{% endif %}
|
||||||
|
- redis
|
||||||
worker:
|
worker:
|
||||||
image: zknt/pixelfed
|
image: zknt/pixelfed
|
||||||
restart: always
|
restart: always
|
||||||
@ -38,11 +36,22 @@ services:
|
|||||||
interval: 60s
|
interval: 60s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 1
|
retries: 1
|
||||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
depends_on:
|
||||||
redis:
|
- redis
|
||||||
application:
|
- application
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
- database
|
||||||
|
|
||||||
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
redis:
|
redis:
|
||||||
application_data:
|
application_data:
|
||||||
bootstrap:
|
bootstrap:
|
@ -1,4 +1,7 @@
|
|||||||
docker_compose_project_name: "pixelfed"
|
docker_compose_project_name: "pixelfed"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
|
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
|
||||||
database_type: "mariadb"
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{pixelfed_database_password}}"
|
database_password: "{{pixelfed_database_password}}"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
- name: Create Docker network for PostgreSQL
|
- name: Create Docker network for PostgreSQL
|
||||||
docker_network:
|
docker_network:
|
||||||
name: central_postgres_network
|
name: postgres_network
|
||||||
state: present
|
state: present
|
||||||
when: run_once_docker_postgres is not defined
|
when: run_once_docker_postgres is not defined
|
||||||
|
|
||||||
@ -13,7 +13,7 @@
|
|||||||
POSTGRES_PASSWORD: "{{ central_postgres_password }}"
|
POSTGRES_PASSWORD: "{{ central_postgres_password }}"
|
||||||
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C" # Necessary for docker-matrix
|
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C" # Necessary for docker-matrix
|
||||||
networks:
|
networks:
|
||||||
- name: central_postgres_network
|
- name: postgres_network
|
||||||
published_ports:
|
published_ports:
|
||||||
- "127.0.0.1:5432:5432"
|
- "127.0.0.1:5432:5432"
|
||||||
when: run_once_docker_postgres is not defined
|
when: run_once_docker_postgres is not defined
|
||||||
|
@ -1,11 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
@ -15,6 +8,11 @@
|
|||||||
vars:
|
vars:
|
||||||
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size {{wordpress_max_upload_size}};"
|
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size {{wordpress_max_upload_size}};"
|
||||||
|
|
||||||
|
- name: create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -21,8 +21,14 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
volumes:
|
||||||
|
{% if not enable_central_database %}
|
||||||
|
database:
|
||||||
|
{% endif %}
|
||||||
data:
|
data:
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
driver: bridge
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
docker_compose_project_name: "wordpress"
|
docker_compose_project_name: "wordpress"
|
||||||
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
wordpress_max_upload_size: "64M"
|
wordpress_max_upload_size: "64M"
|
||||||
database_type: "mariadb"
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{wordpress_database_password}}"
|
database_password: "{{wordpress_database_password}}"
|
@ -1,15 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: include docker vars
|
|
||||||
include_vars: vars/docker-database-service.yml.j2
|
|
||||||
|
|
||||||
- name: create central database
|
|
||||||
include_role:
|
|
||||||
name: docker-{{database_type}}
|
|
||||||
when: enable_central_database | bool
|
|
||||||
|
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
|
|
||||||
|
- name: create database in central MariaDB
|
||||||
|
include_role:
|
||||||
|
name: docker-mariadb
|
||||||
|
when: enable_central_database | bool
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
path: "{{docker_compose_instance_directory}}"
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
@ -20,8 +20,11 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
|
|
||||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
database:
|
database:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
driver: bridge
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
docker_compose_project_name: "yourls"
|
docker_compose_project_name: "yourls"
|
||||||
database_type: "mariadb"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
||||||
|
database_host: "database"
|
||||||
|
database_databasename: "{{docker_compose_project_name}}"
|
||||||
|
database_username: "{{docker_compose_project_name}}"
|
||||||
database_password: "{{yourls_database_password}}"
|
database_password: "{{yourls_database_password}}"
|
@ -1,6 +0,0 @@
|
|||||||
networks:
|
|
||||||
{% if enable_central_database %}
|
|
||||||
central_{{ database_type }}_network:
|
|
||||||
external: true
|
|
||||||
{% endif %}
|
|
||||||
{{docker_compose_project_name}}_network:
|
|
@ -1,4 +0,0 @@
|
|||||||
volumes:
|
|
||||||
{% if not enable_central_database %}
|
|
||||||
database:
|
|
||||||
{% endif %}
|
|
@ -1,5 +0,0 @@
|
|||||||
{% if enable_central_database %}
|
|
||||||
depends_on:
|
|
||||||
database:
|
|
||||||
condition: service_healthy
|
|
||||||
{% endif %}
|
|
@ -1,5 +0,0 @@
|
|||||||
networks:
|
|
||||||
- {{docker_compose_project_name}}_network
|
|
||||||
{% if enable_central_database %}
|
|
||||||
- central_{{ database_type }}_network
|
|
||||||
{% endif %}
|
|
@ -1,4 +1,3 @@
|
|||||||
{% if not enable_central_database %}
|
|
||||||
database:
|
database:
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
@ -18,6 +17,3 @@
|
|||||||
interval: 3s
|
interval: 3s
|
||||||
timeout: 1s
|
timeout: 1s
|
||||||
retries: 5
|
retries: 5
|
||||||
networks:
|
|
||||||
- {{docker_compose_project_name}}_network
|
|
||||||
{% endif %}
|
|
@ -1,4 +1,4 @@
|
|||||||
{% if not enable_central_database %}
|
|
||||||
database:
|
database:
|
||||||
image: postgres:{{database_version}}-alpine
|
image: postgres:{{database_version}}-alpine
|
||||||
environment:
|
environment:
|
||||||
@ -13,9 +13,6 @@
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 6
|
retries: 6
|
||||||
volumes:
|
volumes:
|
||||||
- type: volume
|
- type: volume
|
||||||
source: database
|
source: database
|
||||||
target: /var/lib/postgresql/data
|
target: /var/lib/postgresql/data
|
||||||
networks:
|
|
||||||
- {{docker_compose_project_name}}_network
|
|
||||||
{% endif %}
|
|
@ -10,5 +10,3 @@
|
|||||||
interval: 1s
|
interval: 1s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
retries: 30
|
retries: 30
|
||||||
networks:
|
|
||||||
- {{docker_compose_project_name}}_network
|
|
@ -1,4 +0,0 @@
|
|||||||
docker_compose_instance_directory: "{{ docker_compose_instance_directory | default(path_docker_compose_instances + docker_compose_project_name + '/') }}"
|
|
||||||
database_host: "{{ database_host | default('database') }}"
|
|
||||||
database_databasename: "{{ database_databasename | default(docker_compose_project_name) }}"
|
|
||||||
database_username: "{{ database_username | default(docker_compose_project_name) }}"
|
|
Loading…
Reference in New Issue
Block a user