docker-compose-configs/invidious/invidious-external/docker-compose.yml

60 lines
1.5 KiB
YAML

# Docker compose file for Backend 4 of inv.nadeko.net
services:
# INVIDIOUS CLEARNET
invidious:
env_file:
# Env file containing variables like TAG, INV_MEM_*
- .env
# Env file containing INVIDIOUS_* variables
- ../.env
image: "git.nadeko.net/fijxu/invidious:${TAG}"
restart: unless-stopped
mem_limit: ${INV_MEM_LIMIT}
mem_reservation: ${INV_MEM_RESERVATION}
cpus: ${INV_CPU} # Limit to X% of the CPU
deploy:
replicas: 4
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"
depends_on:
- haproxy
healthcheck:
test: wget -nv --tries=1 --spider https://inv.nadeko.net/watch?v=mcYLzu_1cNc || exit 1
interval: 300s
timeout: 5s
retries: 2
# Without depends because haproxy is smart
haproxy:
image: haproxy:lts-alpine
restart: always
ports:
# Invidious
- "127.0.0.1:20100:8001"
# TOR
#- "127.0.0.1:20102:8002"
# I2P
#- "127.0.0.1:20103:8003"
# HTTP3-PROXY
# - "127.0.0.1:10061:8004"
# METRICS
- "127.0.0.1:20104:8404"
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
ptgen:
image: git.nadeko.net/fijxu/youtube-po-token-generator:latest
cpus: 0.1
restart: unless-stopped
environment:
- HOST=valkey-external
depends_on:
- haproxy
networks:
default:
name: invidious-external