diff --git a/templates/compose.yaml b/templates/compose.yaml index 644f89f..3a3111d 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -5,35 +5,32 @@ services: image: {{ registry_url }}/{{ registry_project }}/{{ chill_image_nginx_name }}:{{ chill.chill_image_tag }} links: - app:php - - {% if traefik_install %} +{% 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' +%} +{% if chill.tls_config == 'self_signed' %} - "traefik.http.routers.frontend-{{ chill.chill_environment }}.tls=true" - {%+ endif +%} - {%+ if chill.expose_port is not false +%} +{% 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' +%} +{% 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 +%} +{% endif %} +{% endif %} +{% endif %} +{% if chill.expose_port is not false %} ports: - "{{ chill.expose_port }}:80" - {%+ endif %} +{% endif %} networks: - - {% if traefik_install %} +{% if traefik_install %} - traefik - {% endif %} +{% endif %} - default restart: always @@ -50,20 +47,19 @@ services: volumes: - './config/prod:/var/www/app/config/packages/prod:ro' - '/var/log/chill:/var/www/app/var/log:rw' - {% if chill.load_template_override +%} +{% if chill.load_template_override %} - './templates:/var/www/app/templates:ro' - {%+ endif %} +{% endif %} - '{{ doc_storage_dir }}/{{ chill['chill_environment'] }}:/var/storage:rw' links: - redis - relatorio - {% if chill.rabbitmq_install +%} +{% if chill.rabbitmq_install %} - rabbitmq - {%+ endif %} - - {% if chill.add_postgres -%} +{% endif %} +{% if chill.add_postgres %} - database - {%- endif %} +{% endif %} networks: - default @@ -99,8 +95,7 @@ services: entrypoint: "/usr/bin/env" command: ["bin/console", "chill:cron-job:execute", "-v"] restart: "no" - - {% if chill.add_postgres %} +{% if chill.add_postgres %} database: image: "{{ database_image }}" @@ -111,8 +106,7 @@ services: networks: - default restart: always - - {% endif %} +{% endif %} ###> chill-project/chill-bundles ### redis: @@ -161,8 +155,7 @@ services: # depends_on: # rabbitmq: # condition: service_healthy - - {% if chill.rabbitmq_install +%} +{% if chill.rabbitmq_install %} rabbitmq: image: "{{ chill_image_rabbitmq }}" env_file: @@ -180,13 +173,12 @@ services: options: max-size: "10m" max-file: "3" - {% endif %} +{% endif %} networks: - - {% if traefik_install %} +{% if traefik_install %} traefik: external: true - {% endif %} +{% endif %} default: \ No newline at end of file