mirror of
https://github.com/TeamPiped/Piped-Docker.git
synced 2024-08-14 23:56:53 +00:00
Use nginx in caddy for caching.
This commit is contained in:
parent
a77f887fd8
commit
41ca0ef18e
3 changed files with 7 additions and 16 deletions
|
@ -20,7 +20,7 @@ FRONTEND_HOSTNAME {
|
||||||
}
|
}
|
||||||
|
|
||||||
BACKEND_HOSTNAME {
|
BACKEND_HOSTNAME {
|
||||||
reverse_proxy varnish:80
|
reverse_proxy nginx:80
|
||||||
import global
|
import global
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
vcl 4.0;
|
|
||||||
|
|
||||||
backend default {
|
|
||||||
.host = "piped-backend:8080";
|
|
||||||
}
|
|
|
@ -24,19 +24,15 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
container_name: piped-backend
|
container_name: piped-backend
|
||||||
varnish:
|
nginx:
|
||||||
image: varnish:7.0-alpine
|
image: nginx:mainline-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/default.vcl:/etc/varnish/default.vcl:ro
|
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
container_name: varnish
|
- ./config/pipedapi.conf:/etc/nginx/conf.d/pipedapi.conf:ro
|
||||||
|
container_name: nginx
|
||||||
depends_on:
|
depends_on:
|
||||||
- piped
|
- piped
|
||||||
healthcheck:
|
|
||||||
test: ash -c "wget --no-verbose --tries=1 --spider 127.0.0.1:80/feed || (varnishreload && exit 1)"
|
|
||||||
interval: 10s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 1
|
|
||||||
caddy:
|
caddy:
|
||||||
image: caddy:2-alpine
|
image: caddy:2-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -69,7 +65,7 @@ services:
|
||||||
- WATCHTOWER_CLEANUP=true
|
- WATCHTOWER_CLEANUP=true
|
||||||
- WATCHTOWER_INCLUDE_RESTARTING=true
|
- WATCHTOWER_INCLUDE_RESTARTING=true
|
||||||
container_name: watchtower
|
container_name: watchtower
|
||||||
command: piped-frontend piped-backend piped-proxy varnish caddy postgres watchtower
|
command: piped-frontend piped-backend piped-proxy nginx caddy postgres watchtower
|
||||||
volumes:
|
volumes:
|
||||||
caddy_data: null
|
caddy_data: null
|
||||||
piped-proxy: null
|
piped-proxy: null
|
||||||
|
|
Loading…
Reference in a new issue