From 658e40098acfb8b9faf36fd03da8ef0275ac7a81 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 30 Dec 2023 16:49:37 +0100 Subject: [PATCH] Refactored docker rroles dto use new role docker-compose --- roles/backup-docker-to-local/tasks/main.yml | 6 +++--- roles/docker-akaunting/vars/main.yml | 3 +-- roles/docker-attendize/tasks/main.yml | 9 --------- roles/docker-attendize/vars/main.yml | 9 ++++----- roles/docker-baserow/handlers/main.yml | 8 -------- roles/docker-baserow/meta/main.yml | 2 +- roles/docker-baserow/tasks/main.yml | 4 ++-- .../templates/docker-compose.yml.j2 | 4 ++-- roles/docker-baserow/vars/main.yml | 3 ++- roles/docker-bigbluebutton/README.md | 2 ++ roles/docker-bigbluebutton/meta/main.yml | 2 +- roles/docker-bigbluebutton/vars/main.yml | 4 ++-- roles/docker-discourse/README.md | 2 ++ roles/docker-funkwhale/handlers/main.yml | 8 -------- roles/docker-funkwhale/meta/main.yml | 2 +- roles/docker-funkwhale/tasks/main.yml | 4 ++-- roles/docker-funkwhale/vars/main.yml | 3 ++- roles/docker-gitea/handlers/main.yml | 8 -------- roles/docker-gitea/meta/main.yml | 2 +- roles/docker-gitea/tasks/main.yml | 2 +- roles/docker-gitea/vars/main.yml | 12 ++++++------ roles/docker-gitlab/README.md | 2 +- roles/docker-gitlab/handlers/main.yml | 8 -------- roles/docker-gitlab/meta/main.yml | 2 +- roles/docker-gitlab/tasks/main.yml | 2 +- roles/docker-gitlab/vars/main.yml | 8 ++++---- roles/docker-joomla/handlers/main.yml | 8 -------- roles/docker-joomla/meta/main.yml | 2 +- roles/docker-joomla/tasks/main.yml | 2 +- roles/docker-joomla/vars/main.yml | 12 ++++++------ roles/docker-listmonk/handlers/main.yml | 8 -------- roles/docker-listmonk/meta/main.yml | 2 +- roles/docker-listmonk/tasks/main.yml | 4 ++-- roles/docker-listmonk/vars/main.yml | 8 ++++---- roles/docker-mailu/handlers/main.yml | 7 ------- roles/docker-mailu/meta/main.yml | 2 +- roles/docker-mailu/tasks/main.yml | 4 ++-- roles/docker-mailu/vars/main.yml | 12 ++++++------ roles/docker-mastodon/handlers/main.yml | 8 -------- roles/docker-mastodon/meta/main.yml | 2 +- roles/docker-mastodon/tasks/main.yml | 4 ++-- roles/docker-mastodon/vars/main.yml | 12 ++++++------ roles/docker-matomo/handlers/main.yml | 8 -------- roles/docker-matomo/meta/main.yml | 2 +- roles/docker-matomo/tasks/main.yml | 2 +- roles/docker-matomo/vars/main.yml | 12 ++++++------ roles/docker-matrix-compose/handlers/main.yml | 8 -------- roles/docker-matrix-compose/meta/main.yml | 2 +- roles/docker-matrix-compose/tasks/main.yml | 10 +++++----- roles/docker-matrix-compose/vars/main.yml | 12 ++++++------ roles/docker-mybb/handlers/main.yml | 8 -------- roles/docker-mybb/meta/main.yml | 2 +- roles/docker-mybb/tasks/main.yml | 4 ++-- roles/docker-mybb/vars/main.yml | 18 +++++++++--------- roles/docker-nextcloud/handlers/main.yml | 8 -------- roles/docker-nextcloud/meta/main.yml | 2 +- roles/docker-nextcloud/tasks/main.yml | 4 ++-- roles/docker-nextcloud/vars/main.yml | 12 ++++++------ roles/docker-openproject/vars/main.yml | 3 +-- roles/docker-peertube/handlers/main.yml | 8 -------- roles/docker-peertube/meta/main.yml | 2 +- roles/docker-peertube/tasks/main.yml | 4 ++-- roles/docker-peertube/vars/main.yml | 12 ++++++------ roles/docker-pixelfed/handlers/main.yml | 8 -------- roles/docker-pixelfed/meta/main.yml | 2 +- roles/docker-pixelfed/tasks/main.yml | 4 ++-- roles/docker-pixelfed/vars/main.yml | 12 ++++++------ roles/docker-roulette-wheel/handlers/main.yml | 8 -------- roles/docker-roulette-wheel/meta/main.yml | 2 +- roles/docker-roulette-wheel/tasks/main.yml | 6 +++--- roles/docker-roulette-wheel/vars/main.yml | 5 +++-- roles/docker-wordpress/handlers/main.yml | 7 ------- roles/docker-wordpress/meta/main.yml | 2 +- roles/docker-wordpress/tasks/main.yml | 6 +++--- roles/docker-wordpress/vars/main.yml | 14 +++++++------- roles/docker-yourls/handlers/main.yml | 8 -------- roles/docker-yourls/meta/main.yml | 2 +- roles/docker-yourls/tasks/main.yml | 2 +- roles/docker-yourls/vars/main.yml | 12 ++++++------ 79 files changed, 161 insertions(+), 300 deletions(-) delete mode 100644 roles/docker-baserow/handlers/main.yml delete mode 100644 roles/docker-funkwhale/handlers/main.yml delete mode 100644 roles/docker-gitea/handlers/main.yml delete mode 100644 roles/docker-gitlab/handlers/main.yml delete mode 100644 roles/docker-joomla/handlers/main.yml delete mode 100644 roles/docker-listmonk/handlers/main.yml delete mode 100644 roles/docker-mastodon/handlers/main.yml delete mode 100644 roles/docker-matomo/handlers/main.yml delete mode 100644 roles/docker-matrix-compose/handlers/main.yml delete mode 100644 roles/docker-mybb/handlers/main.yml delete mode 100644 roles/docker-nextcloud/handlers/main.yml delete mode 100644 roles/docker-peertube/handlers/main.yml delete mode 100644 roles/docker-pixelfed/handlers/main.yml delete mode 100644 roles/docker-roulette-wheel/handlers/main.yml delete mode 100644 roles/docker-yourls/handlers/main.yml diff --git a/roles/backup-docker-to-local/tasks/main.yml b/roles/backup-docker-to-local/tasks/main.yml index 60929150..d436835a 100644 --- a/roles/backup-docker-to-local/tasks/main.yml +++ b/roles/backup-docker-to-local/tasks/main.yml @@ -43,10 +43,10 @@ - name: seed database values command: - cmd: "python database_entry_seeder.py databases.csv {{database_instance}} {{database_host}} {{database_databasename}} {{database_username}} {{database_password}}" + cmd: "python database_entry_seeder.py databases.csv {{docker_compose_project_name}} {{database_host}} {{database_databasename}} {{database_username}} {{database_password}}" chdir: "{{backup_docker_to_local_folder}}" when: > - database_instance is defined or + docker_compose_project_name is defined or database_host is defined or database_databasename is defined or database_username is defined or @@ -59,7 +59,7 @@ owner: root group: root when: > - (database_instance is defined or + (docker_compose_project_name is defined or database_host is defined or database_databasename is defined or database_username is defined or diff --git a/roles/docker-akaunting/vars/main.yml b/roles/docker-akaunting/vars/main.yml index f744b439..51eed924 100644 --- a/roles/docker-akaunting/vars/main.yml +++ b/roles/docker-akaunting/vars/main.yml @@ -2,9 +2,8 @@ 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_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml" -database_instance: "{{docker_compose_project_name}}" database_host: "database" -database_databasename: "{{database_instance}}" +database_databasename: "{{docker_compose_project_name}}" database_username: "admin" database_password: "{{akaunting_database_password}}" repository_address: "https://github.com/akaunting/docker.git" diff --git a/roles/docker-attendize/tasks/main.yml b/roles/docker-attendize/tasks/main.yml index ab7bacc1..e3495508 100644 --- a/roles/docker-attendize/tasks/main.yml +++ b/roles/docker-attendize/tasks/main.yml @@ -11,14 +11,5 @@ dest: "{{nginx_servers_directory}}{{domain}}.conf" notify: restart nginx -#- name: configure {{ mail_interface_domain }}.conf -# 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: "include tasks update-repository-with-docker-compose.yml" include_tasks: update-repository-with-docker-compose.yml \ No newline at end of file diff --git a/roles/docker-attendize/vars/main.yml b/roles/docker-attendize/vars/main.yml index 778c8f28..c1fe3e17 100644 --- a/roles/docker-attendize/vars/main.yml +++ b/roles/docker-attendize/vars/main.yml @@ -1,12 +1,11 @@ --- 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/attendize-docker-compose-backup.yml" +docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml" mail_interface_domain: "mail.{{domain}}" -database_instance: "{{docker_compose_project_name}}" database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" +database_databasename: "{{docker_compose_project_name}}" +database_username: "{{docker_compose_project_name}}" database_password: "{{attendize_database_password}}" repository_address: "https://github.com/Attendize/Attendize.git" \ No newline at end of file diff --git a/roles/docker-baserow/handlers/main.yml b/roles/docker-baserow/handlers/main.yml deleted file mode 100644 index c508f4ef..00000000 --- a/roles/docker-baserow/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-baserow/meta/main.yml b/roles/docker-baserow/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-baserow/meta/main.yml +++ b/roles/docker-baserow/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-baserow/tasks/main.yml b/roles/docker-baserow/tasks/main.yml index 5ba4b0dd..104a5024 100644 --- a/roles/docker-baserow/tasks/main.yml +++ b/roles/docker-baserow/tasks/main.yml @@ -10,7 +10,7 @@ - name: add docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml - notify: recreate baserow + notify: docker compose project setup - name: add env template: @@ -18,4 +18,4 @@ dest: "{{docker_compose_instance_directory}}env" mode: '770' force: yes - notify: recreate baserow \ No newline at end of file + notify: docker compose project setup \ No newline at end of file diff --git a/roles/docker-baserow/templates/docker-compose.yml.j2 b/roles/docker-baserow/templates/docker-compose.yml.j2 index cc07adf8..a3a0243d 100644 --- a/roles/docker-baserow/templates/docker-compose.yml.j2 +++ b/roles/docker-baserow/templates/docker-compose.yml.j2 @@ -9,8 +9,8 @@ services: env_file: - ./env volumes: - - baserow_data:/baserow/data + - data:/baserow/data ports: - "{{http_port}}:80" volumes: - baserow_data: \ No newline at end of file + data: \ No newline at end of file diff --git a/roles/docker-baserow/vars/main.yml b/roles/docker-baserow/vars/main.yml index eb1c8010..67efb239 100644 --- a/roles/docker-baserow/vars/main.yml +++ b/roles/docker-baserow/vars/main.yml @@ -1 +1,2 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}baserow/" \ No newline at end of file +docker_compose_project_name: "baserow" +docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/" \ No newline at end of file diff --git a/roles/docker-bigbluebutton/README.md b/roles/docker-bigbluebutton/README.md index 743ca07e..677f1eb8 100644 --- a/roles/docker-bigbluebutton/README.md +++ b/roles/docker-bigbluebutton/README.md @@ -1,4 +1,6 @@ # docker bigbluebutton +@TODO Database needs to be decoupled + Role to deploy [BigBlueButton](https://bigbluebutton.org/). ## maintanace diff --git a/roles/docker-bigbluebutton/meta/main.yml b/roles/docker-bigbluebutton/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-bigbluebutton/meta/main.yml +++ b/roles/docker-bigbluebutton/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-bigbluebutton/vars/main.yml b/roles/docker-bigbluebutton/vars/main.yml index 1c54abff..03befecd 100644 --- a/roles/docker-bigbluebutton/vars/main.yml +++ b/roles/docker-bigbluebutton/vars/main.yml @@ -1,5 +1,5 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}bigbluebutton/" -database_instance: "bigbluebutton" +docker_compose_project_name: "bigbluebutton" +docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/" database_host: "postgres" database_databasename: "greenlight-v3" database_username: "postgres" diff --git a/roles/docker-discourse/README.md b/roles/docker-discourse/README.md index 2cc0569e..11504b14 100644 --- a/roles/docker-discourse/README.md +++ b/roles/docker-discourse/README.md @@ -1,5 +1,7 @@ # 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. --- diff --git a/roles/docker-funkwhale/handlers/main.yml b/roles/docker-funkwhale/handlers/main.yml deleted file mode 100644 index 726f559e..00000000 --- a/roles/docker-funkwhale/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-funkwhale/meta/main.yml b/roles/docker-funkwhale/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-funkwhale/meta/main.yml +++ b/roles/docker-funkwhale/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-funkwhale/tasks/main.yml b/roles/docker-funkwhale/tasks/main.yml index b68cb3a9..54a4de6d 100644 --- a/roles/docker-funkwhale/tasks/main.yml +++ b/roles/docker-funkwhale/tasks/main.yml @@ -10,7 +10,7 @@ - name: add docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml - notify: recreate funkwhale + notify: docker compose project setup - name: add .env template: @@ -18,4 +18,4 @@ dest: "{{docker_compose_instance_directory}}.env" mode: '770' force: yes - notify: recreate funkwhale \ No newline at end of file + notify: docker compose project setup \ No newline at end of file diff --git a/roles/docker-funkwhale/vars/main.yml b/roles/docker-funkwhale/vars/main.yml index 95783741..82942d2b 100644 --- a/roles/docker-funkwhale/vars/main.yml +++ b/roles/docker-funkwhale/vars/main.yml @@ -1,2 +1,3 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}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;" diff --git a/roles/docker-gitea/handlers/main.yml b/roles/docker-gitea/handlers/main.yml deleted file mode 100644 index ad7e1885..00000000 --- a/roles/docker-gitea/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-gitea/meta/main.yml b/roles/docker-gitea/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-gitea/meta/main.yml +++ b/roles/docker-gitea/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-gitea/tasks/main.yml b/roles/docker-gitea/tasks/main.yml index da9f0511..c9af2eab 100644 --- a/roles/docker-gitea/tasks/main.yml +++ b/roles/docker-gitea/tasks/main.yml @@ -10,4 +10,4 @@ - name: add docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml - notify: recreate gitea + notify: docker compose project setup diff --git a/roles/docker-gitea/vars/main.yml b/roles/docker-gitea/vars/main.yml index be3540d8..badb90ea 100644 --- a/roles/docker-gitea/vars/main.yml +++ b/roles/docker-gitea/vars/main.yml @@ -1,6 +1,6 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}gitea/" -database_instance: "gitea" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{gitea_database_password}}" \ No newline at end of file +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}}" \ No newline at end of file diff --git a/roles/docker-gitlab/README.md b/roles/docker-gitlab/README.md index cd90e732..3d0a7b46 100644 --- a/roles/docker-gitlab/README.md +++ b/roles/docker-gitlab/README.md @@ -16,7 +16,7 @@ This Ansible role is designed for setting up and managing a GitLab server runnin ## Role Variables Variables are defined in `vars/main.yml`. Key variables include: - `docker_compose_instance_directory`: Directory for Docker Compose instances. -- `database_instance`, `database_host`, `database_databasename`, `database_username`, `database_password`: Database configuration variables. +- `docker_compose_project_name`, `database_host`, `database_databasename`, `database_username`, `database_password`: Database configuration variables. - `database_version`: PostgreSQL version, with a default fallback. ## Handlers diff --git a/roles/docker-gitlab/handlers/main.yml b/roles/docker-gitlab/handlers/main.yml deleted file mode 100644 index 145a760f..00000000 --- a/roles/docker-gitlab/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-gitlab/meta/main.yml b/roles/docker-gitlab/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-gitlab/meta/main.yml +++ b/roles/docker-gitlab/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-gitlab/tasks/main.yml b/roles/docker-gitlab/tasks/main.yml index e4d53cec..c9af2eab 100644 --- a/roles/docker-gitlab/tasks/main.yml +++ b/roles/docker-gitlab/tasks/main.yml @@ -10,4 +10,4 @@ - name: add docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml - notify: recreate gitlab + notify: docker compose project setup diff --git a/roles/docker-gitlab/vars/main.yml b/roles/docker-gitlab/vars/main.yml index 3961d796..7bc995da 100644 --- a/roles/docker-gitlab/vars/main.yml +++ b/roles/docker-gitlab/vars/main.yml @@ -1,7 +1,7 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}gitlab/" -database_instance: "gitlab" +docker_compose_project_name: "gitlab" +docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/" database_host: "database" -database_databasename: "gitlab" -database_username: "gitlab" +database_databasename: "{{docker_compose_project_name}}" +database_username: "{{docker_compose_project_name}}" database_password: "{{gitlab_database_password}}" database_version: "{{ gitlab_database_version | default(postgres_default_version) }}" \ No newline at end of file diff --git a/roles/docker-joomla/handlers/main.yml b/roles/docker-joomla/handlers/main.yml deleted file mode 100644 index 36c1bc47..00000000 --- a/roles/docker-joomla/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-joomla/meta/main.yml b/roles/docker-joomla/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-joomla/meta/main.yml +++ b/roles/docker-joomla/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-joomla/tasks/main.yml b/roles/docker-joomla/tasks/main.yml index 9c993607..ee608ad6 100644 --- a/roles/docker-joomla/tasks/main.yml +++ b/roles/docker-joomla/tasks/main.yml @@ -13,4 +13,4 @@ - name: add docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml - notify: recreate joomla \ No newline at end of file + notify: docker compose project setup \ No newline at end of file diff --git a/roles/docker-joomla/vars/main.yml b/roles/docker-joomla/vars/main.yml index c54d80ad..13740a01 100644 --- a/roles/docker-joomla/vars/main.yml +++ b/roles/docker-joomla/vars/main.yml @@ -1,6 +1,6 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}joomla/" -database_instance: "joomla" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{joomla_database_password}}" \ No newline at end of file +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}}" \ No newline at end of file diff --git a/roles/docker-listmonk/handlers/main.yml b/roles/docker-listmonk/handlers/main.yml deleted file mode 100644 index 747b0bc5..00000000 --- a/roles/docker-listmonk/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-listmonk/meta/main.yml b/roles/docker-listmonk/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-listmonk/meta/main.yml +++ b/roles/docker-listmonk/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-listmonk/tasks/main.yml b/roles/docker-listmonk/tasks/main.yml index b51fba5b..b52055a9 100644 --- a/roles/docker-listmonk/tasks/main.yml +++ b/roles/docker-listmonk/tasks/main.yml @@ -12,10 +12,10 @@ template: src: "docker-compose.yml.j2" dest: "{{docker_compose_instance_directory}}docker-compose.yml" - notify: recreate listmonk + notify: docker compose project setup - name: add config.toml template: src: "config.toml.j2" dest: "{{docker_compose_instance_directory}}config.toml" - notify: recreate listmonk \ No newline at end of file + notify: docker compose project setup \ No newline at end of file diff --git a/roles/docker-listmonk/vars/main.yml b/roles/docker-listmonk/vars/main.yml index 16b51b40..233838c7 100644 --- a/roles/docker-listmonk/vars/main.yml +++ b/roles/docker-listmonk/vars/main.yml @@ -1,7 +1,7 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}listmonk/" -database_instance: "listmonk" +docker_compose_project_name: "listmonk" +docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/" database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" +database_databasename: "{{docker_compose_project_name}}" +database_username: "{{docker_compose_project_name}}" database_password: "{{listmonk_database_password}}" database_version: "{{ listmonk_database_version | default(postgres_default_version) }}" \ No newline at end of file diff --git a/roles/docker-mailu/handlers/main.yml b/roles/docker-mailu/handlers/main.yml index 28fdd5d3..c6dead42 100644 --- a/roles/docker-mailu/handlers/main.yml +++ b/roles/docker-mailu/handlers/main.yml @@ -1,11 +1,4 @@ --- -- 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" systemd: name: deploy-letsencrypt-mailu.service diff --git a/roles/docker-mailu/meta/main.yml b/roles/docker-mailu/meta/main.yml index c94762d8..1240088e 100644 --- a/roles/docker-mailu/meta/main.yml +++ b/roles/docker-mailu/meta/main.yml @@ -1,3 +1,3 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose - systemd-notifier diff --git a/roles/docker-mailu/tasks/main.yml b/roles/docker-mailu/tasks/main.yml index d549c96c..6aa7d45a 100644 --- a/roles/docker-mailu/tasks/main.yml +++ b/roles/docker-mailu/tasks/main.yml @@ -32,13 +32,13 @@ template: src: "docker-compose.yml.j2" dest: "{{docker_compose_instance_directory}}docker-compose.yml" - notify: recreate mailu + notify: docker compose project setup - name: add mailu.env template: src: "mailu.env.j2" dest: "{{docker_compose_instance_directory}}mailu.env" - notify: recreate mailu + notify: docker compose project setup - name: add deploy-letsencrypt-mailu.sh template: diff --git a/roles/docker-mailu/vars/main.yml b/roles/docker-mailu/vars/main.yml index 2f15502a..28e92259 100644 --- a/roles/docker-mailu/vars/main.yml +++ b/roles/docker-mailu/vars/main.yml @@ -1,6 +1,6 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}mailu/" -database_instance: "mailu" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{mailu_database_password}}" \ No newline at end of file +docker_compose_project_name: "mailu" +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: "{{mailu_database_password}}" \ No newline at end of file diff --git a/roles/docker-mastodon/handlers/main.yml b/roles/docker-mastodon/handlers/main.yml deleted file mode 100644 index cfe2dcb4..00000000 --- a/roles/docker-mastodon/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-mastodon/meta/main.yml b/roles/docker-mastodon/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-mastodon/meta/main.yml +++ b/roles/docker-mastodon/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-mastodon/tasks/main.yml b/roles/docker-mastodon/tasks/main.yml index 60863736..1c0c6c96 100644 --- a/roles/docker-mastodon/tasks/main.yml +++ b/roles/docker-mastodon/tasks/main.yml @@ -13,10 +13,10 @@ - name: copy docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml - notify: recreate mastodon + notify: docker compose project setup - name: copy configuration template: src: .env.production.j2 dest: "{{docker_compose_instance_directory}}.env.production" - notify: recreate mastodon + notify: docker compose project setup diff --git a/roles/docker-mastodon/vars/main.yml b/roles/docker-mastodon/vars/main.yml index 7453ec08..6479a2e7 100644 --- a/roles/docker-mastodon/vars/main.yml +++ b/roles/docker-mastodon/vars/main.yml @@ -1,6 +1,6 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}mastodon/" -database_instance: "mastodon" -database_host: "database" -database_databasename: "postgres" # todo: Change this to standart name scheme for future setups -database_username: "postgres" # todo: Change this to standart name scheme for future setups -database_password: "" # todo: Change this to standart name scheme for future setups \ No newline at end of file +docker_compose_project_name: "mastodon" +docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/" +database_host: "database" +database_databasename: "postgres" # todo: Change this to standart name scheme for future setups +database_username: "postgres" # todo: Change this to standart name scheme for future setups +database_password: "" # todo: Change this to standart name scheme for future setups \ No newline at end of file diff --git a/roles/docker-matomo/handlers/main.yml b/roles/docker-matomo/handlers/main.yml deleted file mode 100644 index 65148936..00000000 --- a/roles/docker-matomo/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-matomo/meta/main.yml b/roles/docker-matomo/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-matomo/meta/main.yml +++ b/roles/docker-matomo/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-matomo/tasks/main.yml b/roles/docker-matomo/tasks/main.yml index ff9ca982..994978ba 100644 --- a/roles/docker-matomo/tasks/main.yml +++ b/roles/docker-matomo/tasks/main.yml @@ -12,4 +12,4 @@ template: src: "docker-compose.yml.j2" dest: "{{docker_compose_instance_directory}}docker-compose.yml" - notify: recreate matomo + notify: docker compose project setup diff --git a/roles/docker-matomo/vars/main.yml b/roles/docker-matomo/vars/main.yml index e11fc64e..c3ffd341 100644 --- a/roles/docker-matomo/vars/main.yml +++ b/roles/docker-matomo/vars/main.yml @@ -1,7 +1,7 @@ --- -docker_compose_instance_directory: "{{path_docker_compose_instances}}matomo/" -database_instance: "matomo" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{matomo_database_password}}" \ No newline at end of file +docker_compose_project_name: "matomo" +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}}" \ No newline at end of file diff --git a/roles/docker-matrix-compose/handlers/main.yml b/roles/docker-matrix-compose/handlers/main.yml deleted file mode 100644 index 6a081ccb..00000000 --- a/roles/docker-matrix-compose/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-matrix-compose/meta/main.yml b/roles/docker-matrix-compose/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-matrix-compose/meta/main.yml +++ b/roles/docker-matrix-compose/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-matrix-compose/tasks/main.yml b/roles/docker-matrix-compose/tasks/main.yml index bdaae94c..8e6f4a15 100644 --- a/roles/docker-matrix-compose/tasks/main.yml +++ b/roles/docker-matrix-compose/tasks/main.yml @@ -27,25 +27,25 @@ # template: # src: "whatsapp-bridge-config.yml.j2" # dest: "{{docker_compose_instance_directory}}mautrix_whatsapp/config.yml" -# notify: recreate matrix +# notify: docker compose project setup - name: add element-config.json template: src: "element-config.json.j2" dest: "{{docker_compose_instance_directory}}element-config.json" - notify: recreate matrix + notify: docker compose project setup - name: add homeserver.yaml template: src: "homeserver.yaml.j2" dest: "{{docker_compose_instance_directory}}homeserver.yaml" - notify: recreate matrix + notify: docker compose project setup - name: add log.config template: src: "log.config.j2" dest: "{{docker_compose_instance_directory}}{{synapse_domain}}.log.config" - notify: recreate matrix + notify: docker compose project setup # https://github.com/matrix-org/synapse/issues/6303 - name: set correct folder permissions @@ -56,4 +56,4 @@ template: src: "docker-compose.yml.j2" dest: "{{docker_compose_instance_directory}}docker-compose.yml" - notify: recreate matrix + notify: docker compose project setup diff --git a/roles/docker-matrix-compose/vars/main.yml b/roles/docker-matrix-compose/vars/main.yml index 72b3ac94..b2b0a5c4 100644 --- a/roles/docker-matrix-compose/vars/main.yml +++ b/roles/docker-matrix-compose/vars/main.yml @@ -1,7 +1,7 @@ --- -docker_compose_instance_directory: "{{path_docker_compose_instances}}matrix/" -database_instance: "matrix" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{matrix_database_password}}" \ No newline at end of file +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}}" \ No newline at end of file diff --git a/roles/docker-mybb/handlers/main.yml b/roles/docker-mybb/handlers/main.yml deleted file mode 100644 index dab482fc..00000000 --- a/roles/docker-mybb/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-mybb/meta/main.yml b/roles/docker-mybb/meta/main.yml index d3606e63..ec2a6059 100644 --- a/roles/docker-mybb/meta/main.yml +++ b/roles/docker-mybb/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose \ No newline at end of file diff --git a/roles/docker-mybb/tasks/main.yml b/roles/docker-mybb/tasks/main.yml index 781822ab..db179fa1 100644 --- a/roles/docker-mybb/tasks/main.yml +++ b/roles/docker-mybb/tasks/main.yml @@ -16,10 +16,10 @@ template: src: "default.conf" dest: "{{docker_compose_instance_confd_defaultconf_file}}" - notify: recreate mybb + notify: docker compose project setup - name: add docker-compose.yml template: src: "docker-compose.yml.j2" dest: "{{docker_compose_instance_directory}}docker-compose.yml" - notify: recreate mybb + notify: docker compose project setup diff --git a/roles/docker-mybb/vars/main.yml b/roles/docker-mybb/vars/main.yml index e3ff2315..5f33c8a7 100644 --- a/roles/docker-mybb/vars/main.yml +++ b/roles/docker-mybb/vars/main.yml @@ -1,11 +1,11 @@ --- -docker_compose_instance_directory: "{{path_docker_compose_instances}}mybb/" -docker_compose_instance_confd_directory: "{{docker_compose_instance_directory}}conf.d/" +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_defaultconf_file: "{{docker_compose_instance_confd_directory}}default.conf" -target_mount_conf_d_directory: "{{nginx_servers_directory}}" -source_domain: "mybb.{{top_domain}}" -database_instance: "mybb" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{mybb_database_password}}" \ No newline at end of file +target_mount_conf_d_directory: "{{nginx_servers_directory}}" +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}}" \ No newline at end of file diff --git a/roles/docker-nextcloud/handlers/main.yml b/roles/docker-nextcloud/handlers/main.yml deleted file mode 100644 index 01aab9ef..00000000 --- a/roles/docker-nextcloud/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-nextcloud/meta/main.yml b/roles/docker-nextcloud/meta/main.yml index d3606e63..ec2a6059 100644 --- a/roles/docker-nextcloud/meta/main.yml +++ b/roles/docker-nextcloud/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose \ No newline at end of file diff --git a/roles/docker-nextcloud/tasks/main.yml b/roles/docker-nextcloud/tasks/main.yml index 421657e0..2df12ad9 100644 --- a/roles/docker-nextcloud/tasks/main.yml +++ b/roles/docker-nextcloud/tasks/main.yml @@ -18,7 +18,7 @@ template: src: "templates/nginx.conf.j2" dest: "{{path_docker_volumes}}nextcloud/nginx.conf" - notify: recreate nextcloud + notify: docker compose project setup - name: "create {{docker_compose_instance_directory}}" file: @@ -30,4 +30,4 @@ template: src: docker-compose.yml.j2 dest: "{{docker_compose_instance_directory}}docker-compose.yml" - notify: recreate nextcloud + notify: docker compose project setup diff --git a/roles/docker-nextcloud/vars/main.yml b/roles/docker-nextcloud/vars/main.yml index 309c9e28..adf44477 100644 --- a/roles/docker-nextcloud/vars/main.yml +++ b/roles/docker-nextcloud/vars/main.yml @@ -1,7 +1,7 @@ --- -docker_compose_instance_directory: "{{path_docker_compose_instances}}nextcloud/" -database_instance: "nextcloud" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{nextcloud_database_password}}" \ No newline at end of file +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}}" \ No newline at end of file diff --git a/roles/docker-openproject/vars/main.yml b/roles/docker-openproject/vars/main.yml index 4b4440fc..dd549717 100644 --- a/roles/docker-openproject/vars/main.yml +++ b/roles/docker-openproject/vars/main.yml @@ -3,9 +3,8 @@ repository_directory: "{{ path_docker_compose_instances }}{{docker docker_compose_instance_directory: "{{repository_directory}}compose/" docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml" docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml" -database_instance: "{{docker_compose_project_name}}" database_host: "database" -database_databasename: "{{database_instance}}" +database_databasename: "{{docker_compose_project_name}}" database_username: "postgres" database_password: "{{openproject_database_password}}" repository_address: "https://github.com/opf/openproject-deploy" \ No newline at end of file diff --git a/roles/docker-peertube/handlers/main.yml b/roles/docker-peertube/handlers/main.yml deleted file mode 100644 index e5ece492..00000000 --- a/roles/docker-peertube/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-peertube/meta/main.yml b/roles/docker-peertube/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-peertube/meta/main.yml +++ b/roles/docker-peertube/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-peertube/tasks/main.yml b/roles/docker-peertube/tasks/main.yml index 2d8cd050..9a8e6c70 100644 --- a/roles/docker-peertube/tasks/main.yml +++ b/roles/docker-peertube/tasks/main.yml @@ -13,10 +13,10 @@ - name: copy docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml - notify: recreate peertube + notify: docker compose project setup - name: copy configuration template: src: env.j2 dest: "{{docker_compose_instance_directory}}.env" - notify: recreate peertube + notify: docker compose project setup diff --git a/roles/docker-peertube/vars/main.yml b/roles/docker-peertube/vars/main.yml index 90aa77e9..bc8c98d6 100644 --- a/roles/docker-peertube/vars/main.yml +++ b/roles/docker-peertube/vars/main.yml @@ -1,6 +1,6 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}peertube/" -database_instance: "peertube" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{peertube_database_password}}" \ No newline at end of file +docker_compose_project_name: "peertube" +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}}" \ No newline at end of file diff --git a/roles/docker-pixelfed/handlers/main.yml b/roles/docker-pixelfed/handlers/main.yml deleted file mode 100644 index f2c134e8..00000000 --- a/roles/docker-pixelfed/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-pixelfed/meta/main.yml b/roles/docker-pixelfed/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-pixelfed/meta/main.yml +++ b/roles/docker-pixelfed/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-pixelfed/tasks/main.yml b/roles/docker-pixelfed/tasks/main.yml index 41d91a5b..9494f848 100644 --- a/roles/docker-pixelfed/tasks/main.yml +++ b/roles/docker-pixelfed/tasks/main.yml @@ -10,7 +10,7 @@ - name: add docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml - notify: recreate pixelfed + notify: docker compose project setup - name: add env template: @@ -18,4 +18,4 @@ dest: "{{docker_compose_instance_directory}}env" mode: '770' force: yes - notify: recreate pixelfed \ No newline at end of file + notify: docker compose project setup \ No newline at end of file diff --git a/roles/docker-pixelfed/vars/main.yml b/roles/docker-pixelfed/vars/main.yml index b1ef296b..09caeed8 100644 --- a/roles/docker-pixelfed/vars/main.yml +++ b/roles/docker-pixelfed/vars/main.yml @@ -1,7 +1,7 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}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;" -database_instance: "pixelfed" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{pixelfed_database_password}}" +database_host: "database" +database_databasename: "{{docker_compose_project_name}}" +database_username: "{{docker_compose_project_name}}" +database_password: "{{pixelfed_database_password}}" diff --git a/roles/docker-roulette-wheel/handlers/main.yml b/roles/docker-roulette-wheel/handlers/main.yml deleted file mode 100644 index c5bfc07b..00000000 --- a/roles/docker-roulette-wheel/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 \ No newline at end of file diff --git a/roles/docker-roulette-wheel/meta/main.yml b/roles/docker-roulette-wheel/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-roulette-wheel/meta/main.yml +++ b/roles/docker-roulette-wheel/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-roulette-wheel/tasks/main.yml b/roles/docker-roulette-wheel/tasks/main.yml index f94c55f3..3da303c8 100644 --- a/roles/docker-roulette-wheel/tasks/main.yml +++ b/roles/docker-roulette-wheel/tasks/main.yml @@ -13,7 +13,7 @@ repo: "https://github.com/kevinveenbirkenbach/roulette-wheel.git" dest: "{{app_path}}" update: yes - notify: recreate and build roulette-wheel + notify: docker compose project setup become: true register: git_result ignore_errors: true @@ -25,8 +25,8 @@ - name: add docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml - notify: recreate and build roulette-wheel + notify: docker compose project setup - name: add Dockerfile template: src=Dockerfile.j2 dest={{docker_compose_instance_directory}}Dockerfile - notify: recreate and build roulette-wheel + notify: docker compose project setup diff --git a/roles/docker-roulette-wheel/vars/main.yml b/roles/docker-roulette-wheel/vars/main.yml index f081efb9..4fc7c771 100644 --- a/roles/docker-roulette-wheel/vars/main.yml +++ b/roles/docker-roulette-wheel/vars/main.yml @@ -1,2 +1,3 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}roulette-wheel/" -app_path: "{{path_docker_compose_instances}}roulette-wheel/app/" \ No newline at end of file +docker_compose_project_name: "roulette-wheel" +docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/" +app_path: "{{docker_compose_instance_directory}}/app/" \ No newline at end of file diff --git a/roles/docker-wordpress/handlers/main.yml b/roles/docker-wordpress/handlers/main.yml index 284676cc..52c9fdf9 100644 --- a/roles/docker-wordpress/handlers/main.yml +++ b/roles/docker-wordpress/handlers/main.yml @@ -3,13 +3,6 @@ command: cmd: docker build --no-cache -t custom_wordpress . chdir: "{{docker_compose_instance_directory}}" - environment: - COMPOSE_HTTP_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 \ No newline at end of file diff --git a/roles/docker-wordpress/meta/main.yml b/roles/docker-wordpress/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-wordpress/meta/main.yml +++ b/roles/docker-wordpress/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-wordpress/tasks/main.yml b/roles/docker-wordpress/tasks/main.yml index f9738e7a..ce9ba222 100644 --- a/roles/docker-wordpress/tasks/main.yml +++ b/roles/docker-wordpress/tasks/main.yml @@ -19,7 +19,7 @@ src: upload.ini.j2 dest: "{{docker_compose_instance_directory}}upload.ini" notify: - - recreate wordpress + - docker compose project setup - rebuild wordpress container - name: "Transfering Dockerfile to {{docker_compose_instance_directory}}" @@ -27,9 +27,9 @@ src: Dockerfile dest: "{{docker_compose_instance_directory}}Dockerfile" notify: - - recreate wordpress + - docker compose project setup - rebuild wordpress container - name: "add docker-compose.yml to {{docker_compose_instance_directory}}" template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml - notify: recreate wordpress + notify: docker compose project setup diff --git a/roles/docker-wordpress/vars/main.yml b/roles/docker-wordpress/vars/main.yml index fd355179..96b4ff0e 100644 --- a/roles/docker-wordpress/vars/main.yml +++ b/roles/docker-wordpress/vars/main.yml @@ -1,7 +1,7 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}wordpress/" -wordpress_max_upload_size: "64M" -database_instance: "wordpress" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{wordpress_database_password}}" \ No newline at end of file +docker_compose_project_name: "wordpress" +docker_compose_instance_directory: "{{path_docker_compose_instances}}{{docker_compose_project_name}}/" +wordpress_max_upload_size: "64M" +database_host: "database" +database_databasename: "{{docker_compose_project_name}}" +database_username: "{{docker_compose_project_name}}" +database_password: "{{wordpress_database_password}}" \ No newline at end of file diff --git a/roles/docker-yourls/handlers/main.yml b/roles/docker-yourls/handlers/main.yml deleted file mode 100644 index 1c11bee6..00000000 --- a/roles/docker-yourls/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- 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 diff --git a/roles/docker-yourls/meta/main.yml b/roles/docker-yourls/meta/main.yml index d3606e63..03045ca5 100644 --- a/roles/docker-yourls/meta/main.yml +++ b/roles/docker-yourls/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- nginx-docker-reverse-proxy +- docker-compose diff --git a/roles/docker-yourls/tasks/main.yml b/roles/docker-yourls/tasks/main.yml index dd8f2af7..994978ba 100644 --- a/roles/docker-yourls/tasks/main.yml +++ b/roles/docker-yourls/tasks/main.yml @@ -12,4 +12,4 @@ template: src: "docker-compose.yml.j2" dest: "{{docker_compose_instance_directory}}docker-compose.yml" - notify: recreate yourls + notify: docker compose project setup diff --git a/roles/docker-yourls/vars/main.yml b/roles/docker-yourls/vars/main.yml index 0efb2c45..29f0fee5 100644 --- a/roles/docker-yourls/vars/main.yml +++ b/roles/docker-yourls/vars/main.yml @@ -1,6 +1,6 @@ -docker_compose_instance_directory: "{{path_docker_compose_instances}}yourls/" -database_instance: "yourls" -database_host: "database" -database_databasename: "{{database_instance}}" -database_username: "{{database_instance}}" -database_password: "{{yourls_database_password}}" \ No newline at end of file +docker_compose_project_name: "yourls" +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}}" \ No newline at end of file