mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-25 22:21:04 +01:00
Compare commits
No commits in common. "658e40098acfb8b9faf36fd03da8ef0275ac7a81" and "3581db27aa49f76a9256c093e0a0092fcea5e288" have entirely different histories.
658e40098a
...
3581db27aa
@ -43,10 +43,10 @@
|
|||||||
|
|
||||||
- name: seed database values
|
- name: seed database values
|
||||||
command:
|
command:
|
||||||
cmd: "python database_entry_seeder.py databases.csv {{docker_compose_project_name}} {{database_host}} {{database_databasename}} {{database_username}} {{database_password}}"
|
cmd: "python database_entry_seeder.py databases.csv {{database_instance}} {{database_host}} {{database_databasename}} {{database_username}} {{database_password}}"
|
||||||
chdir: "{{backup_docker_to_local_folder}}"
|
chdir: "{{backup_docker_to_local_folder}}"
|
||||||
when: >
|
when: >
|
||||||
docker_compose_project_name is defined or
|
database_instance is defined or
|
||||||
database_host is defined or
|
database_host is defined or
|
||||||
database_databasename is defined or
|
database_databasename is defined or
|
||||||
database_username is defined or
|
database_username is defined or
|
||||||
@ -59,7 +59,7 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
when: >
|
when: >
|
||||||
(docker_compose_project_name is defined or
|
(database_instance is defined or
|
||||||
database_host is defined or
|
database_host is defined or
|
||||||
database_databasename is defined or
|
database_databasename is defined or
|
||||||
database_username is defined or
|
database_username is defined or
|
||||||
|
@ -18,8 +18,6 @@ This guide details the process of setting up Akaunting, a free and online accoun
|
|||||||
|
|
||||||
## Installation Steps
|
## Installation Steps
|
||||||
|
|
||||||
@ATTENTION Variable ```#AKAUNTING_SETUP: true``` needs to be set
|
|
||||||
|
|
||||||
### New Manual Setup
|
### New Manual Setup
|
||||||
1. **Navigate to Docker Compose Directory**: Change to the directory containing your Docker Compose files for Akaunting.
|
1. **Navigate to Docker Compose Directory**: Change to the directory containing your Docker Compose files for Akaunting.
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
---
|
---
|
||||||
- name: docker compose project setup
|
- name: setup akaunting
|
||||||
command:
|
command:
|
||||||
cmd: docker-compose -p "{{docker_compose_project_name}}" up -d --force-recreate
|
cmd: docker-compose -p akaunting up -d --force-recreate
|
||||||
chdir: "{{docker_compose_instance_directory}}"
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
environment:
|
environment:
|
||||||
|
#AKAUNTING_SETUP: true
|
||||||
COMPOSE_HTTP_TIMEOUT: 600
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
DOCKER_CLIENT_TIMEOUT: 600
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -2,13 +2,43 @@
|
|||||||
- 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: "include tasks update-repository-with-docker-compose.yml"
|
- name: register directory
|
||||||
include_tasks: update-repository-with-docker-compose.yml
|
stat:
|
||||||
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
register: docker_compose_instance_directory_register
|
||||||
|
|
||||||
|
- name: checkout repository
|
||||||
|
ansible.builtin.shell: git checkout .
|
||||||
|
become: true
|
||||||
|
args:
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
when: docker_compose_instance_directory_register.stat.exists
|
||||||
|
|
||||||
|
- name: pull docker repository
|
||||||
|
git:
|
||||||
|
repo: "https://github.com/akaunting/docker.git"
|
||||||
|
dest: "{{docker_compose_instance_directory}}"
|
||||||
|
update: yes
|
||||||
|
notify: setup akaunting
|
||||||
|
become: true
|
||||||
|
register: git_result
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Warn if repo is not reachable
|
||||||
|
debug:
|
||||||
|
msg: "Warning: Repository is not reachable."
|
||||||
|
when: git_result.failed
|
||||||
|
|
||||||
|
- name: set akaunting version
|
||||||
|
ansible.builtin.shell: find . -type f -exec sed -i 's/akaunting:latest/akaunting:{{version_akaunting}}/' {} + && find . -type f -exec sed -i 's/version=latest/version={{version_akaunting}}/' {} +
|
||||||
|
become: true
|
||||||
|
args:
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
|
||||||
- name: configure db.env
|
- name: configure db.env
|
||||||
template: src=db.env.j2 dest={{docker_compose_instance_directory}}/env/db.env
|
template: src=db.env.j2 dest={{docker_compose_instance_directory}}/env/db.env
|
||||||
notify: docker compose project setup
|
notify: setup akaunting
|
||||||
|
|
||||||
- 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: setup akaunting
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
|
||||||
application:
|
|
||||||
image: docker.io/akaunting/akaunting:{{version_akaunting}}
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
ports:
|
|
||||||
- 127.0.0.1:{{http_port}}:80
|
|
||||||
volumes:
|
|
||||||
- data:/var/www/html
|
|
||||||
restart: unless-stopped
|
|
||||||
env_file:
|
|
||||||
- env/run.env
|
|
||||||
environment:
|
|
||||||
- AKAUNTING_SETUP
|
|
||||||
depends_on:
|
|
||||||
- database
|
|
||||||
|
|
||||||
{% include 'templates/docker-mariadb-service.yml.j2' %}
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
data:
|
|
||||||
database:
|
|
@ -1,9 +1,6 @@
|
|||||||
docker_compose_project_name: "akaunting"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}akaunting/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "akaunting"
|
||||||
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
|
database_host: "akaunting-db"
|
||||||
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml"
|
database_databasename: "{{database_instance}}"
|
||||||
database_host: "database"
|
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
|
||||||
database_username: "admin"
|
database_username: "admin"
|
||||||
database_password: "{{akaunting_database_password}}"
|
database_password: "{{akaunting_database_password}}"
|
||||||
repository_address: "https://github.com/akaunting/docker.git"
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
@TODO @ATTENTION THIS ROLE IS WORK IN PROGRESS
|
# Role: docker-attendize
|
||||||
|
|
||||||
# Role: docker-attendize (WIP)
|
|
||||||
|
|
||||||
This Ansible role sets up Attendize, an open-source ticket selling and event management platform.
|
This Ansible role sets up Attendize, an open-source ticket selling and event management platform.
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -11,5 +11,41 @@
|
|||||||
dest: "{{nginx_servers_directory}}{{domain}}.conf"
|
dest: "{{nginx_servers_directory}}{{domain}}.conf"
|
||||||
notify: restart nginx
|
notify: restart nginx
|
||||||
|
|
||||||
- name: "include tasks update-repository-with-docker-compose.yml"
|
#- name: configure {{ mail_interface_domain }}.conf
|
||||||
include_tasks: update-repository-with-docker-compose.yml
|
# template:
|
||||||
|
# src: roles/nginx-docker-reverse-proxy/templates/domain.conf.j2
|
||||||
|
# dest: {{nginx_servers_directory}}{{ mail_interface_domain }}.conf
|
||||||
|
# vars:
|
||||||
|
# http_port: "{{ mail_interface_http_port }}"
|
||||||
|
# domain: "{{ mail_interface_domain }}"
|
||||||
|
# notify: restart nginx
|
||||||
|
|
||||||
|
- name: register directory
|
||||||
|
stat:
|
||||||
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
register: docker_compose_instance_directory_register
|
||||||
|
|
||||||
|
- name: checkout repository
|
||||||
|
ansible.builtin.shell: git checkout .
|
||||||
|
become: true
|
||||||
|
args:
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
when: docker_compose_instance_directory_register.stat.exists
|
||||||
|
|
||||||
|
- name: checkout Attendize repository
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: "https://github.com/Attendize/Attendize.git"
|
||||||
|
dest: "{{docker_compose_instance_directory}}"
|
||||||
|
version: master
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Warn if repo is not reachable
|
||||||
|
debug:
|
||||||
|
msg: "Warning: Repository is not reachable."
|
||||||
|
when: git_result.failed
|
||||||
|
|
||||||
|
- name: create docker-compose.yml file from template
|
||||||
|
template:
|
||||||
|
src: docker-compose.yml.j2
|
||||||
|
dest: "{{docker_compose_instance_directory}}/docker-compose.yml"
|
||||||
|
mode: 0644
|
@ -1,11 +1,8 @@
|
|||||||
---
|
---
|
||||||
docker_compose_project_name: "attendize"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}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_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml"
|
|
||||||
mail_interface_domain: "mail.{{domain}}"
|
mail_interface_domain: "mail.{{domain}}"
|
||||||
|
database_instance: "attendize"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{attendize_database_password}}"
|
database_password: "{{attendize_database_password}}"
|
||||||
repository_address: "https://github.com/Attendize/Attendize.git"
|
|
8
roles/docker-baserow/handlers/main.yml
Normal file
8
roles/docker-baserow/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate baserow
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p baserow up -d --force-recreate
|
||||||
|
chdir: "{{path_docker_compose_instances}}baserow/"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: recreate baserow
|
||||||
|
|
||||||
- name: add env
|
- name: add env
|
||||||
template:
|
template:
|
||||||
@ -18,4 +18,4 @@
|
|||||||
dest: "{{docker_compose_instance_directory}}env"
|
dest: "{{docker_compose_instance_directory}}env"
|
||||||
mode: '770'
|
mode: '770'
|
||||||
force: yes
|
force: yes
|
||||||
notify: docker compose project setup
|
notify: recreate baserow
|
@ -9,8 +9,8 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- ./env
|
- ./env
|
||||||
volumes:
|
volumes:
|
||||||
- data:/baserow/data
|
- baserow_data:/baserow/data
|
||||||
ports:
|
ports:
|
||||||
- "{{http_port}}:80"
|
- "{{http_port}}:80"
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
baserow_data:
|
@ -1,2 +1 @@
|
|||||||
docker_compose_project_name: "baserow"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}baserow/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
|
@ -1,6 +1,4 @@
|
|||||||
# docker bigbluebutton
|
# docker bigbluebutton
|
||||||
@TODO Database needs to be decoupled
|
|
||||||
|
|
||||||
Role to deploy [BigBlueButton](https://bigbluebutton.org/).
|
Role to deploy [BigBlueButton](https://bigbluebutton.org/).
|
||||||
|
|
||||||
## maintanace
|
## maintanace
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
docker_compose_project_name: "bigbluebutton"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}bigbluebutton/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "bigbluebutton"
|
||||||
database_host: "postgres"
|
database_host: "postgres"
|
||||||
database_databasename: "greenlight-v3"
|
database_databasename: "greenlight-v3"
|
||||||
database_username: "postgres"
|
database_username: "postgres"
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
dependencies:
|
|
||||||
- nginx-docker-reverse-proxy
|
|
@ -1,7 +1,5 @@
|
|||||||
# Ansible Role: Docker-Discourse
|
# Ansible Role: Docker-Discourse
|
||||||
|
|
||||||
@TODO Database needs to be decoupled
|
|
||||||
|
|
||||||
This Ansible role sets up Discourse, a popular open-source discussion platform, using Docker containers. It is designed to automate the deployment and configuration process of Discourse, making it easier to maintain and update.
|
This Ansible role sets up Discourse, a popular open-source discussion platform, using Docker containers. It is designed to automate the deployment and configuration process of Discourse, making it easier to maintain and update.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
8
roles/docker-funkwhale/handlers/main.yml
Normal file
8
roles/docker-funkwhale/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate funkwhale
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p funkwhale up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: recreate funkwhale
|
||||||
|
|
||||||
- name: add .env
|
- name: add .env
|
||||||
template:
|
template:
|
||||||
@ -18,4 +18,4 @@
|
|||||||
dest: "{{docker_compose_instance_directory}}.env"
|
dest: "{{docker_compose_instance_directory}}.env"
|
||||||
mode: '770'
|
mode: '770'
|
||||||
force: yes
|
force: yes
|
||||||
notify: docker compose project setup
|
notify: recreate funkwhale
|
@ -1,3 +1,2 @@
|
|||||||
docker_compose_project_name: "funkwhale"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}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;"
|
||||||
|
8
roles/docker-gitea/handlers/main.yml
Normal file
8
roles/docker-gitea/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate gitea
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p gitea up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -10,4 +10,4 @@
|
|||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: recreate gitea
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
docker_compose_project_name: "gitea"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}gitea/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "gitea"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{gitea_database_password}}"
|
database_password: "{{gitea_database_password}}"
|
@ -16,7 +16,7 @@ This Ansible role is designed for setting up and managing a GitLab server runnin
|
|||||||
## Role Variables
|
## Role Variables
|
||||||
Variables are defined in `vars/main.yml`. Key variables include:
|
Variables are defined in `vars/main.yml`. Key variables include:
|
||||||
- `docker_compose_instance_directory`: Directory for Docker Compose instances.
|
- `docker_compose_instance_directory`: Directory for Docker Compose instances.
|
||||||
- `docker_compose_project_name`, `database_host`, `database_databasename`, `database_username`, `database_password`: Database configuration variables.
|
- `database_instance`, `database_host`, `database_databasename`, `database_username`, `database_password`: Database configuration variables.
|
||||||
- `database_version`: PostgreSQL version, with a default fallback.
|
- `database_version`: PostgreSQL version, with a default fallback.
|
||||||
|
|
||||||
## Handlers
|
## Handlers
|
||||||
|
8
roles/docker-gitlab/handlers/main.yml
Normal file
8
roles/docker-gitlab/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate gitlab
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p gitlab up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -10,4 +10,4 @@
|
|||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: recreate gitlab
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
docker_compose_project_name: "gitlab"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}gitlab/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "gitlab"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "gitlab"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "gitlab"
|
||||||
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) }}"
|
8
roles/docker-joomla/handlers/main.yml
Normal file
8
roles/docker-joomla/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate joomla
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p joomla up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -13,4 +13,4 @@
|
|||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: recreate joomla
|
@ -1,6 +1,6 @@
|
|||||||
docker_compose_project_name: "joomla"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}joomla/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "joomla"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{joomla_database_password}}"
|
database_password: "{{joomla_database_password}}"
|
8
roles/docker-listmonk/handlers/main.yml
Normal file
8
roles/docker-listmonk/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate listmonk
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p listmonk up -d --force-recreate
|
||||||
|
chdir: "{{path_docker_compose_instances}}listmonk/"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
template:
|
template:
|
||||||
src: "docker-compose.yml.j2"
|
src: "docker-compose.yml.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||||
notify: docker compose project setup
|
notify: recreate listmonk
|
||||||
|
|
||||||
- name: add config.toml
|
- name: add config.toml
|
||||||
template:
|
template:
|
||||||
src: "config.toml.j2"
|
src: "config.toml.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}config.toml"
|
dest: "{{docker_compose_instance_directory}}config.toml"
|
||||||
notify: docker compose project setup
|
notify: recreate listmonk
|
@ -1,7 +1,7 @@
|
|||||||
docker_compose_project_name: "listmonk"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}listmonk/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "listmonk"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
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) }}"
|
@ -1,4 +1,11 @@
|
|||||||
---
|
---
|
||||||
|
- name: recreate mailu
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p mailu up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 900
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 900
|
||||||
- name: "restart deploy-letsencrypt-mailu.service"
|
- name: "restart deploy-letsencrypt-mailu.service"
|
||||||
systemd:
|
systemd:
|
||||||
name: deploy-letsencrypt-mailu.service
|
name: deploy-letsencrypt-mailu.service
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
- systemd-notifier
|
- systemd-notifier
|
||||||
|
@ -32,13 +32,13 @@
|
|||||||
template:
|
template:
|
||||||
src: "docker-compose.yml.j2"
|
src: "docker-compose.yml.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||||
notify: docker compose project setup
|
notify: recreate mailu
|
||||||
|
|
||||||
- name: add mailu.env
|
- name: add mailu.env
|
||||||
template:
|
template:
|
||||||
src: "mailu.env.j2"
|
src: "mailu.env.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}mailu.env"
|
dest: "{{docker_compose_instance_directory}}mailu.env"
|
||||||
notify: docker compose project setup
|
notify: recreate mailu
|
||||||
|
|
||||||
- name: add deploy-letsencrypt-mailu.sh
|
- name: add deploy-letsencrypt-mailu.sh
|
||||||
template:
|
template:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
docker_compose_project_name: "mailu"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}mailu/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "mailu"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{mailu_database_password}}"
|
database_password: "{{mailu_database_password}}"
|
8
roles/docker-mastodon/handlers/main.yml
Normal file
8
roles/docker-mastodon/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate mastodon
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p mastodon up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
|
|
||||||
- name: copy docker-compose.yml
|
- name: copy docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: recreate mastodon
|
||||||
|
|
||||||
- name: copy configuration
|
- name: copy configuration
|
||||||
template:
|
template:
|
||||||
src: .env.production.j2
|
src: .env.production.j2
|
||||||
dest: "{{docker_compose_instance_directory}}.env.production"
|
dest: "{{docker_compose_instance_directory}}.env.production"
|
||||||
notify: docker compose project setup
|
notify: recreate mastodon
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
docker_compose_project_name: "mastodon"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}mastodon/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "mastodon"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "postgres" # todo: Change this to standart name scheme for future setups
|
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_username: "postgres" # todo: Change this to standart name scheme for future setups
|
||||||
|
8
roles/docker-matomo/handlers/main.yml
Normal file
8
roles/docker-matomo/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate matomo
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p matomo up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -12,4 +12,4 @@
|
|||||||
template:
|
template:
|
||||||
src: "docker-compose.yml.j2"
|
src: "docker-compose.yml.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||||
notify: docker compose project setup
|
notify: recreate matomo
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
docker_compose_project_name: "matomo"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}matomo/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "matomo"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{matomo_database_password}}"
|
database_password: "{{matomo_database_password}}"
|
8
roles/docker-matrix-compose/handlers/main.yml
Normal file
8
roles/docker-matrix-compose/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate matrix
|
||||||
|
command:
|
||||||
|
cmd: docker-compose up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -27,25 +27,25 @@
|
|||||||
# template:
|
# template:
|
||||||
# src: "whatsapp-bridge-config.yml.j2"
|
# src: "whatsapp-bridge-config.yml.j2"
|
||||||
# dest: "{{docker_compose_instance_directory}}mautrix_whatsapp/config.yml"
|
# dest: "{{docker_compose_instance_directory}}mautrix_whatsapp/config.yml"
|
||||||
# notify: docker compose project setup
|
# notify: recreate matrix
|
||||||
|
|
||||||
- name: add element-config.json
|
- name: add element-config.json
|
||||||
template:
|
template:
|
||||||
src: "element-config.json.j2"
|
src: "element-config.json.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}element-config.json"
|
dest: "{{docker_compose_instance_directory}}element-config.json"
|
||||||
notify: docker compose project setup
|
notify: recreate matrix
|
||||||
|
|
||||||
- name: add homeserver.yaml
|
- name: add homeserver.yaml
|
||||||
template:
|
template:
|
||||||
src: "homeserver.yaml.j2"
|
src: "homeserver.yaml.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}homeserver.yaml"
|
dest: "{{docker_compose_instance_directory}}homeserver.yaml"
|
||||||
notify: docker compose project setup
|
notify: recreate matrix
|
||||||
|
|
||||||
- name: add log.config
|
- name: add log.config
|
||||||
template:
|
template:
|
||||||
src: "log.config.j2"
|
src: "log.config.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}{{synapse_domain}}.log.config"
|
dest: "{{docker_compose_instance_directory}}{{synapse_domain}}.log.config"
|
||||||
notify: docker compose project setup
|
notify: recreate matrix
|
||||||
|
|
||||||
# https://github.com/matrix-org/synapse/issues/6303
|
# https://github.com/matrix-org/synapse/issues/6303
|
||||||
- name: set correct folder permissions
|
- name: set correct folder permissions
|
||||||
@ -56,4 +56,4 @@
|
|||||||
template:
|
template:
|
||||||
src: "docker-compose.yml.j2"
|
src: "docker-compose.yml.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||||
notify: docker compose project setup
|
notify: recreate matrix
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
docker_compose_project_name: "matrix"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}matrix/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "matrix"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{matrix_database_password}}"
|
database_password: "{{matrix_database_password}}"
|
8
roles/docker-mybb/handlers/main.yml
Normal file
8
roles/docker-mybb/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate mybb
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p mybb up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
template:
|
template:
|
||||||
src: "default.conf"
|
src: "default.conf"
|
||||||
dest: "{{docker_compose_instance_confd_defaultconf_file}}"
|
dest: "{{docker_compose_instance_confd_defaultconf_file}}"
|
||||||
notify: docker compose project setup
|
notify: recreate mybb
|
||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template:
|
template:
|
||||||
src: "docker-compose.yml.j2"
|
src: "docker-compose.yml.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||||
notify: docker compose project setup
|
notify: recreate mybb
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
docker_compose_project_name: "mybb"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}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_instance: "mybb"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{mybb_database_password}}"
|
database_password: "{{mybb_database_password}}"
|
8
roles/docker-nextcloud/handlers/main.yml
Normal file
8
roles/docker-nextcloud/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate nextcloud
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p nextcloud up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
template:
|
template:
|
||||||
src: "templates/nginx.conf.j2"
|
src: "templates/nginx.conf.j2"
|
||||||
dest: "{{path_docker_volumes}}nextcloud/nginx.conf"
|
dest: "{{path_docker_volumes}}nextcloud/nginx.conf"
|
||||||
notify: docker compose project setup
|
notify: recreate nextcloud
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
@ -30,4 +30,4 @@
|
|||||||
template:
|
template:
|
||||||
src: docker-compose.yml.j2
|
src: docker-compose.yml.j2
|
||||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||||
notify: docker compose project setup
|
notify: recreate nextcloud
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
docker_compose_project_name: "nextcloud"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}nextcloud/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "nextcloud"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{nextcloud_database_password}}"
|
database_password: "{{nextcloud_database_password}}"
|
8
roles/docker-openproject/handlers/main.yml
Normal file
8
roles/docker-openproject/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate openproject
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p openproject up -d --force-recreate
|
||||||
|
chdir: "{{ docker_compose_instance_directory }}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -2,11 +2,54 @@
|
|||||||
- 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: "include tasks update-repository-with-docker-compose.yml"
|
- name: "backup docker-compose.yml if it exists"
|
||||||
include_tasks: update-repository-with-docker-compose.yml
|
command: >
|
||||||
|
mv "{{ docker_compose_file_path }}" "{{ docker_compose_backup_path }}"
|
||||||
|
args:
|
||||||
|
removes: "{{ docker_compose_file_path }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: register directory
|
||||||
|
stat:
|
||||||
|
path: "{{docker_compose_instance_directory}}"
|
||||||
|
register: docker_compose_instance_directory_register
|
||||||
|
|
||||||
|
- name: checkout repository
|
||||||
|
ansible.builtin.shell: git checkout .
|
||||||
|
become: true
|
||||||
|
args:
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
when: docker_compose_instance_directory_register.stat.exists
|
||||||
|
|
||||||
|
- name: pull docker repository
|
||||||
|
git:
|
||||||
|
repo: "https://github.com/opf/openproject-deploy"
|
||||||
|
dest: "{{ repository_directory }}"
|
||||||
|
update: yes
|
||||||
|
notify: recreate openproject
|
||||||
|
become: true
|
||||||
|
register: git_result
|
||||||
|
|
||||||
|
- name: "restore docker-compose.yml from backup"
|
||||||
|
command: >
|
||||||
|
mv "{{ docker_compose_backup_path }}" "{{ docker_compose_file_path }}"
|
||||||
|
args:
|
||||||
|
removes: "{{ docker_compose_backup_path }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Warn if repo is not reachable
|
||||||
|
debug:
|
||||||
|
msg: "Warning: Repository is not reachable."
|
||||||
|
when: git_result.failed
|
||||||
|
|
||||||
- name: "copy .env"
|
- name: "copy .env"
|
||||||
template:
|
template:
|
||||||
src: env.j2
|
src: env.j2
|
||||||
dest: "{{ docker_compose_instance_directory }}.env"
|
dest: "{{ docker_compose_instance_directory }}.env"
|
||||||
notify: docker compose project setup
|
notify: recreate openproject
|
||||||
|
|
||||||
|
- name: "copy docker-compose.yml"
|
||||||
|
template:
|
||||||
|
src: docker-compose.yml.j2
|
||||||
|
dest: "{{ docker_compose_file_path }}"
|
||||||
|
notify: recreate openproject
|
||||||
|
@ -21,7 +21,7 @@ x-op-app: &app
|
|||||||
RAILS_CACHE_STORE: "memcache"
|
RAILS_CACHE_STORE: "memcache"
|
||||||
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
|
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
|
||||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
||||||
DATABASE_URL: "${DATABASE_URL}"
|
DATABASE_URL: "${DATABASE_URL:-postgres://postgres:p4ssw0rd@db/openproject?pool=20&encoding=unicode&reconnect=true}"
|
||||||
RAILS_MIN_THREADS: ${RAILS_MIN_THREADS:-4}
|
RAILS_MIN_THREADS: ${RAILS_MIN_THREADS:-4}
|
||||||
RAILS_MAX_THREADS: ${RAILS_MAX_THREADS:-16}
|
RAILS_MAX_THREADS: ${RAILS_MAX_THREADS:-16}
|
||||||
# set to true to enable the email receiving feature. See ./docker/cron for more options
|
# set to true to enable the email receiving feature. See ./docker/cron for more options
|
||||||
@ -31,7 +31,7 @@ x-op-app: &app
|
|||||||
- "${PGDATA}:/var/openproject/pgdata"
|
- "${PGDATA}:/var/openproject/pgdata"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
database:
|
db:
|
||||||
image: postgres:13
|
image: postgres:13
|
||||||
<<: *restart_policy
|
<<: *restart_policy
|
||||||
stop_grace_period: "3s"
|
stop_grace_period: "3s"
|
||||||
@ -72,7 +72,7 @@ services:
|
|||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- db
|
||||||
- cache
|
- cache
|
||||||
- seeder
|
- seeder
|
||||||
labels:
|
labels:
|
||||||
@ -99,7 +99,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- db
|
||||||
- cache
|
- cache
|
||||||
- seeder
|
- seeder
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- db
|
||||||
- cache
|
- cache
|
||||||
- seeder
|
- seeder
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
docker_compose_project_name: "openproject"
|
repository_directory: "{{ path_docker_compose_instances }}openproject/"
|
||||||
repository_directory: "{{ path_docker_compose_instances }}{{docker_compose_project_name}}/"
|
|
||||||
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/openproject-docker-compose-backup.yml"
|
||||||
database_host: "database"
|
database_instance: "openproject"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_host: "db"
|
||||||
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "postgres"
|
database_username: "postgres"
|
||||||
database_password: "{{openproject_database_password}}"
|
database_password: "{{openproject_database_password}}"
|
||||||
repository_address: "https://github.com/opf/openproject-deploy"
|
|
8
roles/docker-peertube/handlers/main.yml
Normal file
8
roles/docker-peertube/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate peertube
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p peertube up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
|
|
||||||
- name: copy docker-compose.yml
|
- name: copy docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: recreate peertube
|
||||||
|
|
||||||
- name: copy configuration
|
- name: copy configuration
|
||||||
template:
|
template:
|
||||||
src: env.j2
|
src: env.j2
|
||||||
dest: "{{docker_compose_instance_directory}}.env"
|
dest: "{{docker_compose_instance_directory}}.env"
|
||||||
notify: docker compose project setup
|
notify: recreate peertube
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
docker_compose_project_name: "peertube"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}peertube/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "peertube"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{peertube_database_password}}"
|
database_password: "{{peertube_database_password}}"
|
8
roles/docker-pixelfed/handlers/main.yml
Normal file
8
roles/docker-pixelfed/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate pixelfed
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p pixelfed up -d --force-recreate
|
||||||
|
chdir: "{{path_docker_compose_instances}}pixelfed/"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: recreate pixelfed
|
||||||
|
|
||||||
- name: add env
|
- name: add env
|
||||||
template:
|
template:
|
||||||
@ -18,4 +18,4 @@
|
|||||||
dest: "{{docker_compose_instance_directory}}env"
|
dest: "{{docker_compose_instance_directory}}env"
|
||||||
mode: '770'
|
mode: '770'
|
||||||
force: yes
|
force: yes
|
||||||
notify: docker compose project setup
|
notify: recreate pixelfed
|
@ -1,7 +1,7 @@
|
|||||||
docker_compose_project_name: "pixelfed"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}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_instance: "pixelfed"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{pixelfed_database_password}}"
|
database_password: "{{pixelfed_database_password}}"
|
||||||
|
8
roles/docker-roulette-wheel/handlers/main.yml
Normal file
8
roles/docker-roulette-wheel/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate and build roulette-wheel
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p roulette-wheel up -d --force-recreate --build
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
repo: "https://github.com/kevinveenbirkenbach/roulette-wheel.git"
|
repo: "https://github.com/kevinveenbirkenbach/roulette-wheel.git"
|
||||||
dest: "{{app_path}}"
|
dest: "{{app_path}}"
|
||||||
update: yes
|
update: yes
|
||||||
notify: docker compose project setup
|
notify: recreate and build roulette-wheel
|
||||||
become: true
|
become: true
|
||||||
register: git_result
|
register: git_result
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: recreate and build roulette-wheel
|
||||||
|
|
||||||
- name: add Dockerfile
|
- name: add Dockerfile
|
||||||
template: src=Dockerfile.j2 dest={{docker_compose_instance_directory}}Dockerfile
|
template: src=Dockerfile.j2 dest={{docker_compose_instance_directory}}Dockerfile
|
||||||
notify: docker compose project setup
|
notify: recreate and build roulette-wheel
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
docker_compose_project_name: "roulette-wheel"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}roulette-wheel/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
app_path: "{{path_docker_compose_instances}}roulette-wheel/app/"
|
||||||
app_path: "{{docker_compose_instance_directory}}/app/"
|
|
@ -6,3 +6,10 @@
|
|||||||
environment:
|
environment:
|
||||||
COMPOSE_HTTP_TIMEOUT: 600
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
DOCKER_CLIENT_TIMEOUT: 600
|
DOCKER_CLIENT_TIMEOUT: 600
|
||||||
|
- name: recreate wordpress
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p wordpress up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
src: upload.ini.j2
|
src: upload.ini.j2
|
||||||
dest: "{{docker_compose_instance_directory}}upload.ini"
|
dest: "{{docker_compose_instance_directory}}upload.ini"
|
||||||
notify:
|
notify:
|
||||||
- docker compose project setup
|
- recreate wordpress
|
||||||
- rebuild wordpress container
|
- rebuild wordpress container
|
||||||
|
|
||||||
- name: "Transfering Dockerfile to {{docker_compose_instance_directory}}"
|
- name: "Transfering Dockerfile to {{docker_compose_instance_directory}}"
|
||||||
@ -27,9 +27,9 @@
|
|||||||
src: Dockerfile
|
src: Dockerfile
|
||||||
dest: "{{docker_compose_instance_directory}}Dockerfile"
|
dest: "{{docker_compose_instance_directory}}Dockerfile"
|
||||||
notify:
|
notify:
|
||||||
- docker compose project setup
|
- recreate wordpress
|
||||||
- rebuild wordpress container
|
- rebuild wordpress container
|
||||||
|
|
||||||
- name: "add docker-compose.yml to {{docker_compose_instance_directory}}"
|
- name: "add docker-compose.yml to {{docker_compose_instance_directory}}"
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||||
notify: docker compose project setup
|
notify: recreate wordpress
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
docker_compose_project_name: "wordpress"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}wordpress/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
|
||||||
wordpress_max_upload_size: "64M"
|
wordpress_max_upload_size: "64M"
|
||||||
|
database_instance: "wordpress"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{wordpress_database_password}}"
|
database_password: "{{wordpress_database_password}}"
|
8
roles/docker-yourls/handlers/main.yml
Normal file
8
roles/docker-yourls/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: recreate yourls
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p yourls up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_instance_directory}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-compose
|
- nginx-docker-reverse-proxy
|
||||||
|
@ -12,4 +12,4 @@
|
|||||||
template:
|
template:
|
||||||
src: "docker-compose.yml.j2"
|
src: "docker-compose.yml.j2"
|
||||||
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
|
||||||
notify: docker compose project setup
|
notify: recreate yourls
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
docker_compose_project_name: "yourls"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}yourls/"
|
||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/"
|
database_instance: "yourls"
|
||||||
database_host: "database"
|
database_host: "database"
|
||||||
database_databasename: "{{docker_compose_project_name}}"
|
database_databasename: "{{database_instance}}"
|
||||||
database_username: "{{docker_compose_project_name}}"
|
database_username: "{{database_instance}}"
|
||||||
database_password: "{{yourls_database_password}}"
|
database_password: "{{yourls_database_password}}"
|
@ -246,7 +246,7 @@
|
|||||||
- role: docker-akaunting
|
- role: docker-akaunting
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_akaunting}}"
|
domain: "{{domain_akaunting}}"
|
||||||
http_port: 8025
|
http_port: 8080
|
||||||
|
|
||||||
# Native Webserver Roles
|
# Native Webserver Roles
|
||||||
- name: setup nginx-homepages
|
- name: setup nginx-homepages
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
- name: "backup docker-compose.yml if it exists"
|
|
||||||
command: >
|
|
||||||
mv "{{ docker_compose_file_path }}" "{{ docker_compose_backup_path }}"
|
|
||||||
args:
|
|
||||||
removes: "{{ docker_compose_file_path }}"
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: register directory
|
|
||||||
stat:
|
|
||||||
path: "{{docker_compose_instance_directory}}"
|
|
||||||
register: docker_compose_instance_directory_register
|
|
||||||
|
|
||||||
- name: checkout repository
|
|
||||||
ansible.builtin.shell: git checkout .
|
|
||||||
become: true
|
|
||||||
args:
|
|
||||||
chdir: "{{docker_compose_instance_directory}}"
|
|
||||||
when: docker_compose_instance_directory_register.stat.exists
|
|
||||||
|
|
||||||
- name: pull docker repository
|
|
||||||
git:
|
|
||||||
repo: "{{ repository_address }}"
|
|
||||||
dest: "{{ repository_directory }}"
|
|
||||||
update: yes
|
|
||||||
notify: docker compose project setup
|
|
||||||
become: true
|
|
||||||
register: git_result
|
|
||||||
|
|
||||||
- name: "restore docker-compose.yml from backup"
|
|
||||||
command: >
|
|
||||||
mv "{{ docker_compose_backup_path }}" "{{ docker_compose_file_path }}"
|
|
||||||
args:
|
|
||||||
removes: "{{ docker_compose_backup_path }}"
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Warn if repo is not reachable
|
|
||||||
debug:
|
|
||||||
msg: "Warning: Repository is not reachable."
|
|
||||||
when: git_result.failed
|
|
||||||
|
|
||||||
- name: "copy docker-compose.yml"
|
|
||||||
template:
|
|
||||||
src: docker-compose.yml.j2
|
|
||||||
dest: "{{ docker_compose_file_path }}"
|
|
||||||
notify: docker compose project setup
|
|
Loading…
Reference in New Issue
Block a user