Add service name to persistent dirs

master
Paul Walko 2019-09-08 16:17:15 -04:00
parent 33c34b3c06
commit fc800aade6
8 changed files with 20 additions and 27 deletions

16
.gitignore vendored
View File

@ -1,13 +1,13 @@
**/*htpasswd* **/*htpasswd*
**/backups **/backups
fogcutter/docker/airsonic/config fogcutter/docker/airsonic/airsonic-config
fogcutter/docker/minecraft/data fogcutter/docker/minecraft/minecraft-data
fogcutter/docker/nginx/config fogcutter/docker/nginx/nginx-config
fogcutter/docker/plex/config fogcutter/docker/plex/plex-config
fogcutter/docker/syncthing/config fogcutter/docker/syncthing/syncthing-config
fogcutter/docker/syncthing/sync fogcutter/docker/syncthing/syncthing-sync
fogcutter/docker/monitoring/grafana/data fogcutter/docker/monitoring/grafana/grafana-data
fogcutter/docker/monitoring/prometheus/data fogcutter/docker/monitoring/prometheus/prometheus-data
madone/docker/nginx/config madone/docker/nginx/config
madone/docker/syncthing/config madone/docker/syncthing/config
madone/docker/syncthing/sync madone/docker/syncthing/sync

View File

@ -6,15 +6,8 @@ DATE=$(date --iso-8601)
FINGERPRINT=1807F8D422B89582ADEC4A790B1A6ED3E577B121 FINGERPRINT=1807F8D422B89582ADEC4A790B1A6ED3E577B121
SERVICE_PATH=/home/paul/scripts/fogcutter/docker SERVICE_PATH=/home/paul/scripts/fogcutter/docker
BACKUP_PATH=/bigdata/backups BACKUP_PATH=/bigdata/backups
WORKDIR=/tmp
cd $WORKDIR tar cz -C "$SERVICE_PATH"/minecraft ./minecraft-data | gpg -e -r $FINGERPRINT -o "$BACKUP_PATH"/minecraft-data-"$DATE".tar.gz.gpg
cp -r "$SERVICE_PATH"/minecraft/data ./minecraft-data tar cz -C "$SERVICE_PATH"/syncthing ./syncthing-sync | gpg -e -r $FINGERPRINT -o "$BACKUP_PATH"/syncthing-sync-"$DATE".tar.gz.gpg
tar cz ./minecraft-data | gpg -e -r $FINGERPRINT -o "$BACKUP_PATH"/minecraft-data-"$DATE".tgz.gpg
rm -rf ./minecraft-data
cp -r "$SERVICE_PATH"/syncthing/sync ./syncthing-data
tar cz ./syncthing-data | gpg -e -r $FINGERPRINT -o "$BACKUP_PATH"/syncthing-data-"$DATE".tgz.gpg
rm -rf ./syncthing-data

View File

@ -10,7 +10,7 @@ docker run \
--env PUID=1000 \ --env PUID=1000 \
--env PGID=1000 \ --env PGID=1000 \
--env TZ=US/Easter \ --env TZ=US/Easter \
--volume $PWD/config:/config \ --volume $PWD/airsonic-config:/config \
--volume /bigdata/media/music:/media/music:ro \ --volume /bigdata/media/music:/media/music:ro \
--volume /bigdata/media/playlists:/media/playlists:rw \ --volume /bigdata/media/playlists:/media/playlists:rw \
--volume /bigdata/media/podcasts:/media/podcasts:rw \ --volume /bigdata/media/podcasts:/media/podcasts:rw \

View File

@ -8,7 +8,7 @@ docker run \
--restart unless-stopped \ --restart unless-stopped \
--env EULA=TRUE \ --env EULA=TRUE \
--env MAX_MEMORY=8G \ --env MAX_MEMORY=8G \
--volume $PWD/data:/data \ --volume $PWD/minecraft-data:/data \
--publish 10.42.0.203:25565:25565 \ --publish 10.42.0.203:25565:25565 \
--publish [2601:5c0:c100:6e65:96c6:91ff:feab:69e3]:25565:25565 \ --publish [2601:5c0:c100:6e65:96c6:91ff:feab:69e3]:25565:25565 \
itzg/minecraft-server:latest itzg/minecraft-server:latest

View File

@ -7,14 +7,14 @@
docker network create pew-monitoring-net docker network create pew-monitoring-net
# grafana-cli plugins install grafana-piechart-panel # grafana-cli plugins install grafana-piechart-panel
sudo chown 472:472 $PWD/grafana/{data,provisioning} \ sudo chown 472:472 $PWD/grafana/{grafana-data,provisioning} \
&& \ && \
docker run \ docker run \
--name monitoring_grafana \ --name monitoring_grafana \
--detach \ --detach \
--restart unless-stopped \ --restart unless-stopped \
--user 472 \ --user 472 \
--volume $PWD/grafana/data:/var/lib/grafana:rw \ --volume $PWD/grafana/grafana-data:/var/lib/grafana:rw \
--volume $PWD/grafana/provisioning:/etc/grafana/provisioning:rw \ --volume $PWD/grafana/provisioning:/etc/grafana/provisioning:rw \
--publish 3000:3000 \ --publish 3000:3000 \
--network pew-monitoring-net \ --network pew-monitoring-net \
@ -23,13 +23,13 @@ docker run \
docker network connect pew-net monitoring_grafana docker network connect pew-net monitoring_grafana
# --publish 9090:9090 \ # --publish 9090:9090 \
sudo chown nobody:nogroup $PWD/prometheus/data \ sudo chown nobody:nogroup $PWD/prometheus/prometheus-data \
&& \ && \
docker run \ docker run \
--name monitoring_prometheus \ --name monitoring_prometheus \
--detach \ --detach \
--restart unless-stopped \ --restart unless-stopped \
--volume $PWD/prometheus/data:/prometheus:rw \ --volume $PWD/prometheus/prometheus-data:/prometheus:rw \
--volume $PWD/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro \ --volume $PWD/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro \
--volume $PWD/prometheus/alert.rules:/etc/prometheus/alert.rules:ro \ --volume $PWD/prometheus/alert.rules:/etc/prometheus/alert.rules:ro \
--network pew-monitoring-net \ --network pew-monitoring-net \

View File

@ -13,7 +13,7 @@ docker run \
--env SUBDOMAINS=airsonic,plex,www \ --env SUBDOMAINS=airsonic,plex,www \
--env VALIDATION=html \ --env VALIDATION=html \
--env TZ=US/Eastern \ --env TZ=US/Eastern \
--volume $PWD/config:/config:rw \ --volume $PWD/nginx-config:/config:rw \
--volume $PWD/nginx.conf:/config/nginx/nginx.conf:ro \ --volume $PWD/nginx.conf:/config/nginx/nginx.conf:ro \
--volume $PWD/site-confs:/config/nginx/site-confs:ro \ --volume $PWD/site-confs:/config/nginx/site-confs:ro \
--volume $PWD/../syncthing/sync:/sync-docker:ro \ --volume $PWD/../syncthing/sync:/sync-docker:ro \

View File

@ -10,7 +10,7 @@ docker run \
--env PUID=1000 \ --env PUID=1000 \
--env PGID=1000 \ --env PGID=1000 \
--env VERSION=docker \ --env VERSION=docker \
--volume $PWD/config:/config:rw \ --volume $PWD/plex-config:/config:rw \
--volume /bigdata/media/movies:/media/movies:ro \ --volume /bigdata/media/movies:/media/movies:ro \
--volume /bigdata/media/music:/media/music:ro \ --volume /bigdata/media/music:/media/music:ro \
--volume /media-vtluug:/media/media-vtluug:ro \ --volume /media-vtluug:/media/media-vtluug:ro \

View File

@ -11,8 +11,8 @@ docker run \
--env PGID=1000 \ --env PGID=1000 \
--env TZ=Europe/London \ --env TZ=Europe/London \
--env UMASK_SET=022 \ --env UMASK_SET=022 \
--volume $PWD/config:/config:rw \ --volume $PWD/syncthing-config:/config:rw \
--volume $PWD/sync:/sync-docker:rw \ --volume $PWD/syncthing-sync:/sync-docker:rw \
--publish 22000:22000 \ --publish 22000:22000 \
--publish 21027:21027/udp \ --publish 21027:21027/udp \
--network pew-net \ --network pew-net \