Skip to content

Commit

Permalink
Merge pull request #561 from WebarchivCZ/master
Browse files Browse the repository at this point in the history
Hotfix routing to static and media
  • Loading branch information
westfood authored Nov 30, 2020
2 parents 7502116 + eab6041 commit fef9694
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ci/prod
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ prod:
seeder_django_email_backend: 'django.core.mail.backends.smtp.EmailBackend'
seeder_django_email_host: 10.1.2.183
treafik_seeder_rule: "Host(`webarchiv.cz`) || Host(`www.webarchiv.cz`) || Host(`seeder.webarchiv.cz`)"
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`))"
treafik_api_rule: "Host(`wa-docker00`) || Host(`10.3.0.50`)"
2 changes: 1 addition & 1 deletion ci/templates/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ services:
- media:/seeder/media
- ./nginx.conf:/etc/nginx/conf.d/default.conf
labels:
traefik.http.routers.static.rule: "{{ treafik_seeder_rule }} && PathPrefix(`/static`) || PathPrefix(`/media`)"
traefik.http.routers.static.rule: "{{ treafik_seeder_static_rule }}"
depends_on:
- web

Expand Down
1 change: 1 addition & 0 deletions ci/test
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ test:
seeder_django_allowed_hosts: app.webarchiv.cz
seeder_django_debug: 'False'
treafik_seeder_rule: "Host(`app.webarchiv.cz`)"
treafik_seeder_static_rule: "Host(`app.webarchiv.cz`) && (PathPrefix(`/static`) || PathPrefix(`/media`))"
treafik_api_rule: "Host(`wa-dev-docker00`) || Host(`10.3.0.110`)"

0 comments on commit fef9694

Please sign in to comment.