Feature: add the possibility to disable a service
This commit is contained in:
parent
fab81f731d
commit
02e31585d9
|
@ -79,6 +79,11 @@ sudo su -c "mkdir /data && mkdir /data/config && mkdir /data/torrents"
|
|||
Edit the `.env` file and change the variables as desired.
|
||||
The variables are all self-explanatory.
|
||||
|
||||
**NEW**
|
||||
You can also disable a service if you do not need it by editing the ``services.conf`` file.
|
||||
Simply change the "*enable*" key with the "*disable*" one for the service you want to disable.
|
||||
If you remove a line in this file, it will be considered as "enabled" as all services are enabled by default.
|
||||
|
||||
## Running & updating
|
||||
|
||||
```sh
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
deluge:enable
|
||||
plex:enable
|
||||
flaresolverr:enable
|
||||
jackett:enable
|
||||
sonarr:enable
|
||||
radarr:enable
|
||||
bazarr:enable
|
||||
lidarr:enable
|
||||
tautulli:enable
|
||||
jdownloader:enable
|
||||
tdarr:enable
|
||||
nextcloud-db:enable
|
||||
nextcloud:enable
|
||||
portainer:enable
|
||||
netdata:enable
|
||||
duplicati:enable
|
||||
deluge: enable
|
||||
plex: enable
|
||||
flaresolverr: enable
|
||||
jackett: enable
|
||||
sonarr: enable
|
||||
radarr: enable
|
||||
bazarr: enable
|
||||
lidarr: enable
|
||||
tautulli: enable
|
||||
jdownloader: enable
|
||||
tdarr: enable
|
||||
nextcloud: enable
|
||||
portainer: enable
|
||||
netdata: enable
|
||||
duplicati: enable
|
|
@ -8,7 +8,12 @@ echo "${HTTP_USER}:${HTTP_PASSWORD}" > traefik/http_auth
|
|||
COMPOSE_HTTP_TIMEOUT=240
|
||||
|
||||
# Fetch all YAML files
|
||||
SERVICES=$(find services -mindepth 1 -maxdepth 1 -name "*.yaml" | sed -e 's/^/-f /')
|
||||
disabled_pattern=""
|
||||
while read -r line ; do
|
||||
disabled_pattern="${disabled_pattern} ! -name $line.yaml"
|
||||
done < <(grep "disable" services.conf | awk -F : '{print $1}' )
|
||||
|
||||
SERVICES=$(find services -mindepth 1 -maxdepth 1 -name "*.yaml" ${disabled_pattern} | sed -e 's/^/-f /')
|
||||
ALL_SERVICES="-f docker-compose.yaml $SERVICES"
|
||||
|
||||
echo "[$0] ***** Pulling all images... *****"
|
||||
|
@ -16,7 +21,8 @@ docker-compose ${ALL_SERVICES} pull
|
|||
echo "[$0] ***** Recreating containers if required... *****"
|
||||
docker-compose ${ALL_SERVICES} up -d --remove-orphans
|
||||
echo "[$0] ***** Done updating containers *****"
|
||||
echo "[$0] ***** Clean unused images... *****"
|
||||
echo "[$0] ***** Clean unused images and volumes... *****"
|
||||
docker image prune -af
|
||||
docker volume prune -f
|
||||
echo "[$0] ***** Done! *****"
|
||||
exit 0
|
Loading…
Reference in New Issue