Skip to content

Commit

Permalink
Merge branch 'hotfix/v2.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Dec 16, 2024
2 parents 183e91b + eb18564 commit efcacee
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 34 deletions.
12 changes: 6 additions & 6 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ HTTP_CACHE_STALE_WHILE_REVALIDATE=60
#
# 127.0.0.1 roadiz-skeleton.test roadiz-skeleton.local varnish.roadiz-skeleton.test varnish.roadiz-skeleton.local pma.roadiz-skeleton.test pma.roadiz-skeleton.local solr.roadiz-skeleton.test solr.roadiz-skeleton.local mail.roadiz-skeleton.test mail.roadiz-skeleton.local
#
#HOSTNAME=`roadiz-skeleton.test`,`roadiz-skeleton.local`
#HOSTNAME=`^roadiz\-skeleton\.(test|local)$`
# Default dev env use varnish
HOSTNAME_VARNISH=`roadiz-skeleton.test`,`roadiz-skeleton.local`
HOSTNAME_VARNISH=`^roadiz\-skeleton\.(test|local)$`
# Use traefik path_prefix to host API and NuxtJS on the same domain
PATH_PREFIX=`/rz-admin`,`/files`,`/assets`,`/themes`,`/bundles`,`/api`,`/_wdt`,`/_profiler`,`/css/main-color.css`,`/custom-form`,`/css/login/image`
PATH_PREFIX=`(?i)^/(rz\-admin|files|assets|themes|bundles|api|_wdt|_profiler|css/main\-color\.css|custom\-form|css/login/image)`

REDIRECT_REGEX=^(https?)://api\.roadiz\-skeleton\.test/(.*)
## Dollar char may be interpolated or not depending your system
## check docker inspect your container to see final label value
REDIRECT_REPLACEMENT=$1://roadiz\-skeleton\.test/$2

HOSTNAME_PMA=`pma.roadiz-skeleton.test`,`pma.roadiz-skeleton.local`
HOSTNAME_SOLR=`solr.roadiz-skeleton.test`,`solr.roadiz-skeleton.local`
HOSTNAME_MAILER=`mail.roadiz-skeleton.test`,`mail.roadiz-skeleton.local`
HOSTNAME_PMA=`^pma\.roadiz\-skeleton\.(test|local)$`
HOSTNAME_SOLR=`^solr\.roadiz\-skeleton\.(test|local)$`
HOSTNAME_MAILER=`^(mail|mailer)\.roadiz\-skeleton\.(test|local)$`

###> symfony/lock ###
# Choose one of the stores below
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to project will be documented in this file.

## [2.4.3](https://github.com/roadiz/skeleton/compare/v2.4.2...v2.4.3) - 2024-12-16

### Bug Fixes

- Use `HostRegexp` and `PathRegexp` for Traefik v3 compatibility - ([b924d22](https://github.com/roadiz/skeleton/commit/b924d22ccc1b95412972a6c1ba58d056eedfa04f)) - Ambroise Maupate

## [2.4.2](https://github.com/roadiz/skeleton/compare/v2.4.1...v2.4.2) - 2024-12-11

### Bug Fixes
Expand Down
20 changes: 6 additions & 14 deletions compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ services:
- default
labels:
- "traefik.enable=true"
- "com.centurylinklabs.watchtower.enable=true"
- "com.centurylinklabs.watchtower.depends-on=/skeleton-nginx-1,/skeleton-worker-1,/skeleton-cron-1"
# Traefik v2 -----------------------------------------------------
- "traefik.http.services.${APP_NAMESPACE}.loadbalancer.server.scheme=http"
- "traefik.http.services.${APP_NAMESPACE}.loadbalancer.server.port=80"
Expand All @@ -59,19 +57,19 @@ services:
# - "traefik.http.services.${APP_NAMESPACE}.loadbalancer.healthcheck.headers.x-health-check=${APP_HEALTH_CHECK_TOKEN}"
# Listen HTTP
- "traefik.http.routers.${APP_NAMESPACE}.entrypoints=http"
# Always use higher priority for your API app with PathPrefix rule
# Always use higher priority for your API app with PathRegexp rule
- "traefik.http.routers.${APP_NAMESPACE}.priority=11"
# Combine Host and PathPrefix to allow API and Frontend to share same domain name
- "traefik.http.routers.${APP_NAMESPACE}.rule=Host(${HOSTNAME}) && PathPrefix(${PATH_PREFIX})"
# Combine Host and PathRegexp to allow API and Frontend to share same domain name
- "traefik.http.routers.${APP_NAMESPACE}.rule=HostRegexp(${HOSTNAME}) && PathRegexp(${PATH_PREFIX})"
- "traefik.http.routers.${APP_NAMESPACE}.service=${APP_NAMESPACE}"
# Listen HTTPS
- "traefik.http.routers.${APP_NAMESPACE}_secure.entrypoints=https"
- "traefik.http.routers.${APP_NAMESPACE}_secure.tls=true"
# Always use higher priority for your API app with PathPrefix rule
# Always use higher priority for your API app with PathRegexp rule
- "traefik.http.routers.${APP_NAMESPACE}_secure.priority=11"
- "traefik.http.routers.${APP_NAMESPACE}_secure.tls.certresolver=letsencrypt"
# Combine Host and PathPrefix to allow API and Frontend to share same domain name
- "traefik.http.routers.${APP_NAMESPACE}_secure.rule=Host(${HOSTNAME}) && PathPrefix(${PATH_PREFIX})"
# Combine Host and PathRegexp to allow API and Frontend to share same domain name
- "traefik.http.routers.${APP_NAMESPACE}_secure.rule=HostRegexp(${HOSTNAME}) && PathRegexp(${PATH_PREFIX})"
- "traefik.http.routers.${APP_NAMESPACE}_secure.service=${APP_NAMESPACE}"
#
# Apply middlewares
Expand Down Expand Up @@ -106,9 +104,6 @@ services:
#- ./robots.txt:/app/public/robots.txt:ro
- app_file_data:/app/public/files:ro
- app_assets_data:/app/public/assets:ro
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "com.centurylinklabs.watchtower.depends-on=/skeleton-app-1"

app: &app_template
image: my-registry/roadiz_skeleton:latest
Expand All @@ -133,9 +128,6 @@ services:
APP_ENV: prod
APP_RUNTIME_ENV: prod
APP_DEBUG: 0
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "com.centurylinklabs.watchtower.depends-on=/skeleton-redis-1"

worker:
<<: *app_template
Expand Down
28 changes: 14 additions & 14 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ services:
- "traefik.http.services.${APP_NAMESPACE}_pma.loadbalancer.passhostheader=true"
# Listen HTTP
- "traefik.http.routers.${APP_NAMESPACE}_pma.entrypoints=http"
- "traefik.http.routers.${APP_NAMESPACE}_pma.rule=Host(${HOSTNAME_PMA})"
- "traefik.http.routers.${APP_NAMESPACE}_pma.rule=HostRegexp(${HOSTNAME_PMA})"
- "traefik.http.routers.${APP_NAMESPACE}_pma.service=${APP_NAMESPACE}_pma"
# Listen HTTPS
- "traefik.http.routers.${APP_NAMESPACE}_pma_secure.entrypoints=https"
- "traefik.http.routers.${APP_NAMESPACE}_pma_secure.tls=true"
- "traefik.http.routers.${APP_NAMESPACE}_pma_secure.rule=Host(${HOSTNAME_PMA})"
- "traefik.http.routers.${APP_NAMESPACE}_pma_secure.rule=HostRegexp(${HOSTNAME_PMA})"
- "traefik.http.routers.${APP_NAMESPACE}_pma_secure.service=${APP_NAMESPACE}_pma"

app: &app_template
Expand Down Expand Up @@ -94,14 +94,14 @@ services:
# #- "traefik.http.services.${APP_NAMESPACE}.loadbalancer.healthcheck.headers.x-health-check=${APP_HEALTH_CHECK_TOKEN}"
# # Listen HTTP
# - "traefik.http.routers.${APP_NAMESPACE}.entrypoints=http"
# # Combine Host and PathPrefix to allow API and Frontend to share same domain name
# - "traefik.http.routers.${APP_NAMESPACE}.rule=Host(${HOSTNAME}) && PathPrefix(${PATH_PREFIX})"
# # Combine Host and PathRegexp to allow API and Frontend to share same domain name
# - "traefik.http.routers.${APP_NAMESPACE}.rule=HostRegexp(${HOSTNAME}) && PathRegexp(${PATH_PREFIX})"
# - "traefik.http.routers.${APP_NAMESPACE}.service=${APP_NAMESPACE}"
# # Listen HTTPS
# - "traefik.http.routers.${APP_NAMESPACE}_secure.entrypoints=https"
# - "traefik.http.routers.${APP_NAMESPACE}_secure.tls=true"
# # Combine Host and PathPrefix to allow API and Frontend to share same domain name
# - "traefik.http.routers.${APP_NAMESPACE}_secure.rule=Host(${HOSTNAME}) && PathPrefix(${PATH_PREFIX})"
# # Combine Host and PathRegexp to allow API and Frontend to share same domain name
# - "traefik.http.routers.${APP_NAMESPACE}_secure.rule=HostRegexp(${HOSTNAME}) && PathRegexp(${PATH_PREFIX})"
# - "traefik.http.routers.${APP_NAMESPACE}_secure.service=${APP_NAMESPACE}"

worker:
Expand Down Expand Up @@ -148,12 +148,12 @@ services:
- "traefik.http.services.${APP_NAMESPACE}_solr.loadbalancer.passhostheader=true"
# Listen HTTP
- "traefik.http.routers.${APP_NAMESPACE}_solr.entrypoints=http"
- "traefik.http.routers.${APP_NAMESPACE}_solr.rule=Host(${HOSTNAME_SOLR})"
- "traefik.http.routers.${APP_NAMESPACE}_solr.rule=HostRegexp(${HOSTNAME_SOLR})"
- "traefik.http.routers.${APP_NAMESPACE}_solr.service=${APP_NAMESPACE}_solr"
# Listen HTTPS
- "traefik.http.routers.${APP_NAMESPACE}_solr_secure.entrypoints=https"
- "traefik.http.routers.${APP_NAMESPACE}_solr_secure.tls=true"
- "traefik.http.routers.${APP_NAMESPACE}_solr_secure.rule=Host(${HOSTNAME_SOLR})"
- "traefik.http.routers.${APP_NAMESPACE}_solr_secure.rule=HostRegexp(${HOSTNAME_SOLR})"
- "traefik.http.routers.${APP_NAMESPACE}_solr_secure.service=${APP_NAMESPACE}_solr"

mailer:
Expand All @@ -169,12 +169,12 @@ services:
- "traefik.http.services.${APP_NAMESPACE}_mailer.loadbalancer.passhostheader=true"
# Listen HTTP
- "traefik.http.routers.${APP_NAMESPACE}_mailer.entrypoints=http"
- "traefik.http.routers.${APP_NAMESPACE}_mailer.rule=Host(${HOSTNAME_MAILER})"
- "traefik.http.routers.${APP_NAMESPACE}_mailer.rule=HostRegexp(${HOSTNAME_MAILER})"
- "traefik.http.routers.${APP_NAMESPACE}_mailer.service=${APP_NAMESPACE}_mailer"
# Listen HTTPS
- "traefik.http.routers.${APP_NAMESPACE}_mailer_secure.entrypoints=https"
- "traefik.http.routers.${APP_NAMESPACE}_mailer_secure.tls=true"
- "traefik.http.routers.${APP_NAMESPACE}_mailer_secure.rule=Host(${HOSTNAME_MAILER})"
- "traefik.http.routers.${APP_NAMESPACE}_mailer_secure.rule=HostRegexp(${HOSTNAME_MAILER})"
- "traefik.http.routers.${APP_NAMESPACE}_mailer_secure.service=${APP_NAMESPACE}_mailer"

# Use Redis for Cache, Messaging and Sessions
Expand Down Expand Up @@ -221,14 +221,14 @@ services:
#- "traefik.http.services.${APP_NAMESPACE}_varnish.loadbalancer.healthcheck.headers.x-health-check=${APP_HEALTH_CHECK_TOKEN}"
# Listen HTTP
- "traefik.http.routers.${APP_NAMESPACE}_varnish.entrypoints=http"
# Combine Host and PathPrefix to allow API and Frontend to share same domain name
- "traefik.http.routers.${APP_NAMESPACE}_varnish.rule=Host(${HOSTNAME_VARNISH}) && PathPrefix(${PATH_PREFIX})"
# Combine Host and PathRegexp to allow API and Frontend to share same domain name
- "traefik.http.routers.${APP_NAMESPACE}_varnish.rule=HostRegexp(${HOSTNAME_VARNISH}) && PathRegexp(${PATH_PREFIX})"
- "traefik.http.routers.${APP_NAMESPACE}_varnish.service=${APP_NAMESPACE}_varnish"
# Listen HTTPS
- "traefik.http.routers.${APP_NAMESPACE}_varnish_secure.entrypoints=https"
- "traefik.http.routers.${APP_NAMESPACE}_varnish_secure.tls=true"
# Combine Host and PathPrefix to allow API and Frontend to share same domain name
- "traefik.http.routers.${APP_NAMESPACE}_varnish_secure.rule=Host(${HOSTNAME_VARNISH}) && PathPrefix(${PATH_PREFIX})"
# Combine Host and PathRegexp to allow API and Frontend to share same domain name
- "traefik.http.routers.${APP_NAMESPACE}_varnish_secure.rule=HostRegexp(${HOSTNAME_VARNISH}) && PathRegexp(${PATH_PREFIX})"
- "traefik.http.routers.${APP_NAMESPACE}_varnish_secure.service=${APP_NAMESPACE}_varnish"

networks:
Expand Down

0 comments on commit efcacee

Please sign in to comment.