Files
ansible-role-chill/templates/compose.yaml
T
julienfastreandClaude Sonnet 5.5 1dc092f87f Fix indentation of rendered compose.yaml
Jinja control tags are now at column 0 without whitespace modifiers: with
trim_blocks, the whole tag line disappears and no stray spaces are added
before the following line.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VnXP3D1srf5k8MrtPFUz93
2026-11-20 15:55:22 +01:00

184 lines
5.6 KiB
YAML

# This file is managed by ansible. Do not edit it by hand
services:
frontend:
image: {{ registry_url }}/{{ registry_project }}/{{ chill_image_nginx_name }}:{{ chill.chill_image_tag }}
links:
- app:php
{% if traefik_install %}
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.frontend-{{ chill.chill_environment }}.rule=Host(`{{ chill.host }}`)"
- "traefik.http.routers.frontend-{{ chill.chill_environment }}.entrypoints=websecure"
{% if chill.tls_config == 'self_signed' %}
- "traefik.http.routers.frontend-{{ chill.chill_environment }}.tls=true"
{% endif %}
{% if chill.expose_port is not false %}
- "traefik.http.routers.frontend-exp-{{ chill.chill_environment }}.rule=PathPrefix(`/`)"
- "traefik.http.routers.frontend-exp-{{ chill.chill_environment }}.entrypoints=chill{{ chill.chill_environment }}"
{% if chill.tls_config == 'self_signed' %}
- "traefik.http.routers.frontend-exp-{{ chill.chill_environment }}.tls=true"
{% endif %}
{% endif %}
{% endif %}
{% if chill.expose_port is not false %}
ports:
- "{{ chill.expose_port }}:80"
{% endif %}
networks:
{% if traefik_install %}
- traefik
{% endif %}
- default
restart: always
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
app: &defaultApp
image: {{ registry_url }}/{{ registry_project }}/{{ chill_image_php_name }}:{{ chill.chill_image_tag }}
env_file:
- env_file.env
volumes:
- './config/prod:/var/www/app/config/packages/prod:ro'
- '/var/log/chill:/var/www/app/var/log:rw'
{% if chill.load_template_override %}
- './templates:/var/www/app/templates:ro'
{% endif %}
- '{{ doc_storage_dir }}/{{ chill['chill_environment'] }}:/var/storage:rw'
links:
- redis
- relatorio
{% if chill.rabbitmq_install %}
- rabbitmq
{% endif %}
{% if chill.add_postgres %}
- database
{% endif %}
networks:
- default
restart: always
logging:
driver: json-file
options:
max-size: "50m"
max-file: "3"
consumer:
<<: *defaultApp
entrypoint: "/usr/bin/env"
environment:
CLEAR_CACHE: "false" # pre-generating the cache cause issue with permissions on the cache directory.
command:
- "/bin/bash"
- "-c"
- >
sleep 3 && bin/console cache:clear &&
while ! [ -f /tmp/kill_me ];
do
php -d memory_limit=3G bin/console messenger:consume priority async --limit=40 --time-limit=600 -v;
done;
pre_stop:
- command:
- "/bin/bash"
- "-c"
- "touch /tmp/kill_me && bin/console messenger:stop-workers"
cron:
<<: *defaultApp
entrypoint: "/usr/bin/env"
command: ["bin/console", "chill:cron-job:execute", "-v"]
restart: "no"
{% if chill.add_postgres %}
database:
image: "{{ database_image }}"
env_file:
- postgres.env
volumes:
- ./docker/db/data:/var/lib/postgresql/data:rw
networks:
- default
restart: always
{% endif %}
###> chill-project/chill-bundles ###
redis:
image: "{{ chill_image_redis }}"
networks:
- default
restart: always
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
relatorio:
image: "{{ chill_image_relatorio }}"
networks:
- default
restart: always
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
###< chill-project/chill-bundles ###
# sign-worker:
# image: h3m6q87t.gra7.container-registry.ovh.net/sign-pdf-worker/worker:latest
# environment:
# AMQP_URL: amqp://guest:guest@rabbitmq:5672/%2f/to_python_sign
# LOG_LEVEL: INFO
# PKCS12_PATH: /etc/sign-pdf/dummy.p12
# TIMESTAMP_URL: http://freetsa.org/tsr
# QUEUE_IN: to_python_sign
# EXCHANGE_OUT: signed_docs
# OUT_ROUTING_KEY: signed_doc
# TSA_CERT_CHAIN: /etc/sign-pdf/tsa/tsa-chain.pem
# TSA_CONFIG_PATH: /etc/sign-pdf/rootca.conf
# TSA_KEY_PASSWORD: "5678"
# volumes:
# - "./resources/dev-certificate/dummy.p12:/etc/sign-pdf/dummy.p12:ro"
# - "./resources/dev-certificate/rootca.conf:/etc/sign-pdf/rootca.conf:ro"
# - "./resources/dev-certificate/tsa:/etc/sign-pdf/tsa:ro"
# - "./resources/dev-certificate/tsa_serial:/var/lib/tsa/tsa_serial:rw"
# links:
# - rabbitmq
# depends_on:
# rabbitmq:
# condition: service_healthy
{% if chill.rabbitmq_install %}
rabbitmq:
image: "{{ chill_image_rabbitmq }}"
env_file:
- rabbitmq.env
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
networks:
- default
restart: always
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
{% endif %}
networks:
{% if traefik_install %}
traefik:
external: true
{% endif %}
default: