Skip to content

Commit cc0aef0

Browse files
committed
fix(tandoor): Fix Tandoor for V2
1 parent adbcfd0 commit cc0aef0

File tree

2 files changed

+13
-23
lines changed

2 files changed

+13
-23
lines changed

tandoor/docker-compose.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,12 @@ services:
88
volumes:
99
- ${CONFIG_ROOT:-.}/tandoor/database:/opt/recipes/database
1010
- ${CONFIG_ROOT:-.}/tandoor/mediafiles:/opt/recipes/mediafiles
11+
- ${CONFIG_ROOT:-.}/tandoor/nginx:/opt/recipes/http.d
1112
- tandoor-staticfiles:/opt/recipes/staticfiles
1213
healthcheck:
1314
test: ["CMD", "wget", "http://127.0.0.1:8080/recipes", "-qO", "/dev/null"]
1415
interval: 1m
1516
retries: 10
16-
profiles:
17-
- tandoor
18-
19-
tandoor-nginx:
20-
image: public.ecr.aws/nginx/nginx:mainline-alpine
21-
container_name: tandoor-nginx
22-
restart: always
23-
env_file:
24-
- ${CONFIG_ROOT:-.}/tandoor/.env
25-
volumes:
26-
- ${CONFIG_ROOT:-.}/tandoor/nginx:/etc/nginx/conf.d:ro
27-
- ${CONFIG_ROOT:-.}/tandoor/mediafiles:/media:ro
28-
- tandoor-staticfiles:/static:ro
29-
healthcheck:
30-
test: ["CMD", "wget", "http://127.0.0.1/recipes", "-qO", "/dev/null"]
31-
interval: 1m
32-
retries: 10
33-
depends_on:
34-
- tandoor
3517
labels:
3618
- traefik.enable=true
3719
- traefik.http.routers.tandoor.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/recipes`))

tandoor/nginx/recipes.conf

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ server {
55
client_max_body_size 128M;
66

77
# serve media files
8-
location /recipes/media/ {
9-
alias /media/;
8+
location /recipes/media {
9+
alias /opt/recipes/mediafiles;
10+
add_header Content-Disposition 'attachment; filename="$args"';
1011
}
11-
location /recipes/static/ {
12-
alias /static/;
12+
13+
location /recipes/static {
14+
alias /opt/recipes/staticfiles;
15+
}
16+
17+
# serve service worker under main path
18+
location = /recipes/service-worker.js {
19+
alias /opt/recipes/staticfiles/vue3/service-worker.js;
1320
}
21+
1422
# pass requests for dynamic content to gunicorn
1523
location / {
1624
proxy_set_header Host $http_host;

0 commit comments

Comments
 (0)