docker-compose-configs/invidious/invidious-vpn/docker-compose.yml
2024-09-18 04:45:35 -03:00

142 lines
3.6 KiB
YAML

# Docker compose file for ${DOMAIN}
services:
# INVIDIOUS CLEARNET
invidious:
image: "git.nadeko.net/fijxu/invidious:${TAG}"
env_file:
- .env
network_mode: "service:gluetun"
restart: unless-stopped
mem_limit: "${INV_MEM_LIMIT}"
mem_reservation: "${INV_MEM_RESERVATION}"
volumes:
- /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw
- ./config.yml:/etc/invidious/config.yml:ro
environment:
INVIDIOUS_CONFIG_FILE: "/etc/invidious/config.yml"
INVIDIOUS_PORT: "3000"
depends_on:
- inv_sig_helper
- haproxy
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
interval: 30s
timeout: 5s
retries: 2
# INVIDIOUS CLEARNET
invidious-2:
image: "git.nadeko.net/fijxu/invidious:${TAG}"
env_file:
- .env
network_mode: "service:gluetun"
restart: unless-stopped
mem_limit: "${INV_MEM_LIMIT}"
mem_reservation: "${INV_MEM_RESERVATION}"
volumes:
- /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw
- ./config.yml:/etc/invidious/config.yml:ro
environment:
INVIDIOUS_CONFIG_FILE: "/etc/invidious/config.yml"
INVIDIOUS_PORT: "3001"
depends_on:
- inv_sig_helper
- haproxy
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
interval: 30s
timeout: 5s
retries: 2
# INVIDIOUS CLEARNET
invidious-3:
image: "git.nadeko.net/fijxu/invidious:${TAG}"
env_file:
- .env
network_mode: "service:gluetun"
restart: unless-stopped
mem_limit: "${INV_MEM_LIMIT}"
mem_reservation: "${INV_MEM_RESERVATION}"
volumes:
- /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw
- ./config.yml:/etc/invidious/config.yml:ro
environment:
INVIDIOUS_CONFIG_FILE: "/etc/invidious/config.yml"
INVIDIOUS_PORT: "3002"
depends_on:
- inv_sig_helper
- haproxy
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
interval: 30s
timeout: 5s
retries: 2
# SIGNATURE HELPER
inv_sig_helper:
image: git.nadeko.net/fijxu/inv_sig_helper:latest
restart: unless-stopped
network_mode: "service:gluetun"
mem_limit: "512m"
init: true
command: ["--tcp", "0.0.0.0:12999"]
environment:
- RUST_LOG=info
http3-proxy:
image: git.nadeko.net/fijxu/http3-proxy:latest
restart: unless-stopped
network_mode: "service:gluetun"
environment:
DISABLE_WEBP: 1
# Without depends because haproxy is smart
haproxy:
image: haproxy:lts-alpine
restart: unless-stopped
ports:
# Invidious
- "127.0.0.1:10070:8001"
# TOR
- "127.0.0.1:10072:8002"
# I2P
- "127.0.0.1:10073:8003"
# HTTP3-PROXY
- "127.0.0.1:10071:8004"
# METRICS
- "127.0.0.1:10074:8404"
volumes:
- ./haproxy:/usr/local/etc/haproxy
networks:
gluetun_network:
depends_on:
- gluetun
gluetun:
image: qmcgaw/gluetun
restart: unless-stopped
env_file:
- .env
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- ./gluetun:/gluetun
environment:
- VPN_SERVICE_PROVIDER=mullvad
- VPN_TYPE=wireguard
- WIREGUARD_PRIVATE_KEY="${WIREGUARD_KEY}"
- WIREGUARD_ADDRESSES="${WIREGUARD_ADDRESSES}"
- SERVER_HOSTNAMES="${SERVER_HOSTNAMES}"
- DNS_KEEP_NAMESERVER=on
networks:
gluetun_network:
networks:
default:
name: invidious-vpn
gluetun_network:
external: true