Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ name: Review
jobs:
validate-compose:
runs-on: ubuntu-latest
env: &env
# All environment variables that require a non-empty value in our compose
# files (cf.
# https://docs.docker.com/reference/compose-file/interpolation/)
COMPOSE_DOMAIN: test.local.example.org
COMPOSE_PROJECT_NAME: test_project
COMPOSE_SERVER_DOMAIN: test.example.org
strategy:
fail-fast: false
matrix:
Expand All @@ -21,20 +28,21 @@ jobs:

- name: Validate local docker compose files
run: |
DC=$(COMPOSE_DOMAIN=example.org docker compose --file templates/${{ matrix.version }}/docker-compose.yml config --quiet 2>&1)
DC=$(docker compose --file templates/${{ matrix.version }}/docker-compose.yml config --quiet 2>&1)
[ -z "$DC" ] || { echo $DC; exit 1; }

- name: Validate server docker compose files
run: |
DC=$(COMPOSE_SERVER_DOMAIN=example.org docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml config --quiet 2>&1)
DC=$(docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml config --quiet 2>&1)
[ -z "$DC" ] || { echo $DC; exit 1; }
DC=$(COMPOSE_SERVER_DOMAIN=example.org docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.dev.yml config --quiet 2>&1)
DC=$(docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.dev.yml config --quiet 2>&1)
[ -z "$DC" ] || { echo $DC; exit 1; }
DC=$(COMPOSE_SERVER_DOMAIN=example.org docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.redirect.yml config --quiet 2>&1)
DC=$(docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.redirect.yml config --quiet 2>&1)
[ -z "$DC" ] || { echo $DC; exit 1; }

validate-nginx-conf:
runs-on: ubuntu-latest
env: *env
strategy:
fail-fast: false
matrix:
Expand All @@ -53,4 +61,4 @@ jobs:

- name: Validate nginx conf
run: |
COMPOSE_DOMAIN=example.org docker compose --file templates/${{ matrix.version }}/${{ matrix.compose_file}} run --rm nginx nginx -t
docker compose --file templates/${{ matrix.version }}/${{ matrix.compose_file}} run --rm nginx nginx -t
16 changes: 8 additions & 8 deletions templates/drupal-10/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:

nginx:
labels:
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=ITKBasicAuth@file"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}.middlewares=ITKBasicAuth@file"

mail:
image: axllent/mailpit
Expand All @@ -17,11 +17,11 @@ services:
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}-http.rule=Host(`mail.${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}-http.rule=Host(`mail.${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}-http.entrypoints=web"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}.rule=Host(`mail.${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
- "traefik.http.services.mail_${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=8025"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}.middlewares=ITKMailhogAuth@file"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}.rule=Host(`mail.${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}.entrypoints=websecure"
- "traefik.http.services.mail_${COMPOSE_PROJECT_NAME:?}.loadbalancer.server.port=8025"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}.middlewares=ITKMailhogAuth@file"
14 changes: 7 additions & 7 deletions templates/drupal-10/docker-compose.redirect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ services:
nginx:
labels:
# Add www before domain and set redirect to non-www
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}-http.rule=Host(`www.${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https,non_www"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}.rule=Host(`www.${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}.middlewares=non_www"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}-http.rule=Host(`www.${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}-http.entrypoints=web"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}-http.middlewares=redirect-to-https,non_www"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}.rule=Host(`www.${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}.entrypoints=websecure"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}.middlewares=non_www"

- traefik.http.middlewares.non_www.redirectregex.regex=^(http|https)?://(?:www\.)?(.+)
- traefik.http.middlewares.non_www.redirectregex.replacement=https://$${2}
- traefik.http.middlewares.non_www.redirectregex.replacement=https://$${2:?}
- traefik.http.middlewares.non_www.redirectregex.permanent=true
20 changes: 10 additions & 10 deletions templates/drupal-10/docker-compose.server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
- PHP_MAX_EXECUTION_TIME=30
- PHP_MEMORY_LIMIT=128M
# Let drush know the site uri (makes using --uri redundant)
- DRUSH_OPTIONS_URI=https://${COMPOSE_SERVER_DOMAIN}
- DRUSH_OPTIONS_URI=https://${COMPOSE_SERVER_DOMAIN:?}
depends_on:
- memcached
volumes:
Expand All @@ -37,23 +37,23 @@ services:
- ./.docker/nginx.conf:/etc/nginx/nginx.conf:ro
- .:/app
environment:
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9000
NGINX_CRON_METRICS: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9746
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME:?}-phpfpm-1:9000
NGINX_CRON_METRICS: ${COMPOSE_PROJECT_NAME:?}-phpfpm-1:9746
NGINX_WEB_ROOT: /app/web
NGINX_PORT: 8080
NGINX_MAX_BODY_SIZE: 5M
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-http.rule=Host(`${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-http.entrypoints=web"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}.rule=Host(`${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}.entrypoints=websecure"
# Cron-metrics protection.
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-metrics.rule=Host(`${COMPOSE_DOMAIN}`) && PathPrefix(`/cron-metrics`) "
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-metrics.middlewares=ITKMetricsAuth@file"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-metrics.rule=Host(`${COMPOSE_DOMAIN:?}`) && PathPrefix(`/cron-metrics`) "
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-metrics.middlewares=ITKMetricsAuth@file"

memcached:
image: memcached:alpine
Expand Down
20 changes: 10 additions & 10 deletions templates/drupal-10/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ services:
- PHP_MEMORY_LIMIT=256M
# Depending on the setup, you may have to remove --read-envelope-from from msmtp (cf. https://marlam.de/msmtp/msmtp.html) or use SMTP to send mail
- PHP_SENDMAIL_PATH=/usr/bin/msmtp --host=mail --port=1025 --read-recipients --read-envelope-from
- DOCKER_HOST_DOMAIN=${COMPOSE_DOMAIN}
- DOCKER_HOST_DOMAIN=${COMPOSE_DOMAIN:?}
- PHP_IDE_CONFIG=serverName=localhost
# Let drush know the site uri (makes using --uri redundant)
- DRUSH_OPTIONS_URI=http://${COMPOSE_DOMAIN}
- DRUSH_OPTIONS_URI=http://${COMPOSE_DOMAIN:?}
depends_on:
mariadb:
condition: service_healthy
Expand All @@ -67,21 +67,21 @@ services:
- ./.docker/templates:/etc/nginx/templates:ro
- .:/app
environment:
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9000
NGINX_CRON_METRICS: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9746
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME:?}-phpfpm-1:9000
NGINX_CRON_METRICS: ${COMPOSE_PROJECT_NAME:?}-phpfpm-1:9746
NGINX_WEB_ROOT: /app/web
NGINX_PORT: 8080
NGINX_MAX_BODY_SIZE: 5M
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}.rule=Host(`${COMPOSE_DOMAIN:?}`)"
# HTTPS config - uncomment to enable redirect from :80 to :443
# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https"
# - "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}.middlewares=redirect-to-https"
# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
# Cron-metrics protection (metrics:metrics for local testing).
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-metrics.rule=Host(`${COMPOSE_DOMAIN}`) && PathPrefix(`/cron-metrics`) "
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-metrics.middlewares=ITKMetricsAuth@file"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-metrics.rule=Host(`${COMPOSE_DOMAIN:?}`) && PathPrefix(`/cron-metrics`) "
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-metrics.middlewares=ITKMetricsAuth@file"

memcached:
image: memcached:alpine
Expand All @@ -107,8 +107,8 @@ services:
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}mail.rule=Host(`mail-${COMPOSE_DOMAIN}`)"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}mail.loadbalancer.server.port=8025"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}mail.rule=Host(`mail-${COMPOSE_DOMAIN:?}`)"
- "traefik.http.services.${COMPOSE_PROJECT_NAME:?}mail.loadbalancer.server.port=8025"

# Code checks tools
markdownlint:
Expand Down
16 changes: 8 additions & 8 deletions templates/drupal-11/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:

nginx:
labels:
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=ITKBasicAuth@file"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}.middlewares=ITKBasicAuth@file"

mail:
image: axllent/mailpit
Expand All @@ -17,11 +17,11 @@ services:
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}-http.rule=Host(`mail.${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}-http.rule=Host(`mail.${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}-http.entrypoints=web"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}.rule=Host(`mail.${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
- "traefik.http.services.mail_${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=8025"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME}.middlewares=ITKMailhogAuth@file"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}.rule=Host(`mail.${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}.entrypoints=websecure"
- "traefik.http.services.mail_${COMPOSE_PROJECT_NAME:?}.loadbalancer.server.port=8025"
- "traefik.http.routers.mail_${COMPOSE_PROJECT_NAME:?}.middlewares=ITKMailhogAuth@file"
14 changes: 7 additions & 7 deletions templates/drupal-11/docker-compose.redirect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ services:
nginx:
labels:
# Add www before domain and set redirect to non-www
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}-http.rule=Host(`www.${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https,non_www"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}.rule=Host(`www.${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME}.middlewares=non_www"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}-http.rule=Host(`www.${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}-http.entrypoints=web"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}-http.middlewares=redirect-to-https,non_www"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}.rule=Host(`www.${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}.entrypoints=websecure"
- "traefik.http.routers.www_${COMPOSE_PROJECT_NAME:?}.middlewares=non_www"

- traefik.http.middlewares.non_www.redirectregex.regex=^(http|https)?://(?:www\.)?(.+)
- traefik.http.middlewares.non_www.redirectregex.replacement=https://$${2}
- traefik.http.middlewares.non_www.redirectregex.replacement=https://$${2:?}
- traefik.http.middlewares.non_www.redirectregex.permanent=true
20 changes: 10 additions & 10 deletions templates/drupal-11/docker-compose.server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
- PHP_MAX_EXECUTION_TIME=30
- PHP_MEMORY_LIMIT=128M
# Let drush know the site uri (makes using --uri redundant)
- DRUSH_OPTIONS_URI=https://${COMPOSE_SERVER_DOMAIN}
- DRUSH_OPTIONS_URI=https://${COMPOSE_SERVER_DOMAIN:?}
depends_on:
- memcached
volumes:
Expand All @@ -37,23 +37,23 @@ services:
- ./.docker/nginx.conf:/etc/nginx/nginx.conf:ro
- .:/app
environment:
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9000
NGINX_CRON_METRICS: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9746
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME:?}-phpfpm-1:9000
NGINX_CRON_METRICS: ${COMPOSE_PROJECT_NAME:?}-phpfpm-1:9746
NGINX_WEB_ROOT: /app/web
NGINX_PORT: 8080
NGINX_MAX_BODY_SIZE: 5M
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-http.rule=Host(`${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-http.entrypoints=web"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}.rule=Host(`${COMPOSE_SERVER_DOMAIN:?}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}.entrypoints=websecure"
# Cron-metrics protection.
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-metrics.rule=Host(`${COMPOSE_DOMAIN}`) && PathPrefix(`/cron-metrics`) "
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-metrics.middlewares=ITKMetricsAuth@file"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-metrics.rule=Host(`${COMPOSE_DOMAIN:?}`) && PathPrefix(`/cron-metrics`) "
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-metrics.middlewares=ITKMetricsAuth@file"

memcached:
image: memcached:alpine
Expand Down
20 changes: 10 additions & 10 deletions templates/drupal-11/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ services:
- PHP_MEMORY_LIMIT=256M
# Depending on the setup, you may have to remove --read-envelope-from from msmtp (cf. https://marlam.de/msmtp/msmtp.html) or use SMTP to send mail
- PHP_SENDMAIL_PATH=/usr/bin/msmtp --host=mail --port=1025 --read-recipients --read-envelope-from
- DOCKER_HOST_DOMAIN=${COMPOSE_DOMAIN}
- DOCKER_HOST_DOMAIN=${COMPOSE_DOMAIN:?}
- PHP_IDE_CONFIG=serverName=localhost
# Let drush know the site uri (makes using --uri redundant)
- DRUSH_OPTIONS_URI=http://${COMPOSE_DOMAIN}
- DRUSH_OPTIONS_URI=http://${COMPOSE_DOMAIN:?}
depends_on:
mariadb:
condition: service_healthy
Expand All @@ -64,21 +64,21 @@ services:
- ./.docker/templates:/etc/nginx/templates:ro
- .:/app
environment:
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9000
NGINX_CRON_METRICS: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9746
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME:?}-phpfpm-1:9000
NGINX_CRON_METRICS: ${COMPOSE_PROJECT_NAME:?}-phpfpm-1:9746
NGINX_WEB_ROOT: /app/web
NGINX_PORT: 8080
NGINX_MAX_BODY_SIZE: 5M
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}.rule=Host(`${COMPOSE_DOMAIN:?}`)"
# HTTPS config - enable redirect from :80 to :443
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
# Cron-metrics protection.
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-metrics.rule=Host(`${COMPOSE_DOMAIN}`) && PathPrefix(`/cron-metrics`) "
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-metrics.middlewares=ITKMetricsAuth@file"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-metrics.rule=Host(`${COMPOSE_DOMAIN:?}`) && PathPrefix(`/cron-metrics`) "
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}-metrics.middlewares=ITKMetricsAuth@file"

memcached:
image: memcached:alpine
Expand All @@ -104,8 +104,8 @@ services:
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}mail.rule=Host(`mail-${COMPOSE_DOMAIN}`)"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}mail.loadbalancer.server.port=8025"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME:?}mail.rule=Host(`mail-${COMPOSE_DOMAIN:?}`)"
- "traefik.http.services.${COMPOSE_PROJECT_NAME:?}mail.loadbalancer.server.port=8025"

# Code checks tools
markdownlint:
Expand Down
Loading