Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transmission container plus volume management #15

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .templates/transmission/service.yml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions .templates/transmission/volumes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

transm_download_volume:
driver: local
driver_opts:
o: bind
type: none
device: <transm_download_volume absolute path on disk>

transm_watch_volume:
driver: local
driver_opts:
o: bind
type: none
device: <transm_watch_volume absolute path on disk>

transm_config_volume:
driver: local
driver_opts:
o: bind
type: none
device: <transm_config_volume absolute path on disk>
14 changes: 13 additions & 1 deletion menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")

Expand Down Expand Up @@ -116,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
Expand Down Expand Up @@ -259,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"
Expand Down