-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
201 lines (173 loc) · 6.1 KB
/
Copy pathDockerfile
File metadata and controls
201 lines (173 loc) · 6.1 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
FROM alpine:latest AS base
RUN apk add python3 py3-pip && rm -r /var/cache/apk
RUN mkdir /app && mkdir /data && mkdir /.app
COPY requirements.txt /app/requirements.txt
RUN arch=$(uname -m) && \
if [ "$arch" = "armv7l" ] || [ "$arch" = "armv7" ]; then \
sed -i 's|smbprotocol||' /app/requirements.txt; sed -i 's|flasgger||' /app/requirements.txt; sed -i 's|python-dotenv||' /app/requirements.txt; \
fi
RUN /usr/bin/python3 -m venv /.app \
&& . /.app/bin/activate \
&& pip install -r /app/requirements.txt
FROM base AS development
ARG UID=1000
ARG GID=1000
ARG USERNAME=vscode
RUN apk add sqlite sudo bash git openssh
RUN addgroup --gid $GID $USERNAME \
&& adduser -u $UID -G $USERNAME -D -s /bin/bash $USERNAME \
&& echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
&& addgroup -S sudo && addgroup $USERNAME sudo
FROM base
ENV KT_KODI_USERNAME='kodi'
ENV KT_KODI_PASSWORD='kodi'
ENV KT_KODI_HOST='127.0.0.1'
ENV KT_KODI_PORT=8080
ENV KT_KODI_TIMEOUT=1
ENV KT_EMBY_TIMEOUT=2
ENV KT_EMBY_URL='http://localhost/'
ENV KT_EMBY_API_KEY=
ENV KT_JELLYFIN_TIMEOUT=2
ENV KT_JELLYFIN_URL='http://localhost/'
ENV KT_JELLYFIN_API_KEY=
ENV KT_PLEX_TIMEOUT=2
ENV KT_PLEX_URL='http://localhost/'
ENV KT_PLEX_API_KEY=
ENV KT_OVERLAY_TITLE=True
ENV KT_OVERLAY_DURATION=True
ENV KT_OVERLAY_GENRES=True
ENV KT_OVERLAY_WATCHED=True
ENV KT_OVERLAY_AGE=True
ENV KT_OVERLAY_TRAILER=True
ENV KT_OVERLAY_RATING=True
ENV KT_OVERLAY_RESOLUTION=True
ENV KT_SMB_USER='samba'
ENV KT_SMB_PASSWORD='samba'
# none : No action for the perfect match will be provided
# play : Direct play in kodi for the perfect match will be provided
ENV KT_MATCH_ACTION='none'
# How many TOP/FLOP movies should be displayed in the stats?
ENV KT_TOP_COUNT=3
ENV KT_FLOP_COUNT=3
# Disable some filter.
# more specific: Hide them from the "Session Create" screen.
# This means the FILTER_DEFAULT settings will still apply, but you can not change them.
ENV KT_FILTER_HIDE_PROVIDER=False
ENV KT_FILTER_HIDE_GENRES=False
ENV KT_FILTER_HIDE_MISCELLANEOUS=False
ENV KT_FILTER_HIDE_DISCOVER=False
ENV KT_FILTER_HIDE_OVERLAY=False
ENV KT_HIDE_END=False
# Comma seperated list of default sources K-inder should fetch movies from.
# Valid (single) values are:
# kodi
# netflix
# amazon_prime
# amazon_video
# disney_plus
# paramount_plus
# apple_tv_plus
# example for multiple would be : 'kodi,netflix')
# Some sources may need further configuration (e.g.: kodi needs KT_KODI_USERNAME, KT_KODI_PASSWORD, KT_KODI_HOST)
ENV KT_FILTER_DEFAULT_PROVIDER='kodi'
# e.g. : Horror,Action
ENV KT_FILTER_DEFAULT_DISABLED_GENRES=
ENV KT_FILTER_DEFAULT_MUST_GENRES=
# 0 : 0 years
# 1 : 6 years
# 2 : 12 years
# 3 : 16 years
# 4 : 18+ years
ENV KT_FILTER_DEFAULT_MIN_AGE=0
ENV KT_FILTER_DEFAULT_MAX_AGE=4
# -1: 0 minutes
# 0 : 30 minutes
# 1 : 60 minutes
# 2 : 90 minutes
# 3 : 120 minutes
# 4 : 135 minutes
# 5 : 150 minutes
# 6 : 165 minutes
# 7 : 180 minutes
# 8 : 210 minutes
# 9 : 240 minutes
# 10: 240+ minutes
ENV KT_FILTER_DEFAULT_MIN_DURATION=-1
ENV KT_FILTER_DEFAULT_MAX_DURATION=10
ENV KT_FILTER_DEFAULT_INCLUDE_WATCHED=True
ENV KT_FILTER_DEFAULT_MIN_YEAR=1900
ENV KT_FILTER_DEFAULT_MAX_YEAR=
ENV KT_FILTER_DEFAULT_VOTE_AVERAGE=0
ENV KT_FILTER_DEFAULT_VOTE_COUNT=0
# 0 : Any resolution
# 1 : SD (480p)
# 2 : HD (720p)
# 3 : FHD (1080p)
# 4 : 4K (2160p)
# 5 : >4K
ENV KT_FILTER_DEFAULT_MIN_RESOLUTION=0
ENV KT_OMDB_API_KEY='e26c797e'
ENV KT_TMDB_API_KEY='eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI2NjE0NWZjM2MxYzRhYzc0YmRiMTA0M2Q0MmI3MDA3YiIsIm5iZiI6MTc0OTg1Mjc0NS44ODUsInN1YiI6IjY4NGNhMjQ5OTA1NDM2ZjFhZTNkZjJmOSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.NhAxayBq7-Un3tjKWHkWdahkV3e-AbHgUnLGjxuvG8g'
ENV KT_TMDB_API_LANGUAGE='de-DE'
ENV KT_TMDB_API_REGION='DE'
ENV KT_TMDB_API_TIMEOUT=3
ENV KT_TMDB_API_INCLUDE_ADULT=false
# Possibilitys to fetch movie lists from netflix/amazon_prime/amazon_video/disney_plus/paramount_plus/apple_tv_plus
# The movies will NOT be presented in the order you define here.
# But the first 200 of the given order will be randomized an be presented to you.
# original_title
# popularity
# revenue
# primary_release_date
# title
# vote_average
# vote_count
ENV KT_TMDB_API_DISCOVER_SORT_BY='popularity'
# asc|desc
ENV KT_TMDB_API_DISCOVER_SORT_ORDER='desc'
# Total movies to be fetched from the TMDB API to be presented for voting.
# Values > 1000 will be cut to 1000, so the given api key will not be escausted to fast ;-)
ENV KT_TMDB_API_DISCOVER_TOTAL=250
# Endconditions
# Vote will always be over when no movies for voting are left
ENV KT_DEFAULT_END_MAX_MINUTES=-1
ENV KT_DEFAULT_END_MAX_VOTES=-1
ENV KT_DEFAULT_END_MAX_MATCHES=-1
# Time in ms the reminder (red/green flashing) will appear.
# After each vote it will be increased by offset.
# After KT_REMINDER_MIN + (KT_REMINDER_OFFSET * given votes) ms without voting, it will flash an be decreased by KT_REMINDER_OFFSET.
# Will not drop below KT_REMINDER_MIN and not gi higher then KT_REMINDER_MAX.
# Values for KT_REMINDER_MIN/KT_REMINDER_MAX <= 0 will disable flashing.
# In short: The faster you vote, the less it will flash, the slower you vote, the more it will flash.
ENV KT_REMINDER_MIN=3500
ENV KT_REMINDER_OFFSET=500
ENV KT_REMINDER_MAX=15000
ENV KT_SERVER_HOST='0.0.0.0'
ENV KT_SERVER_SWAGGER=False
ENV KT_SERVER_DEBUG=False
ENV KT_SERVER_SECRET_KEY='secret_key'
ENV KT_DATA_FOLDER='/data'
ENV KT_DATABASE_URI=sqlite:////$KT_DATA_FOLDER/database.sqlite3
ENV KT_CACHE_FOLDER='/cache'
ENV KT_LOG_FOLDER='/log'
ENV KT_LOG_LEVEL='INFO'
# How many days to keep the log files? <= 0 means no limit.
ENV KT_LOG_KEEP=7
ENV KT_EXECUTOR_WORKERS=5
# Availability of APIs will be (re)checked every X seconds
ENV KT_API_AVAILABILITY_RECHECK=900
RUN adduser -D -s /bin/sh kinder
COPY . /app
RUN chmod a+x /app/docker-entrypoint.sh \
&& chmod a+x /app/docker-start.sh \
&& chown -R kinder:kinder /app \
&& mkdir -p $KT_DATA_FOLDER $KT_LOG_FOLDER $KT_CACHE_FOLDER \
&& chown kinder:kinder $KT_DATA_FOLDER \
&& chown kinder:kinder $KT_LOG_FOLDER \
&& chown kinder:kinder $KT_CACHE_FOLDER
VOLUME [ "/data", "/log", "/cache" ]
EXPOSE 5000/TCP
WORKDIR /app
USER kinder
ENTRYPOINT ["/app/docker-entrypoint.sh" ]
CMD [ "/app/docker-start.sh" ]