From 309e237f5cad5ec7161232a01fa7c1fb679aad81 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 24 Dec 2023 21:42:32 +0100 Subject: [PATCH] Solved bugs --- roles/docker-openproject/tasks/main.yml | 13 +------------ .../templates/docker-compose.yml.j2 | 6 +++++- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/roles/docker-openproject/tasks/main.yml b/roles/docker-openproject/tasks/main.yml index e3b8ff88..322c65ef 100644 --- a/roles/docker-openproject/tasks/main.yml +++ b/roles/docker-openproject/tasks/main.yml @@ -2,18 +2,6 @@ - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml -- name: register repository_directory_register - stat: - path: "{{repository_directory}}" - register: repository_directory_register - -- name: checkout repository - ansible.builtin.shell: git checkout . - become: true - args: - chdir: "{{repository_directory}}" - when: repository_directory_register.stat.exists - - name: "backup docker-compose.yml if it exists" command: > mv "{{ docker_compose_file_path }}" "{{ docker_compose_backup_path }}" @@ -26,6 +14,7 @@ repo: "https://github.com/opf/openproject-deploy" dest: "{{ repository_directory }}" update: yes + force: yes notify: recreate openproject become: true register: git_result diff --git a/roles/docker-openproject/templates/docker-compose.yml.j2 b/roles/docker-openproject/templates/docker-compose.yml.j2 index 4380a345..18339d43 100644 --- a/roles/docker-openproject/templates/docker-compose.yml.j2 +++ b/roles/docker-openproject/templates/docker-compose.yml.j2 @@ -28,6 +28,7 @@ x-op-app: &app IMAP_ENABLED: "${IMAP_ENABLED:-false}" volumes: - "${OPDATA}:/var/openproject/assets" + - "${PGDATA}:/var/openproject/pgdata" services: db: @@ -60,7 +61,10 @@ services: - web networks: - frontend - + volumes: + - "${OPDATA}:/var/openproject/assets" + - "${PGDATA}:/var/openproject/pgdata" + web: <<: *app command: "./docker/prod/web"