Skip to content

Commit

Permalink
Minor changes to Docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky4546 committed Jan 5, 2024
1 parent 7cac445 commit a354ee6
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 73 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
!lib
!plugins
!requirements.txt
!entrypoint.sh
!Docker_entrypoint.sh
!LICENSE
2 changes: 1 addition & 1 deletion entrypoint.sh → Docker_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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_updagrade_from_WEBUI_on_Docker"
blockUpdate="/app/Do_Not_Upgrade_from_WEBUI_on_Docker"

oldKeyFile="/root/.cabernet/key.txt"
newKeyFile="/app/.cabernet/key.txt"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ RUN apk add --no-cache --update bash tzdata ffmpeg curl su-exec && \

VOLUME /app/data /app/plugins_ext /app/.cabernet
EXPOSE 6077 5004
ENTRYPOINT ["entrypoint.sh"]
ENTRYPOINT ["Docker_entrypoint.sh"]
14 changes: 0 additions & 14 deletions Dockerfile_l2p

This file was deleted.

14 changes: 0 additions & 14 deletions Dockerfile_tvh

This file was deleted.

48 changes: 15 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,9 @@ By default this app doesn't provide any video sources, only the plugins access t
- Launch the app by running the command "python3 tvh_main.py". This should create a data folder and a config.ini inside that folder
- Bring up browser and go to http://ip address:6077/
- From Plugins, install PlutoTV plugin
- Stop the app
- Edit the data/config.ini and add the following lines (Update: This is suppose to automatically happen in 0.9.14)
<pre>
[plutotv_default]
label = PlutoTV Instance
</pre>
- Launch the app by running the command "python3 tvh_main.py"
- Bring up browser and go to http://ip address:6077/
- Restart Cabernet twice from Scheduled Tasks > Applications > Restart
- Go to settings and make changes you want.
- Logging: Change log level from warning to info if needed
- Enable the PlutoTV instance in the Settings page
- Restart the app (from the Scheduler/Applications) to have the plugin fully activate
- From XML/JSON Links try some of the links

### 3. Services
Expand All @@ -50,28 +41,16 @@ You can either use docker-compose or the docker cli.
- armhf not available due to python cryptography only supports 64bit systems.
[Cryptography supported platforms](https://cryptography.io/en/latest/installation/#supported-platforms)

#### docker-compose
#### a. Using docker-compose
To install Cabernet:
```
version: '2.4'
services:
cabernet:
container_name: cabernet
image: ghcr.io/cabernetwork/cabernet:latest
environment:
- TZ="Etc/UTC" # optional
- PUID=1000 # optional
- PGID=1000 # optional
ports:
- "6077:6077"
- "5004:5004"
restart: unless-stopped
volumes:
- /path/to/cabernet/data:/app/data # optional
- /path/to/cabernet/plugins_ext:/app/plugins_ext # optional
- /path/to/cabernet/secrets:/app/.cabernet # optional
1. Grab the cabernet source and unpack into a folder
2. Edit docker-compose.yml and set the volume folder locations
3. docker-compose pull cabernet
4. docker-compose up -d cabernet
```

#### docker cli
#### b. docker cli
```
docker run -d \
--name=cabernet \
Expand All @@ -87,8 +66,7 @@ docker run -d \
ghcr.io/cabernetwork/cabernet:latest
```

#### Parameters

##### Parameters
| Parameter | Function |
| :----: | :----: |
| -p 6077 | Cabernet WebUI |
Expand All @@ -100,7 +78,11 @@ docker run -d \
| -v /app/plugins_ext | External Plugins |
| -v /app/.cabernet | Where encryption key is stored |

#### Updating Info
#### c. Other Docker Info
Cabernet configuration setting Clients > Web Sites > plex_docker_ip should be set to your computers IP address and not the internal IP inside the docker container. This will allow the channels.m3u file to have the correct IP address for streaming.


#### d. Updating Info
**Via Docker Compose:**

- Update the image:
Expand All @@ -124,7 +106,7 @@ docker-compose up -d cabernet
- You can also remove the old dangling images:
```docker image prune```

#### Via Watchtower auto-updater
#### e. Via Watchtower auto-updater
```
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
Expand Down
19 changes: 15 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
# 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
image: ghcr.io/cabernetwork/cabernet:dev
environment:
- TZ="Etc/UTC" # Timezone (Optional)
- PUID=1000 # UserID (Optional)
Expand All @@ -12,6 +23,6 @@ services:
- "5004:5004" # Port used to stream
restart: unless-stopped
volumes:
- /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)
- ../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)
2 changes: 1 addition & 1 deletion lib/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

import lib.common.exceptions as exceptions

VERSION = '0.9.14.03'
VERSION = '0.9.15.00-DEV01'
CABERNET_URL = 'https://github.com/cabernetwork/cabernet'
CABERNET_ID = 'cabernet'
CABERNET_REPO = 'manifest.json'
Expand Down
2 changes: 1 addition & 1 deletion lib/db/datamgmt/data_mgmt_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def backups(self):
return html

def del_backup(self, _folder):
valid_regex = re.compile('^([a-zA-Z0-9_.]+$)')
valid_regex = re.compile('^([a-zA-Z0-9_.-]+$)')
if not valid_regex.match(_folder):
self.logger.info('Invalid backup folder to delete: {}'.format(_folder))
return
Expand Down
6 changes: 3 additions & 3 deletions lib/resources/config_defn/clients.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"help": "Default: 0.0.0.0. Use instead of plex_accessible_ip. 0.0.0.0 means bind to all IPs and use the main IP address for json data"
},
"plex_accessible_ip":{
"label": "plex_accessible_ip",
"label": "plex_docker_ip",
"type": "string",
"default": "0.0.0.0",
"level": 1,
"help": "The IP provided to the clients for http requests"
"help": "The IP provided to the clients for http requests. If using docker and video does not play, try changing this to your computer's IP"
},
"bind_ip":{
"label": "bind_ip",
Expand All @@ -35,7 +35,7 @@
"help": null
},
"plex_accessible_port":{
"label": "plex_accessible_port",
"label": "streaming_port",
"type": "integer",
"default": 5004,
"level": 1,
Expand Down

0 comments on commit a354ee6

Please sign in to comment.