45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
# Docker compose file for Backend 2 of inv.nadeko.net
|
|
|
|
x-labels: &labels
|
|
labels: [ "com.centurylinklabs.watchtower.scope=invidious" ]
|
|
|
|
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-with-companion:${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"
|
|
INVIDIOUS_REDIS_URL: "tcp://valkey:6379"
|
|
depends_on:
|
|
- haproxy
|
|
<<: *labels
|
|
|
|
# Without depends because haproxy is smart
|
|
haproxy:
|
|
image: haproxy:lts-alpine
|
|
restart: always
|
|
ports:
|
|
# Invidious
|
|
- "127.0.0.1:10070:8001"
|
|
# METRICS
|
|
- "127.0.0.1:10074:8404"
|
|
volumes:
|
|
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
|
|
|
|
networks:
|
|
default:
|
|
name: invidious-2
|