feat(deluge): move Deluge setup to task model
fix: image filename deluge
This commit is contained in:
parent
2750484eec
commit
2ef50df073
5 changed files with 34 additions and 0 deletions
5
services/deluge/build.sh
Normal file
5
services/deluge/build.sh
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source constants.sh
|
||||||
|
|
||||||
|
docker build -t $APP_IMAGE_NAME:dev -f Dockerfile-deluge-app .
|
6
services/deluge/constants.sh
Normal file
6
services/deluge/constants.sh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export APP_NAME="deluge"
|
||||||
|
export APP_CONTAINER_NAME=$APP_NAME-app
|
||||||
|
export APP_IMAGE_NAME=$CONTAINER_NAME_PREFIX-$APP_CONTAINER_NAME
|
||||||
|
export NETWORK_NAME=$APP_NAME-local
|
18
services/deluge/start.sh
Normal file
18
services/deluge/start.sh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/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/deluge.env \
|
||||||
|
--publish 8112:8112 \
|
||||||
|
--publish 6881:6881/udp \
|
||||||
|
--publish 6881:6881/tcp \
|
||||||
|
--mount type=bind,source=$APP_DATA_DIR/deluge/config,target=/config \
|
||||||
|
--mount type=bind,source=$APP_DATA_DIR/deluge/downloads,target=/downloads \
|
||||||
|
--mount type=bind,source=$STORAGE_DIR,target=/complete \
|
||||||
|
$APP_IMAGE_NAME:dev
|
5
services/deluge/stop.sh
Normal file
5
services/deluge/stop.sh
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source constants.sh
|
||||||
|
|
||||||
|
docker rm -f $APP_CONTAINER_NAME
|
Reference in a new issue