-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* max bandwidth changes * max bandwidth changes * max bandwidth changes * max bandwidth changes * Workflow build Docker image with arm64,amd64 (#124) * Workflow build Docker image with arm64,amd64 Add entrypoint.sh, start with custom UserID/GroupID Rework docker-compose Rework dockerfile * Volumes provided for data Backward compatibility for old key.txt path Additional documentation provided on README.md * Dokcerfile install with pip requirements.txt * Fix key.txt permissions * Minor changes to Docker files * Update Dockerfile * Update docker-compose.yml * Update docker-compose.yml * Corrections for backups and upgrades --------- Co-authored-by: Generator <[email protected]>
- Loading branch information
Showing
13 changed files
with
212 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,7 @@ | ||
**/__pycache__ | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/azds.yaml | ||
**/bin | ||
**/charts | ||
**/docker-compose* | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
README.md | ||
* | ||
!*.py | ||
!lib | ||
!plugins | ||
!requirements.txt | ||
!Docker_entrypoint.sh | ||
!LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
|
||
# Add local user | ||
# Either use the USER_ID if passed in at runtime or | ||
# fallback | ||
|
||
USER_ID=${PUID:-1000} | ||
GROUP_ID=${PGID:-1000} | ||
USERNAME=cabernet | ||
echo "Starting with UID : $USER_ID" | ||
addgroup -S -g $GROUP_ID $USERNAME | ||
adduser -S -D -H -h /app -u $USER_ID -G $USERNAME $USERNAME | ||
|
||
blockUpdate="/app/Do_Not_Upgrade_from_WEBUI_on_Docker" | ||
|
||
oldKeyFile="/root/.cabernet/key.txt" | ||
newKeyFile="/app/.cabernet/key.txt" | ||
|
||
if [ -f "$oldKeyFile" ]; then | ||
|
||
cat <<EOF | ||
---------- | ||
!!!WARNING!!! | ||
==> DECREPTED Volume Option | ||
Please update your volume for 'key.txt' to new location. | ||
$newKeyFile | ||
---------- | ||
EOF | ||
|
||
cp "$oldKeyFile" "$newKeyFile" | ||
fi | ||
|
||
# Set permissions | ||
chown -R $USER_ID:$GROUP_ID /app | ||
|
||
[ ! -f "$blockUpdate" ] && touch "$blockUpdate" | ||
|
||
su-exec $USERNAME python3 /app/tvh_main.py "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
FROM python:3.8-alpine | ||
LABEL maintainer="Thomas Gorgolione <[email protected]>" | ||
WORKDIR /app | ||
COPY . . | ||
RUN apk add --no-cache --update bash tzdata ffmpeg curl su-exec && \ | ||
apk add --no-cache --virtual builddeps gcc musl-dev python3-dev libffi-dev openssl-dev cargo && \ | ||
pip3 install -r requirements.txt --no-cache-dir && \ | ||
apk del builddeps && \ | ||
touch /app/is_container && \ | ||
mv Docker_entrypoint.sh /usr/local/bin && \ | ||
rm -rf /tmp/* $HOME/.cache $HOME/.cargo | ||
|
||
RUN apk add --no-cache --update ffmpeg | ||
COPY *.ini /app/ | ||
COPY *.py /app/ | ||
COPY cache/ /app/cache/ | ||
COPY data/ /app/data/ | ||
COPY lib/ /app/lib/ | ||
COPY plugins /app/plugins | ||
COPY plugins_ext /app/plugins_ext | ||
COPY known_stations.json /app/ | ||
RUN touch /app/is_container | ||
|
||
ENTRYPOINT ["python3", "/app/tvh_main.py"] | ||
VOLUME /app/data /app/plugins_ext /app/.cabernet | ||
EXPOSE 6077 5004 | ||
ENTRYPOINT ["Docker_entrypoint.sh"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
# NOTE: Cabernet tends to maintain versions on its own and will conflict with docker's | ||
# versioning system. | ||
# The recommendation is to have the entire cabernet source folder be in its own volume. | ||
# whether you mount /app or /app/cabernet, the whole cabernet folder should be a volume. | ||
# then run the python script tvh_main.py at the top level Caberent folder to start Cabernet. | ||
# Things to review/change: | ||
# PUID/PGID change to the user running Cabernet | ||
# Volumes: All volume paths are to be updated. The secrets folder | ||
# contains the private key for encryption and should be protected. | ||
# example volumes: | ||
# - ../docker/cabernet/data:/app/data # App data (Optional) | ||
# - ../docker/cabernet/plugins_ext:/app/plugins_ext # Plugins Data (Optional) | ||
# - ../docker/cabernet/secrets:/app/.cabernet # Ecryption key data (Optional) | ||
# This will add a docker folder at the same level as the cabernet source | ||
# with the external folders for docker | ||
|
||
version: '2.4' | ||
services: | ||
cabernet: | ||
container_name: cabernet | ||
image: ghcr.io/cabernetwork/cabernet:latest | ||
environment: | ||
- TZ="America/New_York" | ||
- PUID=1000 | ||
- PGID=1000 | ||
- TZ="Etc/UTC" # Timezone (Optional) | ||
- PUID=1000 # UserID (Optional) | ||
- PGID=1000 # GroupID (Optional) | ||
ports: | ||
- "5004:5004" # Port used to stream | ||
- "6077:6077" # Web Interface Port | ||
- "5004:5004" # Port used to stream | ||
restart: unless-stopped | ||
volumes: | ||
- ./docker/cabernet/config/app:/app | ||
- ./.cabernet/key.txt:/root/.cabernet/key.txt | ||
- /path/to/cabernet/data:/app/data # App data (Optional) | ||
- /path/to/cabernet/plugins_ext:/app/plugins_ext # Plugins Data (Optional) | ||
- /path/to/cabernet/secrets:/app/.cabernet # Ecryption key data (Optional) |
Oops, something went wrong.