feat(plex): move Plex setup to task model
fix: ports published for plex fix: Dockerfile name
This commit is contained in:
parent
ca496b0b49
commit
d84dfe0ec2
6 changed files with 44 additions and 0 deletions
|
@ -30,6 +30,8 @@ env:
|
|||
ENV_FILE_DIR: ...
|
||||
# Name of the network associated with the tunnel exposing services.
|
||||
SHARED_NETWORK_NAME: ...
|
||||
# Path to the storage root.
|
||||
STORAGE_DIR: ...
|
||||
```
|
||||
|
||||
The `env.yml` file is ignored by version-control.
|
||||
|
|
5
services/plex/build.sh
Normal file
5
services/plex/build.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
source constants.sh
|
||||
|
||||
docker build -t $APP_IMAGE_NAME:dev -f Dockerfile-plex-app .
|
8
services/plex/constants.sh
Normal file
8
services/plex/constants.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
export APP_NAME="plex"
|
||||
export APP_CONTAINER_NAME=$APP_NAME-app
|
||||
export APP_IMAGE_NAME=$CONTAINER_NAME_PREFIX-$APP_CONTAINER_NAME
|
||||
export DB_CONTAINER_NAME=$APP_NAME-db
|
||||
export DB_IMAGE_NAME=$CONTAINER_NAME_PREFIX-$DB_CONTAINER_NAME
|
||||
export NETWORK_NAME=$APP_NAME-local
|
24
services/plex/start.sh
Normal file
24
services/plex/start.sh
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
source constants.sh
|
||||
|
||||
docker network create $NETWORK_NAME || echo "Network $NETWORK_NAME already exists"
|
||||
|
||||
docker run \
|
||||
--detach \
|
||||
--network $NETWORK_NAME \
|
||||
--name $APP_CONTAINER_NAME \
|
||||
--env-file $ENV_FILE_DIR/plex.env \
|
||||
--publish 32401:32400 \
|
||||
--publish 32469:32469 \
|
||||
--publish 3005:3005 \
|
||||
--publish 8324:8324 \
|
||||
--publish 1900:1900/udp \
|
||||
--publish 32410:32410/udp \
|
||||
--publish 32412:32412/udp \
|
||||
--publish 32413:32413/udp \
|
||||
--publish 32414:32414/udp \
|
||||
--mount type=bind,source=$APP_DATA_DIR/plex/database,target=/config \
|
||||
--mount type=bind,source=$APP_DATA_DIR/plex/transcode,target=/transcode \
|
||||
--mount type=bind,source=$STORAGE_DIR/media,target=/data \
|
||||
$APP_IMAGE_NAME:dev
|
5
services/plex/stop.sh
Normal file
5
services/plex/stop.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
source constants.sh
|
||||
|
||||
docker rm -f $APP_CONTAINER_NAME
|
Reference in a new issue