Updated discourse for docker-update role

This commit is contained in:
2025-02-13 14:11:06 +01:00
parent d276918bcf
commit 998f4e383d
8 changed files with 71 additions and 86 deletions

View File

@@ -1,7 +1,7 @@
---
- name: "stop and remove discourse container if it exist"
docker_container:
name: "{{discourse_application_container}}"
name: "{{applications.discourse.container}}"
state: absent
register: container_action
failed_when: container_action.failed and 'No such container' not in container_action.msg
@@ -16,6 +16,6 @@
- name: rebuild discourse
command:
cmd: "./launcher rebuild {{discourse_application_container}}"
cmd: "./launcher rebuild {{applications.discourse.container}}"
chdir: "{{discourse_repository_directory}}"
listen: recreate discourse

View File

@@ -60,9 +60,9 @@
- name: flush, to recreate discourse app
meta: flush_handlers
- name: "add {{discourse_application_container}} to network central_postgres"
- name: "add {{applications.discourse.container}} to network central_postgres"
command:
cmd: "docker network connect central_postgres {{discourse_application_container}}"
cmd: "docker network connect central_postgres {{applications.discourse.container}}"
ignore_errors: true
when: enable_central_database | bool

View File

@@ -130,4 +130,4 @@ run:
docker_args:
- --network={{application_id}}_default
- --name={{discourse_application_container}}
- --name={{applications.discourse.container}}

View File

@@ -1,6 +1,5 @@
application_id: "discourse"
discourse_application_container: "discourse_application"
database_password: "{{ discourse_database_password }}"
database_password: "{{ applications.discourse.database_password }}"
database_type: "postgres"
discourse_repository_directory: "{{docker_compose.directories.services}}repository/"
discourse_application_yml_destination: "{{discourse_repository_directory}}containers/discourse_application.yml"
discourse_repository_directory: "{{docker_compose.directories.services}}{{applications.discourse.repository}}/"
discourse_application_yml_destination: "{{discourse_repository_directory}}containers/{{applications.discourse.container}}.yml"