From a77f887fd8f7d185e9ef60875785b509f3f37a37 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Thu, 3 Nov 2022 17:28:09 +0000 Subject: [PATCH] Use new Rust based piped-proxy. --- template/Caddyfile | 2 +- template/docker-compose.caddy.yml | 16 +++++++++------- template/docker-compose.nginx.yml | 18 ++++++++++-------- template/ytproxy.conf | 2 +- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/template/Caddyfile b/template/Caddyfile index 6d80991..3215629 100644 --- a/template/Caddyfile +++ b/template/Caddyfile @@ -37,7 +37,7 @@ PROXY_HOSTNAME { 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 -X-Forwarded-For header_down -etag diff --git a/template/docker-compose.caddy.yml b/template/docker-compose.caddy.yml index 263019e..83112ca 100644 --- a/template/docker-compose.caddy.yml +++ b/template/docker-compose.caddy.yml @@ -8,12 +8,14 @@ services: - piped 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;"' - ytproxy: - image: 1337kavin/ytproxy:latest + piped-proxy: + image: 1337kavin/piped-proxy:latest restart: unless-stopped + environment: + - UDS=1 volumes: - - ytproxy:/app/socket - container_name: ytproxy + - piped-proxy:/app/socket + container_name: piped-proxy piped: image: 1337kavin/piped:latest restart: unless-stopped @@ -45,7 +47,7 @@ services: volumes: - ./config/Caddyfile:/etc/caddy/Caddyfile:ro - caddy_data:/data - - ytproxy:/var/run/ytproxy + - piped-proxy:/var/run/piped-proxy container_name: caddy postgres: image: postgres:13-alpine @@ -67,7 +69,7 @@ services: - WATCHTOWER_CLEANUP=true - WATCHTOWER_INCLUDE_RESTARTING=true 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: caddy_data: null - ytproxy: null + piped-proxy: null diff --git a/template/docker-compose.nginx.yml b/template/docker-compose.nginx.yml index 7d86576..06d3f1a 100644 --- a/template/docker-compose.nginx.yml +++ b/template/docker-compose.nginx.yml @@ -8,12 +8,14 @@ services: - piped 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;"' - ytproxy: - image: 1337kavin/ytproxy:latest + piped-proxy: + image: 1337kavin/piped-proxy:latest restart: unless-stopped + environment: + - UDS=1 volumes: - - ytproxy:/app/socket - container_name: ytproxy + - piped-proxy:/app/socket + container_name: piped-proxy piped: image: 1337kavin/piped:latest restart: unless-stopped @@ -33,11 +35,11 @@ services: - ./config/pipedproxy.conf:/etc/nginx/conf.d/pipedproxy.conf:ro - ./config/pipedfrontend.conf:/etc/nginx/conf.d/pipedfrontend.conf:ro - ./config/ytproxy.conf:/etc/nginx/snippets/ytproxy.conf:ro - - ytproxy:/var/run/ytproxy + - piped-proxy:/var/run/ytproxy container_name: nginx depends_on: - piped - - ytproxy + - piped-proxy - pipedfrontend postgres: image: postgres:13-alpine @@ -59,6 +61,6 @@ services: - WATCHTOWER_CLEANUP=true - WATCHTOWER_INCLUDE_RESTARTING=true 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: - ytproxy: null + piped-proxy: null diff --git a/template/ytproxy.conf b/template/ytproxy.conf index a49eb47..4fd36f1 100644 --- a/template/ytproxy.conf +++ b/template/ytproxy.conf @@ -15,4 +15,4 @@ proxy_http_version 1.1; proxy_set_header Connection keep-alive; proxy_max_temp_file_size 32m; access_log off; -proxy_pass http://unix:/var/run/ytproxy/http-proxy.sock; +proxy_pass http://unix:/var/run/ytproxy/actix.sock;