-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
invidious.yml
75 lines (71 loc) · 3.13 KB
/
invidious.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# DOMAIN=example.com docker stack deploy -c invidious.yml invidious
services:
web:
image: ethibox/invidious:${VERSION:-latest}
environment:
INVIDIOUS_CONFIG: |
hmac_key: ${HMAC_KEY:-random_hmac_key}
domain: ${DOMAIN:-invidious.localhost}
channel_threads: 1
check_tables: true
feed_threads: 1
db:
user: invidious
password: myp@ssw0rd
host: postgres
port: 5432
dbname: invidious
full_refresh: false
https_only: ${HTTPS_ONLY:-true}
popular_enabled: ${POPULAR_ENABLED:-true}
default_user_preferences:
default_home: Trending
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.invidious-${NUMBER:-1}.rule=Host(`${DOMAIN:-invidious.localhost}`)
- traefik.http.routers.invidious-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.invidious-${NUMBER:-1}.service=invidious-${NUMBER:-1}
- traefik.http.routers.invidious-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.invidious-${NUMBER:-1}.loadbalancer.server.port=3000
networks:
- internal
- traefik
postgres:
image: postgres:11.2-alpine
entrypoint: /bin/sh -c '/bin/sh -c "$${@}"'
command:
- /bin/sh
- -c
- |
mkdir -p /config/sql
wget -O /config/sql/annotations.sql https://raw.githubusercontent.com/iv-org/invidious/master/config/sql/annotations.sql
wget -O /config/sql/channel_videos.sql https://raw.githubusercontent.com/iv-org/invidious/master/config/sql/channel_videos.sql
wget -O /config/sql/channels.sql https://raw.githubusercontent.com/iv-org/invidious/master/config/sql/channels.sql
wget -O /config/sql/nonces.sql https://raw.githubusercontent.com/iv-org/invidious/master/config/sql/nonces.sql
wget -O /config/sql/playlist_videos.sql https://raw.githubusercontent.com/iv-org/invidious/master/config/sql/playlist_videos.sql
wget -O /config/sql/playlists.sql https://raw.githubusercontent.com/iv-org/invidious/master/config/sql/playlists.sql
wget -O /config/sql/session_ids.sql https://raw.githubusercontent.com/iv-org/invidious/master/config/sql/session_ids.sql
wget -O /config/sql/users.sql https://raw.githubusercontent.com/iv-org/invidious/master/config/sql/users.sql
wget -O /config/sql/videos.sql https://raw.githubusercontent.com/iv-org/invidious/master/config/sql/videos.sql
wget -O /docker-entrypoint-initdb.d/init-invidious-db.sh https://raw.githubusercontent.com/iv-org/invidious/master/docker/init-invidious-db.sh
sed -i -e s/kemal/$$POSTGRES_USER/g /config/sql/*
chmod +x /docker-entrypoint-initdb.d/init-invidious-db.sh
/usr/local/bin/docker-entrypoint.sh postgres
environment:
- POSTGRES_DB=invidious
- POSTGRES_USER=invidious
- POSTGRES_PASSWORD=myp@ssw0rd
volumes:
- ${VOLUME_PATH}postgres:/var/lib/postgresql/data
networks:
- internal
volumes:
postgres:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net