version: "3.7"

services:
  app_proxy:
    environment:
      APP_HOST: invidious_web_1
      APP_PORT: 3000

  web:
    image: ceramicwhite/invidious:build-961cae2@sha256:8974d6de8a7c9f5a431662eb95d9beb754e2df03e90c6b7d354001bdbec2582a
    restart: on-failure
    stop_grace_period: 1m
    user: "1000:1000"
    # Using official images that include tini
    #init: true
    environment:
      INVIDIOUS_CONFIG: |
        db:
          dbname: invidious
          user: umbrel
          password: moneyprintergobrrr
          host: invidious_postgres_1
          port: 5432
        check_tables: true
        external_port: 3420
        captcha_enabled: false
        admins: ["umbrel"]
        default_user_preferences:
          feed_menu: ["Trending", "Subscriptions", "Playlists"]
          default_home: Trending
    healthcheck:
      disable: true
    depends_on:
      - postgres

  postgres:
    image: postgres:13.7@sha256:03652c675ae177af98ddd50f9f4b4b2cf8ad38d0e116aa68fe670fbc2cf250fc
    restart: on-failure
    user: "1000:1000"
    stop_grace_period: 1m
    init: true
    volumes:
      - ${APP_DATA_DIR}/data/db:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: invidious
      POSTGRES_USER: umbrel
      POSTGRES_PASSWORD: moneyprintergobrrr
