summary refs log tree commit diff stats
path: root/invidious/docker-compose.yaml
diff options
context:
space:
mode:
authorBiRabittoh <birabittoh@tilde.institute>2023-07-10 02:18:21 +0200
committerBiRabittoh <birabittoh@tilde.institute>2023-07-10 02:18:21 +0200
commita981c9256c4e542b87bffc7f9228b9cc68c3c5f8 (patch)
tree29ecc0d74710f9494eeabad650c0d9f941c7cd50 /invidious/docker-compose.yaml
downloadmy-docker-compose-a981c9256c4e542b87bffc7f9228b9cc68c3c5f8.tar.gz
Initial commit
Diffstat (limited to 'invidious/docker-compose.yaml')
-rw-r--r--invidious/docker-compose.yaml62
1 files changed, 62 insertions, 0 deletions
diff --git a/invidious/docker-compose.yaml b/invidious/docker-compose.yaml
new file mode 100644
index 0000000..8142ae0
--- /dev/null
+++ b/invidious/docker-compose.yaml
@@ -0,0 +1,62 @@
+version: "3.8"
+services:
+  invidious:
+    container_name: invidious
+    image: quay.io/invidious/invidious:latest
+    restart: always
+    stop_grace_period: 3s
+    ports:
+      - 127.0.0.1:3000:3000
+    environment:
+      INVIDIOUS_CONFIG: |
+        db:
+          dbname: invidious
+          user: kemal
+          password: kemal
+          host: invidious-db
+          port: 5432
+        check_tables: true
+        popular_enabled: false
+        registration_enabled: true
+        statistics_enabled: false
+        hsts: false
+        https_only: true
+        external_port: 443
+        domain: y.birabittoh.duckdns.org
+        hmac_key: 13c0d755683fee6595a89d45a36d61873e54cc16
+    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
+    depends_on:
+      - invidious-db
+    networks:
+      - invidious
+      - swag_default
+
+  invidious-db:
+    image: postgres:14
+    container_name: invidious-db
+    restart: always
+    volumes:
+      - postgresdata:/var/lib/postgresql/data
+      - ./config/sql:/config/sql
+      - ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
+    environment:
+      POSTGRES_DB: invidious
+      POSTGRES_USER: invidious
+      POSTGRES_PASSWORD: password
+    healthcheck:
+      test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
+    networks:
+      - invidious
+
+networks:
+  swag_default:
+    external: true
+  invidious:
+    name: invidious
+
+volumes:
+  postgresdata: