From 9d1a68aa0b7dd7f26be72c69875bd226a4185ad2 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Sun, 28 Apr 2024 14:24:50 -0400 Subject: [PATCH] http3 but now in docker for my invidious instance --- .forgejo/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ docker-compose.yml | 22 ++++++++++++++++++++++ nginx.conf | 19 +++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 .forgejo/workflows/ci.yml create mode 100644 docker-compose.yml create mode 100644 nginx.conf diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..2989ce4 --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,35 @@ +name: 'CI' + +on: + # workflow_dispatch: + # inputs: {} + # schedule: + # - cron: '0 7 * * 0' + push: + branches: ["*"] + +jobs: + build: + runs-on: runner + + steps: + - uses: https://code.forgejo.org/actions/checkout@v2 + + - uses: https://code.forgejo.org/docker/setup-buildx-action@v3 + name: Setup Docker BuildX system + + - name: Login to Docker Container Registry + uses: https://code.forgejo.org/docker/login-action@v3.1.0 + with: + registry: git.nadeko.net + username: ${{ secrets.USERNAME }} + password: ${{ secrets.TOKEN }} + + - uses: https://code.forgejo.org/docker/build-push-action@v5 + name: Build images + with: + context: . + tags: git.nadeko.net/fijxu/http3-proxy:latest + platforms: linux/amd64 + push: true + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f4a4622 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +# Docker compose file for http3-proxy used in Invidious + +services: + + http3-proxy: + image: git.nadeko.net/fijxu/http3-proxy:latest + restart: unless-stopped + deploy: + replicas: 6 + environment: + DISABLE_WEBP: 1 + + http3-proxy-nginx: + image: nginx:latest + restart: unless-stopped + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + depends_on: + - http3-proxy + ports: + - "127.0.0.1:10012:3000" + diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..638bef7 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,19 @@ +user www-data; +events { + worker_connections 1024; +} +http { + server { + listen 3000; + listen [::]:3000; + access_log off; + location / { + resolver 127.0.0.11; + set $backend "http3-proxy"; + proxy_pass http://$backend:3000; + proxy_http_version 1.1; # to keep alive + proxy_set_header Connection ""; # to keep alive + } + } +} +