From 98bce8509c67633dfdb7fa0181a969b81c7629d9 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Sat, 28 Sep 2024 11:59:15 -0400 Subject: [PATCH] feat: migrate to service def --- build.sh | 3 --- Dockerfile-deluge-app => deluge.Dockerfile | 2 ++ service.yml | 18 ++++++++++++++++++ start.sh | 19 ------------------- stop.sh | 3 --- 5 files changed, 20 insertions(+), 25 deletions(-) delete mode 100644 build.sh rename Dockerfile-deluge-app => deluge.Dockerfile (76%) create mode 100644 service.yml delete mode 100644 start.sh delete mode 100644 stop.sh diff --git a/build.sh b/build.sh deleted file mode 100644 index 4bd8d17..0000000 --- a/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -podman build -t "spad-deluge-app:$IMAGE_VERSION" -f Dockerfile-deluge-app . diff --git a/Dockerfile-deluge-app b/deluge.Dockerfile similarity index 76% rename from Dockerfile-deluge-app rename to deluge.Dockerfile index bb90119..23b1a4a 100644 --- a/Dockerfile-deluge-app +++ b/deluge.Dockerfile @@ -1,5 +1,7 @@ FROM lscr.io/linuxserver/deluge:latest ENV TZ=America/Toronto +ENV PGUID=1000 +ENV PGID=1000 EXPOSE 8112 6881/tcp 6881/udp diff --git a/service.yml b/service.yml new file mode 100644 index 0000000..7b49687 --- /dev/null +++ b/service.yml @@ -0,0 +1,18 @@ +name: deluge +ports: + - host: 8112 + container: 8112 +containers: + - name: app + volumes: + - host: /mnt/hintonburggrad/apps/deluge/config + container: /config + - host: /mnt/hintonburggrad/apps/deluge/downloads + container: /downloads + - host: /mnt/hintonburggrad/media + container: /complete + image: deluge-app:latest +build: + images: + - path: ./deluge.Dockerfile + tag: deluge-app diff --git a/start.sh b/start.sh deleted file mode 100644 index e8fec3b..0000000 --- a/start.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -podman pod create \ - -p 8112:8112 \ - --replace \ - "deluge" - -podman run \ - -d \ - --pod "deluge" \ - -e PGUID=1000 \ - -e PGID=1000 \ - --name "deluge_app" \ - --env-file "$ENV_FILE_DIR"/deluge.env \ - --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 \ - --replace \ - "spad-deluge-app:$IMAGE_VERSION" diff --git a/stop.sh b/stop.sh deleted file mode 100644 index 05bec24..0000000 --- a/stop.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -podman pod stop "deluge"