From cb3e1b0d1a8b41f2363c838a5be831879a232d37 Mon Sep 17 00:00:00 2001 From: Gabriele Pongelli Date: Sun, 22 Mar 2020 16:57:56 +0100 Subject: [PATCH 1/2] added transmission container --- .templates/transmission/service.yml | 16 ++++++++++++++++ menu.sh | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .templates/transmission/service.yml diff --git a/.templates/transmission/service.yml b/.templates/transmission/service.yml new file mode 100644 index 00000000..f6e46e8d --- /dev/null +++ b/.templates/transmission/service.yml @@ -0,0 +1,16 @@ + transmission: + image: linuxserver/transmission + container_name: transmission + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Rome + volumes: + - transm_config_volume:/config + - transm_download_volume:/downloads + - transm_watch_volume:/watch + ports: + - 9091:9091 + - 51413:51413 + - 51413:51413/udp + restart: unless-stopped diff --git a/menu.sh b/menu.sh index 6c11d62f..5682538d 100755 --- a/menu.sh +++ b/menu.sh @@ -8,6 +8,7 @@ declare -A cont_array=( [nodered]="Node-RED" [influxdb]="InfluxDB" [telegraf]="Telegraf (Requires InfluxDB and Mosquitto)" + [transmission]="transmission" [grafana]="Grafana" [mosquitto]="Eclipse-Mosquitto" [postgres]="Postgres" @@ -30,7 +31,7 @@ declare -A cont_array=( [python]="Python 3" ) -declare -a armhf_keys=("portainer" "nodered" "influxdb" "grafana" "mosquitto" "telegraf" "mariadb" "postgres" +declare -a armhf_keys=("portainer" "nodered" "influxdb" "grafana" "mosquitto" "telegraf" "mariadb" "postgres" "transmission" "adminer" "openhab" "zigbee2mqtt" "pihole" "plex" "tasmoadmin" "rtl_433" "espruinohub" "motioneye" "webthings_gateway" "blynk_server" "nextcloud" "diyhue" "homebridge" "python") From 7751ed0b2615ecfd115817c28644568e069d098d Mon Sep 17 00:00:00 2001 From: Gabriele Pongelli Date: Sun, 22 Mar 2020 16:58:52 +0100 Subject: [PATCH 2/2] add volumes management from template --- .templates/transmission/volumes.yml | 21 +++++++++++++++++++++ menu.sh | 11 +++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .templates/transmission/volumes.yml diff --git a/.templates/transmission/volumes.yml b/.templates/transmission/volumes.yml new file mode 100644 index 00000000..597c494b --- /dev/null +++ b/.templates/transmission/volumes.yml @@ -0,0 +1,21 @@ + + transm_download_volume: + driver: local + driver_opts: + o: bind + type: none + device: + + transm_watch_volume: + driver: local + driver_opts: + o: bind + type: none + device: + + transm_config_volume: + driver: local + driver_opts: + o: bind + type: none + device: diff --git a/menu.sh b/menu.sh index 5682538d..581bab20 100755 --- a/menu.sh +++ b/menu.sh @@ -117,6 +117,9 @@ function yml_builder() { #if an env file exists check for timezone [ -f "./services/$1/$1.env" ] && timezones ./services/$1/$1.env + # if a volumes.yml exists, append to overall volumes.yml file + [ -f "./services/$1/volumes.yml" ] && cat "./services/$1/volumes.yml" >> docker-volumes.yml + #add new line then append service echo "" >>docker-compose.yml cat $service >>docker-compose.yml @@ -260,6 +263,14 @@ case $mainmenu_selection in done fi fi + + # if a container needs volume, put it at the end of docker-compose + if [ -f docker-volumes.yml ]; then + echo "" >> docker-compose.yml + echo "volumes:" >> docker-compose.yml + cat docker-volumes.yml >> docker-compose.yml + rm docker-volumes.yml + fi echo "docker-compose successfully created" echo "run 'docker-compose up -d' to start the stack"