diff --git a/roles/web-app-openproject/tasks/01_manager_ops.yml b/roles/web-app-openproject/tasks/01_manager_ops.yml index bd0331f1d7..39bb5a9a80 100644 --- a/roles/web-app-openproject/tasks/01_manager_ops.yml +++ b/roles/web-app-openproject/tasks/01_manager_ops.yml @@ -29,6 +29,18 @@ - name: 🚿 flush docker service meta: flush_handlers +- name: ⏳ Wait until the seeder has committed the seed (swarm) + ansible.builtin.script: "{{ lookup('path_absolute', 'roles/sys-svc-compose/files/shell/swarm/job_state.sh') }}" + environment: + JOB: "{{ lookup('container_service', application_id, OPENPROJECT_SEEDER_SERVICE) }}" + register: openproject_seeder_state + changed_when: false + retries: 120 + delay: 10 + until: openproject_seeder_state.rc != 1 + failed_when: openproject_seeder_state.rc != 0 + when: DEPLOYMENT_MODE == 'swarm' + - name: 🚀 Deploy Settings include_tasks: 02_settings.yml diff --git a/roles/web-app-openproject/templates/env.j2 b/roles/web-app-openproject/templates/env.j2 index cc684cdccc..bbbb560daf 100644 --- a/roles/web-app-openproject/templates/env.j2 +++ b/roles/web-app-openproject/templates/env.j2 @@ -19,7 +19,7 @@ OPENPROJECT_AUTH__SOURCE__SSO_LOGOUT__URL={{ OPENPROJECT_SSO_LOGOUT_URL }} {% endif %} POSTGRES_PASSWORD={{ lookup('database', application_id, 'password') | dotenv_quote }} -DATABASE_URL={{ lookup('database', application_id, 'url_full') }}?pool=20&encoding=unicode&reconnect=true +DATABASE_URL={{ lookup('database', application_id, 'url_full') }}?pool=20&encoding=unicode&reconnect=true&keepalives=1&keepalives_idle=60&keepalives_interval=10&keepalives_count=6&tcp_user_timeout=120000 DB_POOL={{ OPENPROJECT_DB_POOL }} RAILS_MAX_THREADS={{ OPENPROJECT_RAILS_MAX_THREADS }} RAILS_MIN_THREADS=4