all repos — FixYouTube-legacy @ 46f1e5ddef0eedaac2647824ffb9b566fa97c94e

A better way to embed YouTube videos everywhere (inspired by FixTweet).

add reverse proxy to docker-compose
Marco Andronaco andronacomarco@gmail.com
Sat, 26 Aug 2023 11:53:57 +0200
commit

46f1e5ddef0eedaac2647824ffb9b566fa97c94e

parent

d0969d3a3bc3c7ae41ee5c0636aaa7b5255736c0

4 files changed, 52 insertions(+), 0 deletions(-)

jump to
M .gitignore.gitignore

@@ -1,2 +1,3 @@

__pycache__ cache.db* +*.env
M docker-compose.yamldocker-compose.yaml

@@ -6,3 +6,18 @@ container_name: fixyoutube

restart: unless-stopped ports: - 127.0.0.1:1111:80 + + swag: + image: ghcr.io/linuxserver/swag + container_name: swag + cap_add: + - NET_ADMIN + env_file: + - docker/swag.env + volumes: + - /etc/config/swag:/config + - ./docker/fixyoutube.subdomain.conf:/config/nginx/proxy-confs/fixyoutube.subdomain.conf:ro + ports: + - 443:443 + - 80:80 + restart: unless-stopped
A docker/fixyoutube.subdomain.conf

@@ -0,0 +1,22 @@

+# make sure that your app container is named fixyoutube +# make sure that your dns has a cname set for fixyoutube + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + server_name y.*; # change your subdomain here + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + location / { + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app fixyoutube; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } +}
A docker/swag.env.example

@@ -0,0 +1,14 @@

+PUID=1000 +PGID=1000 +#valid TZs at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones +TZ=Etc/UTC +URL=domain.duckdns.org +SUBDOMAINS=wildcard +VALIDATION=duckdns +CERTPROVIDER= #optional +DNSPLUGIN= #optional +DUCKDNSTOKEN=abc123ab-c123-abc1-23ab-c123abc123ab +EMAIL=your@email.com +ONLY_SUBDOMAINS=false +EXTRA_DOMAINS=y +STAGING=false