# Docker compose file for inv.nadeko.net # https://docs.docker.com/compose/how-tos/multiple-compose-files/include/ include: - ../valkey-invidious/docker-compose.yml #- ../invidious-companion/docker-compose.yml # https://docs.docker.com/reference/compose-file/extension/ x-common-invidious-env: &common-invidious-env INVIDIOUS_CONFIG_FILE: "/etc/invidious/config.yml" INVIDIOUS_REDIS_URL: "tcp://valkey:6379" x-common: &common-invidious #hostname: invidious env_file: # Env file containing INVIDIOUS_* variables - .env-invidious image: "git.nadeko.net/fijxu/invidious:latest" restart: always mem_limit: 780MB cpus: 0.50 deploy: replicas: 4 volumes: # Thist postgresql mount is not needed anymore since I use pgbouncer now # which is at the end of this docker compose file # - /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw - ./config.yml:/etc/invidious/config.yml:ro # Watchtower checks in intervals of 60 seconds for fast container updates. # It needs to have a scope or Watchtower will spam docker servers asking # for a new image update therefore rate limiting me labels: [ "com.centurylinklabs.watchtower.scope=trusted-fast" ] x-common-haproxy: &common-haproxy hostname: haproxy image: haproxy:lts-alpine restart: always volumes: - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg x-common-anubis-env: &common-anubis-env DIFFICULTY: "2" SERVE_ROBOTS_TXT: "true" BIND: "0.0.0.0:4000" METRICS_BIND: "0.0.0.0:9090" POLICY_FNAME: "/data/cfg/botPolicy.json" x-common-anubis: &common-anubis image: git.nadeko.net/fijxu/anubis:latest restart: always env_file: - .env-anubis volumes: - "./botPolicy.json:/data/cfg/botPolicy.json:ro" labels: [ "com.centurylinklabs.watchtower.scope=trusted-fast" ] x-common-valkey: &common-valkey image: valkey/valkey:7.2-alpine hostname: valkey restart: unless-stopped volumes: - ./valkey.conf:/usr/local/etc/valkey/valkey.conf command: "valkey-server /usr/local/etc/valkey/valkey.conf" services: # INVIDIOUS SECTION # invidious: <<: *common-invidious environment: <<: *common-invidious-env networks: - invidious depends_on: - valkey - pgbouncer - haproxy - anubis-inv # YTPROXY to proxy images, just for Fijxu's debugging purposes! # ytproxy: # image: git.nadeko.net/fijxu/http3-ytproxy:latest # ports: # - "127.0.0.1:12403:8080/tcp" # ANUBIS SECTION # anubis-inv: <<: *common-anubis environment: <<: *common-anubis-env TARGET: "http://invidious:3000" networks: - invidious ports: - 127.0.0.1:9051:9090 # HAPROXY SECTION # haproxy: <<: *common-haproxy ports: # Port to expose invidious - "127.0.0.1:11101:8001" # Port to expose the prometheus metrics - "127.0.0.1:11111:8404" networks: - invidious valkey: <<: *common-valkey networks: - invidious # Pgbouncer to keep connections to the database open pgbouncer: image: edoburu/pgbouncer restart: unless-stopped env_file: - .env-pgbouncer environment: - POOL_MODE=transaction # Everything is being done locally # https://www.pgbouncer.org/config.html - AUTH_TYPE=trust mem_limit: "128m" volumes: - /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw networks: - invidious networks: invidious: name: invidious # ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠤⠤⢤⣄⡤⠤⣤⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ # ⠀⠀⠀⠀⠀⠀⠀⢀⣠⠤⠀⡴⠋⠀⠀⠀⠀⠀⠉⠒⢌⠉⠛⣽⡲⣄⡀⠀⠀⠀⠀⠀⠀ # ⠀⠀⠀⠀⠀⣠⠾⠉⠀⠀⠀⠀⣄⠀⠀⠀⠀⠀⢀⣀⠀⣥⡤⠜⠊⣈⢻⣆⠀⠀⠀⠀⠀ # ⠀⠀⠀⣠⠾⠁⠔⠨⠂⠀⢀⠘⡜⡦⣀⡴⡆⠛⠒⠙⡴⡀⠘⡆⠀⠀⠛⡙⢷⡀⠀⠀⠀ # ⠀⠀⡴⠃⠀⠀⠀⠀⢀⣠⡼⠟⡏⡏⠙⣇⢸⡄⠀⠀⢹⠏⠁⢹⡳⣤⠀⠘⡌⣷⠀⠀⠀ # ⠀⣸⠃⠀⡠⠖⢲⠀⠀⣸⠃⢰⡇⡇⠀⢸⣌⣇⢀⠀⣸⣷⣀⡼⢣⡇⠀⠀⢹⣹⠀⠀⠀ # ⠀⡏⠀⡜⠁⠀⠁⠀⡰⢃⣴⣷⢟⣿⡟⡲⠟⠻⠊⠙⠃⣼⣿⣻⣾⡇⠀⠀⢸⡿⠀⠀⠀ # ⠀⡇⠰⡇⠀⢀⡠⠞⡗⢩⡟⢸⡏⠀⢹⡇⠀⠀⠀⠀⠀⢸⣿⠉⢱⣿⠠⢤⣟⠁⠀⠀⠀ # ⠀⣧⠀⠉⠉⠉⠀⢸⠦⡸⡅⢸⣏⠒⣱⠇⠀⠀⠀⠀⠀⠀⢿⣅⡽⠙⢦⠀⢈⣳⡄⠀⠀ # ⠀⡟⠀⠀⠀⠀⠀⠘⠀⣘⡌⣀⡉⠉⠁⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠁⠀⡸⠛⠜⡷⣠⠀ # ⢸⠃⠀⠀⠀⠀⣀⡫⣿⣮⡀⠀⠀⠀⠀⠀⢠⠤⠶⡦⡤⠀⠀⠀⠀⠀⢠⠇⡀⠸⣧⣤⡆ # ⡟⠀⠀⠀⠀⠀⠀⡄⢠⠉⢇⠀⡄⠀⠀⠀⠘⢦⣀⡸⠃⠀⠀⠀⢀⡠⠋⠈⠛⢷⡖⠋⠀ # ⡇⢀⠀⠀⠀⠀⠀⢇⠀⢕⣺⣿⣅⡀⠀⠀⠀⠀⠀⠀⢀⣠⠤⠒⠉⠀⢠⣄⡶⠋⠀⠀⠀ # ⠻⢾⣼⣦⣀⠀⡄⠈⠓⢦⣼⣿⣍⠉⠻⣄⠀⢈⠏⠉⣿⣦⡀⠀⢀⣠⠾⠀⠀⠀⠀⠀⠀ # ⠀⠀⠈⠀⠉⠙⠓⠛⣦⡼⠘⣿⣿⣷⣤⣀⣹⠞⢤⣼⣿⣿⠈⢶⡋⠁⠀⠀⠀⠀⠀⠀⠀