86 lines
2.4 KiB
YAML
86 lines
2.4 KiB
YAML
---
|
|
version: "3.8"
|
|
|
|
services:
|
|
app:
|
|
image: quay.io/invidious/invidious:latest
|
|
#image: quay.io/invidious/invidious:latest-arm64 # ARM64/AArch64 devices
|
|
environment:
|
|
- INVIDIOUS_DOMAIN
|
|
- INVIDIOUS_USE_QUIC
|
|
- INVIDIOUS_POPULAR_ENABLED
|
|
- INVIDIOUS_STATISTICS_ENABLED
|
|
- INVIDIOUS_REGISTRATION_ENABLED
|
|
- INVIDIOUS_LOGIN_ENABLED
|
|
- INVIDIOUS_CAPTCHA_ENABLED
|
|
- INVIDIOUS_ADMINS
|
|
- INVIDIOUS_PROXY_VIDEOS
|
|
- INVIDIOUS_FEED_MENU
|
|
- INVIDIOUS_DEFAULT_HOME
|
|
- INVIDIOUS_RELATED_VIDEOS
|
|
- INVIDIOUS_QUALITY
|
|
- INVIDIOUS_QUALITY_DASH
|
|
- INVIDIOUS_DISABLE_PROXY
|
|
- INVIDIOUS_LOG_LEVEL
|
|
configs:
|
|
- source: config_yml
|
|
target: /invidious/config/config.yml
|
|
secrets:
|
|
- db_password
|
|
networks:
|
|
- proxy
|
|
- internal
|
|
deploy:
|
|
restart_policy:
|
|
condition: on-failure
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
|
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
|
## Redirect from EXTRA_DOMAINS to DOMAIN
|
|
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
|
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
|
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
|
- "coop-cloud.${STACK_NAME}.version="
|
|
healthcheck:
|
|
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 2
|
|
|
|
db:
|
|
image: docker.io/library/postgres:13
|
|
volumes:
|
|
- postgres:/var/lib/postgresql/data
|
|
environment:
|
|
POSTGRES_DB: invidious
|
|
POSTGRES_USER: kemal
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
|
secrets:
|
|
- db_password
|
|
networks:
|
|
- internal
|
|
|
|
secrets:
|
|
db_password:
|
|
external: true
|
|
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
|
|
|
networks:
|
|
internal:
|
|
proxy:
|
|
external: true
|
|
|
|
configs:
|
|
config_yml:
|
|
name: ${STACK_NAME}_config_yml_${CONFIG_YML_VERSION}
|
|
file: config.yml.tmpl
|
|
template_driver: golang
|
|
|
|
volumes:
|
|
postgres:
|