blob: d624a67ab19a5be637a033e22197aab2c33d7a1e (
plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
#!/usr/bin/env sh
## Config
if [ ! -d "/root/.youtube-local" ]; then
# make dir
install -d /root/.yt-local
# generate config
cat > /root/.yt-local/settings.txt <<- EOF
# Set app public mode, disabled by default
app_public = ${APP_PUBLIC:-False}
# Set URL of app for example: http://localhost
app_url = "${APP_URL:-http://localhost}"
# 0 - Off
# 1 - On, except video
# 2 - On, including video (see warnings)
route_tor = ${ROUTE_TOR:-0}
tor_port = ${TOR_PORT:-9050}
tor_control_port = ${TOR_CONTROL_PORT:-9151}
port_number = ${PORT_NUMBER:-8080}
# This will allow others to connect to your Youtube Local instance as a website.
# For security reasons, enabling this is not recommended.
allow_foreign_addresses = ${ALLOW_FOREIGN_ADDRESSES:-True}
# 0 - off by default
# 1 - only manually created subtitles on by default
# 2 - enable even if automatically generated is all that's available
subtitles_mode = ${SUBTITLES_MODE:-0}
# ISO 639 language code: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
subtitles_language = "${SUBTITLES_LANG:-en}"
# 0 - Related videos disabled
# 1 - Related videos always shown
# 2 - Related videos hidden; shown by clicking a button
related_videos_mode = ${RELATED_VIDEOS_MODE:-1}
# 0 - Video comments disabled
# 1 - Video comments always shown
# 2 - Video comments hidden; shown by clicking a button
comments_mode = ${COMMENTS_MODE:-1}
enable_comment_avatars = ${ENABLE_COMMENTS_AVATARS:-True}
# 0 to sort by top
# 1 to sort by newest
default_comment_sorting = ${DEFAULT_COMMENT_SORTING:-0}
theater_mode = ${THEATER_MODE:-True}
default_resolution = ${DEFAULT_RESOLUTION:-2160}
codec_rank_h264 = ${CODEC_RANK_H264:-3}
codec_rank_vp = ${CODEC_RANK_VP:-2}
codec_rank_av1 = ${CODEC_RANK_AV1:-1}
prefer_uni_sources = ${PREFER_UNI_SOURCES:-True}
use_video_player = ${USE_VIDEO_PLAYER:-0}
use_video_download = ${USE_VIDEO_DOWNLOAD:-0}
proxy_images = ${PROXY_IMAGES:-True}
use_comments_js = ${USE_COMMENTS_JS:-True}
use_sponsorblock_js = ${USE_SPONSORBLOCK_JS:-False}
theme = ${THEME:-0}
font = ${FONT:-0}
embed_page_mode = ${EMBED_PAGE_MODE:-True}
autocheck_subscriptions = ${AUTOCHECK_SUBSCRIPTIONS:-True}
# Developer use to debug 403s
gather_googlevideo_domains = ${GATHER_GOOGLEVIDEO_DOMAINS:-False}
# Save all responses from youtube for debugging
debugging_save_responses = ${DEBUGGING_SAVE_RESPONSES:-False}
# Do not change, remove, or comment out this value, or else your settings may be lost or corrupted
settings_version = 3
EOF
fi
/entrypoint-tor.sh "$@" &
cd /srv/app || exit
exec gunicorn -b "0.0.0.0:${PORT_NUMBER:-8080}" --timeout "${GUNICORN_TIMEOUT:-30}" --workers "${GUNICORN_NUM_WORKERS:-4}" server:site_dispatch
|