mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 23:38:13 +02:00
- Added conditional '--pull' flag on retry in docker-compose build handler, tied to MODE_UPDATE - Added 'pull_policy: never' to multiple docker-compose service templates to prevent unwanted image pulls - Fixed minor formatting issues (e.g. Nextcloud volume spacing, WordPress desktop alignment) Reference: https://chatgpt.com/share/68b0207a-4d9c-800f-b76f-9515885e5183
100 lines
3.5 KiB
Django/Jinja
100 lines
3.5 KiB
Django/Jinja
# @todo Test which containers can be removed crom cental_database networks
|
|
x-op-app: &app
|
|
logging:
|
|
driver: journald
|
|
image: {{ openproject_custom_image }}
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
pull_policy: never
|
|
|
|
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
|
|
|
cache:
|
|
image: "{{ openproject_cache_image}}:{{ openproject_cache_version }}"
|
|
container_name: {{ openproject_cache_name }}
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
|
|
proxy:
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
image: {{ openproject_custom_image }}
|
|
container_name: {{ openproject_proxy_name }}
|
|
command: "./docker/prod/proxy"
|
|
ports:
|
|
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
|
|
environment:
|
|
APP_HOST: web
|
|
depends_on:
|
|
- web
|
|
volumes:
|
|
- "data:/var/openproject/assets"
|
|
- "{{ openproject_dummy_volume }}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
|
|
|
web:
|
|
<<: *app
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
command: "./docker/prod/web"
|
|
container_name: {{ openproject_web_name }}
|
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
|
{% include 'roles/docker-container/templates/depends_on/dmbs_incl.yml.j2' %}
|
|
cache:
|
|
condition: service_started
|
|
seeder:
|
|
condition: service_started
|
|
{% set container_port = 8080 %}
|
|
{% set container_healthcheck = 'health_checks/default' %}
|
|
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
|
volumes:
|
|
- "data:/var/openproject/assets"
|
|
- "{{ openproject_dummy_volume }}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
|
|
|
worker:
|
|
<<: *app
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
command: "./docker/prod/worker"
|
|
container_name: {{ openproject_worker_name }}
|
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
|
{% include 'roles/docker-container/templates/depends_on/dmbs_incl.yml.j2' %}
|
|
cache:
|
|
condition: service_started
|
|
seeder:
|
|
condition: service_started
|
|
volumes:
|
|
- "data:/var/openproject/assets"
|
|
- "{{ openproject_dummy_volume }}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
|
|
|
|
|
cron:
|
|
<<: *app
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
command: "./docker/prod/cron"
|
|
container_name: {{ openproject_cron_name }}
|
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
|
{% include 'roles/docker-container/templates/depends_on/dmbs_incl.yml.j2' %}
|
|
cache:
|
|
condition: service_started
|
|
seeder:
|
|
condition: service_started
|
|
volumes:
|
|
- "data:/var/openproject/assets"
|
|
- "{{ openproject_dummy_volume }}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
|
|
|
seeder:
|
|
<<: *app
|
|
command: "./docker/prod/seeder"
|
|
container_name: {{ openproject_seeder_name }}
|
|
env_file:
|
|
- "{{ docker_compose.files.env }}"
|
|
logging:
|
|
driver: journald
|
|
restart: on-failure
|
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
|
volumes:
|
|
- "data:/var/openproject/assets"
|
|
- "{{ openproject_dummy_volume }}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
|
|
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
|
data:
|
|
name: {{ openproject_volume }}
|
|
|
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %} |