diff --git a/services/Dockerfile-deluge b/services/deluge/Dockerfile-deluge-app similarity index 100% rename from services/Dockerfile-deluge rename to services/deluge/Dockerfile-deluge-app diff --git a/services/deluge/build.sh b/services/deluge/build.sh new file mode 100644 index 0000000..d2adb1b --- /dev/null +++ b/services/deluge/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +source constants.sh + +docker build -t $APP_IMAGE_NAME:dev -f Dockerfile-deluge-app . diff --git a/services/deluge/constants.sh b/services/deluge/constants.sh new file mode 100644 index 0000000..e68981f --- /dev/null +++ b/services/deluge/constants.sh @@ -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 diff --git a/services/deluge/start.sh b/services/deluge/start.sh new file mode 100644 index 0000000..69b05e6 --- /dev/null +++ b/services/deluge/start.sh @@ -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 diff --git a/services/deluge/stop.sh b/services/deluge/stop.sh new file mode 100644 index 0000000..871ff06 --- /dev/null +++ b/services/deluge/stop.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +source constants.sh + +docker rm -f $APP_CONTAINER_NAME