Use new Rust based piped-proxy.

This commit is contained in:
Kavin 2022-11-03 17:28:09 +00:00
parent 76d40b4fea
commit a77f887fd8
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
4 changed files with 21 additions and 17 deletions

View File

@ -37,7 +37,7 @@ PROXY_HOSTNAME {
Cache-Control "public, max-age=604800" Cache-Control "public, max-age=604800"
} }
reverse_proxy unix//var/run/ytproxy/http-proxy.sock { reverse_proxy unix//var/run/ytproxy/actix.sock {
header_up -CF-Connecting-IP header_up -CF-Connecting-IP
header_up -X-Forwarded-For header_up -X-Forwarded-For
header_down -etag header_down -etag

View File

@ -8,12 +8,14 @@ services:
- piped - piped
container_name: piped-frontend container_name: piped-frontend
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g "daemon off;"' entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
ytproxy: piped-proxy:
image: 1337kavin/ytproxy:latest image: 1337kavin/piped-proxy:latest
restart: unless-stopped restart: unless-stopped
environment:
- UDS=1
volumes: volumes:
- ytproxy:/app/socket - piped-proxy:/app/socket
container_name: ytproxy container_name: piped-proxy
piped: piped:
image: 1337kavin/piped:latest image: 1337kavin/piped:latest
restart: unless-stopped restart: unless-stopped
@ -45,7 +47,7 @@ services:
volumes: volumes:
- ./config/Caddyfile:/etc/caddy/Caddyfile:ro - ./config/Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data - caddy_data:/data
- ytproxy:/var/run/ytproxy - piped-proxy:/var/run/piped-proxy
container_name: caddy container_name: caddy
postgres: postgres:
image: postgres:13-alpine image: postgres:13-alpine
@ -67,7 +69,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 ytproxy varnish caddy postgres watchtower command: piped-frontend piped-backend piped-proxy varnish caddy postgres watchtower
volumes: volumes:
caddy_data: null caddy_data: null
ytproxy: null piped-proxy: null

View File

@ -8,12 +8,14 @@ services:
- piped - piped
container_name: piped-frontend container_name: piped-frontend
entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g "daemon off;"' entrypoint: ash -c 'sed -i s/pipedapi.kavin.rocks/BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g "daemon off;"'
ytproxy: piped-proxy:
image: 1337kavin/ytproxy:latest image: 1337kavin/piped-proxy:latest
restart: unless-stopped restart: unless-stopped
environment:
- UDS=1
volumes: volumes:
- ytproxy:/app/socket - piped-proxy:/app/socket
container_name: ytproxy container_name: piped-proxy
piped: piped:
image: 1337kavin/piped:latest image: 1337kavin/piped:latest
restart: unless-stopped restart: unless-stopped
@ -33,11 +35,11 @@ services:
- ./config/pipedproxy.conf:/etc/nginx/conf.d/pipedproxy.conf:ro - ./config/pipedproxy.conf:/etc/nginx/conf.d/pipedproxy.conf:ro
- ./config/pipedfrontend.conf:/etc/nginx/conf.d/pipedfrontend.conf:ro - ./config/pipedfrontend.conf:/etc/nginx/conf.d/pipedfrontend.conf:ro
- ./config/ytproxy.conf:/etc/nginx/snippets/ytproxy.conf:ro - ./config/ytproxy.conf:/etc/nginx/snippets/ytproxy.conf:ro
- ytproxy:/var/run/ytproxy - piped-proxy:/var/run/ytproxy
container_name: nginx container_name: nginx
depends_on: depends_on:
- piped - piped
- ytproxy - piped-proxy
- pipedfrontend - pipedfrontend
postgres: postgres:
image: postgres:13-alpine image: postgres:13-alpine
@ -59,6 +61,6 @@ 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 ytproxy varnish nginx postgres watchtower command: piped-frontend piped-backend piped-proxy varnish nginx postgres watchtower
volumes: volumes:
ytproxy: null piped-proxy: null

View File

@ -15,4 +15,4 @@ proxy_http_version 1.1;
proxy_set_header Connection keep-alive; proxy_set_header Connection keep-alive;
proxy_max_temp_file_size 32m; proxy_max_temp_file_size 32m;
access_log off; access_log off;
proxy_pass http://unix:/var/run/ytproxy/http-proxy.sock; proxy_pass http://unix:/var/run/ytproxy/actix.sock;