Skip to content

Commit fef9694

Browse files
authored
Merge pull request #561 from WebarchivCZ/master
Hotfix routing to static and media
2 parents 7502116 + eab6041 commit fef9694

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

ci/prod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ prod:
1515
seeder_django_email_backend: 'django.core.mail.backends.smtp.EmailBackend'
1616
seeder_django_email_host: 10.1.2.183
1717
treafik_seeder_rule: "Host(`webarchiv.cz`) || Host(`www.webarchiv.cz`) || Host(`seeder.webarchiv.cz`)"
18+
treafik_seeder_static_rule: "Host(`webarchiv.cz`) && (PathPrefix(`/static`) || PathPrefix(`/media`)) || Host(`www.webarchiv.cz`) && (PathPrefix(`/static`) || PathPrefix(`/media`)) || Host(`seeder.webarchiv.cz`) && (PathPrefix(`/static`) || PathPrefix(`/media`))"
1819
treafik_api_rule: "Host(`wa-docker00`) || Host(`10.3.0.50`)"

ci/templates/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ services:
6464
- media:/seeder/media
6565
- ./nginx.conf:/etc/nginx/conf.d/default.conf
6666
labels:
67-
traefik.http.routers.static.rule: "{{ treafik_seeder_rule }} && PathPrefix(`/static`) || PathPrefix(`/media`)"
67+
traefik.http.routers.static.rule: "{{ treafik_seeder_static_rule }}"
6868
depends_on:
6969
- web
7070

ci/test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ test:
1313
seeder_django_allowed_hosts: app.webarchiv.cz
1414
seeder_django_debug: 'False'
1515
treafik_seeder_rule: "Host(`app.webarchiv.cz`)"
16+
treafik_seeder_static_rule: "Host(`app.webarchiv.cz`) && (PathPrefix(`/static`) || PathPrefix(`/media`))"
1617
treafik_api_rule: "Host(`wa-dev-docker00`) || Host(`10.3.0.110`)"

0 commit comments

Comments
 (0)