You've already forked docker-compose-nas
mirror of
https://github.com/AdrienPoupa/docker-compose-nas.git
synced 2025-11-29 05:36:48 +02:00
fix(tandoor): Fix Tandoor for V2
This commit is contained in:
@@ -8,30 +8,12 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ${CONFIG_ROOT:-.}/tandoor/database:/opt/recipes/database
|
- ${CONFIG_ROOT:-.}/tandoor/database:/opt/recipes/database
|
||||||
- ${CONFIG_ROOT:-.}/tandoor/mediafiles:/opt/recipes/mediafiles
|
- ${CONFIG_ROOT:-.}/tandoor/mediafiles:/opt/recipes/mediafiles
|
||||||
|
- ${CONFIG_ROOT:-.}/tandoor/nginx:/opt/recipes/http.d
|
||||||
- tandoor-staticfiles:/opt/recipes/staticfiles
|
- tandoor-staticfiles:/opt/recipes/staticfiles
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "http://127.0.0.1:8080/recipes", "-qO", "/dev/null"]
|
test: ["CMD", "wget", "http://127.0.0.1:8080/recipes", "-qO", "/dev/null"]
|
||||||
interval: 1m
|
interval: 1m
|
||||||
retries: 10
|
retries: 10
|
||||||
profiles:
|
|
||||||
- tandoor
|
|
||||||
|
|
||||||
tandoor-nginx:
|
|
||||||
image: public.ecr.aws/nginx/nginx:mainline-alpine
|
|
||||||
container_name: tandoor-nginx
|
|
||||||
restart: always
|
|
||||||
env_file:
|
|
||||||
- ${CONFIG_ROOT:-.}/tandoor/.env
|
|
||||||
volumes:
|
|
||||||
- ${CONFIG_ROOT:-.}/tandoor/nginx:/etc/nginx/conf.d:ro
|
|
||||||
- ${CONFIG_ROOT:-.}/tandoor/mediafiles:/media:ro
|
|
||||||
- tandoor-staticfiles:/static:ro
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "wget", "http://127.0.0.1/recipes", "-qO", "/dev/null"]
|
|
||||||
interval: 1m
|
|
||||||
retries: 10
|
|
||||||
depends_on:
|
|
||||||
- tandoor
|
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.http.routers.tandoor.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/recipes`))
|
- traefik.http.routers.tandoor.rule=(Host(`${HOSTNAME}`) && PathPrefix(`/recipes`))
|
||||||
|
|||||||
@@ -5,12 +5,20 @@ server {
|
|||||||
client_max_body_size 128M;
|
client_max_body_size 128M;
|
||||||
|
|
||||||
# serve media files
|
# serve media files
|
||||||
location /recipes/media/ {
|
location /recipes/media {
|
||||||
alias /media/;
|
alias /opt/recipes/mediafiles;
|
||||||
|
add_header Content-Disposition 'attachment; filename="$args"';
|
||||||
}
|
}
|
||||||
location /recipes/static/ {
|
|
||||||
alias /static/;
|
location /recipes/static {
|
||||||
|
alias /opt/recipes/staticfiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# serve service worker under main path
|
||||||
|
location = /recipes/service-worker.js {
|
||||||
|
alias /opt/recipes/staticfiles/vue3/service-worker.js;
|
||||||
|
}
|
||||||
|
|
||||||
# pass requests for dynamic content to gunicorn
|
# pass requests for dynamic content to gunicorn
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
|
|||||||
Reference in New Issue
Block a user