diff --git a/docs/Complete and Partial Rackdown.md b/docs/Complete and Partial Rackdown.md index f36401f..3303f3e 100644 --- a/docs/Complete and Partial Rackdown.md +++ b/docs/Complete and Partial Rackdown.md @@ -62,16 +62,16 @@ set service dhcp-server shared-network-name LAN1 subnet 192.168.1.0/24 dns-serve commit; save; exit ``` -3. Shut down Minecraft servers: `cd ~/homelab/server/config/minecraft && for service in ./*.yml; do echo "===== SHUTTING DOWN $service =====" && docker-compose -f $service down; done` -4. Shut down remaining services: `for app in ~/homelab/server/config/*; do echo "===== SHUTTING DOWN $app =====" && cd $app && docker-compose down; done` +3. Shut down Minecraft servers: `cd ~/homelab/jafner-net/config/minecraft && for service in ./*.yml; do echo "===== SHUTTING DOWN $service =====" && docker-compose -f $service down; done` +4. Shut down remaining services: `for app in ~/homelab/jafner-net/config/*; do echo "===== SHUTTING DOWN $app =====" && cd $app && docker-compose down; done` 5. Shut down the host: `sudo shutdown now`. Wait 30 seconds. If the green power LED doesn't turn off, hold the power button until it does. ### Boot 6. Press the power button on the front of the chassis to begin booting. Take note of any POST beeps during this time. Wait for the host to be accessible via SSH. 7. Check current running docker containers 8. Confirm all SMB shares are mounted with `mount -t cifs`. If not mounted, run `mount -a` for all shares. -9. Start most services: `for app in ~/homelab/server/config/*; do echo "===== STARTING $app =====" && cd $app && docker-compose up -d; done` -10. Start Minecraft servers: `cd ~/homelab/server/config/minecraft && for service in ./*.yml; do echo "===== STARTING $service =====" && docker-compose -f $service up -d; done` +9. Start most services: `for app in ~/homelab/jafner-net/config/*; do echo "===== STARTING $app =====" && cd $app && docker-compose up -d; done` +10. Start Minecraft servers: `cd ~/homelab/jafner-net/config/minecraft && for service in ./*.yml; do echo "===== STARTING $service =====" && docker-compose -f $service up -d; done` 11. Reconfigure the router's DNS resolution: ``` @@ -100,12 +100,12 @@ Note: this is meant to be human-readable, so it prints the container's name befo ### Recreate all Docker containers one-liner ```bash -STACKS_RESTARTED=0 && for app in ~/homelab/server/config/*; do echo "===== RECREATING $app =====" && cd $app && docker-compose up -d --force-recreate && STACKS_RESTARTED=$(($STACKS_RESTARTED + 1)); done && cd ~/homelab/server/config/minecraft && for service in ./*.yml; do echo "===== RECREATING $service =====" && docker-compose -f $service up -d --force-recreate && STACKS_RESTARTED=$(($STACKS_RESTARTED + 1)); done && echo "===== DONE (restarted $STACKS_RESTARTED stacks) =====" +STACKS_RESTARTED=0 && for app in ~/homelab/jafner-net/config/*; do echo "===== RECREATING $app =====" && cd $app && docker-compose up -d --force-recreate && STACKS_RESTARTED=$(($STACKS_RESTARTED + 1)); done && cd ~/homelab/jafner-net/config/minecraft && for service in ./*.yml; do echo "===== RECREATING $service =====" && docker-compose -f $service up -d --force-recreate && STACKS_RESTARTED=$(($STACKS_RESTARTED + 1)); done && echo "===== DONE (restarted $STACKS_RESTARTED stacks) =====" ``` #### Recreate based on list of containers ```bash -STACKS_RESTARTED=0 && for app in calibre-web homer jdownloader2 librespeed monitoring navidrome qbittorrent send stashapp traefik; do echo "===== RECREATING $app =====" && cd ~/homelab/server/config/$app && docker-compose up -d && STACKS_RESTARTED=$(($STACKS_RESTARTED + 1)); done && echo "===== DONE (restarted $STACKS_RESTARTED stacks) =====" && cd ~ +STACKS_RESTARTED=0 && for app in calibre-web homer jdownloader2 librespeed monitoring navidrome qbittorrent send stashapp traefik; do echo "===== RECREATING $app =====" && cd ~/homelab/jafner-net/config/$app && docker-compose up -d && STACKS_RESTARTED=$(($STACKS_RESTARTED + 1)); done && echo "===== DONE (restarted $STACKS_RESTARTED stacks) =====" && cd ~ ``` ## NAS diff --git a/docs/Restart the Docker Daemon.md b/docs/Restart the Docker Daemon.md index aa0d6f0..0aea397 100644 --- a/docs/Restart the Docker Daemon.md +++ b/docs/Restart the Docker Daemon.md @@ -2,5 +2,5 @@ Sometimes it may be necessary to restart the Docker daemon (for example to apply changes made in `/etc/docker/daemon.json`) and recreate all containers. Here's how: 1. Shut down and destroy all containers: `docker stop $(docker ps -aq) && docker rm $(docker ps -aq)`. 2. *Restart* (not reload) the Docker daemon: `sudo systemctl restart docker`. -3. Recreate all containers (to use the new default loki logging): `for app in ~/homelab/server/config/*; do cd $app && docker-compose up -d; done` -4. Manually boot Minecraft containers as appropriate: `cd ~/homelab/server/config/minecraft && for server in router vanilla bmcp; do docker-compose -f $server.yml up -d; done` \ No newline at end of file +3. Recreate all containers (to use the new default loki logging): `for app in ~/homelab/jafner-net/config/*; do cd $app && docker-compose up -d; done` +4. Manually boot Minecraft containers as appropriate: `cd ~/homelab/jafner-net/config/minecraft && for server in router vanilla bmcp; do docker-compose -f $server.yml up -d; done` \ No newline at end of file diff --git a/jafner-net/README.md b/jafner-net/README.md index 82349e7..47dcc45 100644 --- a/jafner-net/README.md +++ b/jafner-net/README.md @@ -41,7 +41,7 @@ ADMIN_EMAIL=joey@jafner.net ## Container volume mapping DOCKER_DATA=/home/joey/data/ # DOCKER_DATA=/mnt/md0/ # for services whose internal data may be large (e.g. modded minecraft servers with large world files) -DOCKER_CONFIG=/home/joey/homelab/server/config//config +DOCKER_CONFIG=/home/joey/homelab/jafner-net/config//config ## Additional volume mapping MEDIA_DIR=/mnt/nas/media @@ -87,7 +87,7 @@ services: labels: - traefik.http.routers..rule=Host(`.jafner.net`) - traefik.http.routers..tls.certresolver=lets-encrypt - - traefik.http.routers..middlewares= # available middlewares are available in homelab/server/config/traefik/config/middlewares.yaml + - traefik.http.routers..middlewares= # available middlewares are available in homelab/jafner-net/config/traefik/config/middlewares.yaml - traefik.http.services..loadbalancer.server.port= networks: - web diff --git a/jafner-net/config/ddns/README.md b/jafner-net/config/ddns/README.md index 523d9e2..a36966a 100644 --- a/jafner-net/config/ddns/README.md +++ b/jafner-net/config/ddns/README.md @@ -6,7 +6,7 @@ Our credentials are stored in `ddclient_secrets.env`, which is git-ignored. Addi So we generate the config file when it must be updated. To update the file, we can run the following command: ```bash -cd ~/homelab/server/config/ddns/ && \ +cd ~/homelab/jafner-net/config/ddns/ && \ export $(cat ddclient_secrets.env | xargs) && \ envsubst < ./ddclient/ddclient.template > ./ddclient/ddclient.conf && \ unset $(grep -v '^#' ddclient_secrets.env | sed -E 's/(.*)=.*/\1/' | xargs) && \ diff --git a/jafner-net/config/monitoring/README.md b/jafner-net/config/monitoring/README.md index a4ae96c..64056f8 100644 --- a/jafner-net/config/monitoring/README.md +++ b/jafner-net/config/monitoring/README.md @@ -89,7 +89,7 @@ Docker-compose adds a few labels to containers it starts. This feature is not co | `com.docker.compose.oneoff` | `False` | | `com.docker.compose.project` | `wireguard` | | `com.docker.compose.project.config_files` | `docker-compose.yml` | -| `com.docker.compose.project.working_dir` | `/home/joey/homelab/server/config/wireguard` | +| `com.docker.compose.project.working_dir` | `/home/joey/homelab/jafner-net/config/wireguard` | | `com.docker.compose.service` | `wg-easy` | | `com.docker.compose.version` | `1.29.2` | diff --git a/jafner-net/config/qbittorrent/README.md b/jafner-net/config/qbittorrent/README.md index 27bf39a..77779fd 100644 --- a/jafner-net/config/qbittorrent/README.md +++ b/jafner-net/config/qbittorrent/README.md @@ -33,5 +33,5 @@ Prerequisites: Steps: 1. Get the URL of the Qbittorrent webUI. `docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' qbittorrent_qbittorrent`. We'll assume the default port of `8080` for the webUI here. 2. Get the username and password for the webUI. These should be in a password manager. -3. Run the script `python3 ~/homelab/server/scripts/remove_trumped_torrents.py`. When prompted, input the `host` like `172.18.0.28:8080` with the IP found in step 1. Use the credentials from step 2 for username and password. +3. Run the script `python3 ~/homelab/jafner-net/scripts/remove_trumped_torrents.py`. When prompted, input the `host` like `172.18.0.28:8080` with the IP found in step 1. Use the credentials from step 2 for username and password. 4. Done. diff --git a/nas/README.md b/nas/README.md index eb793b1..c34c966 100644 --- a/nas/README.md +++ b/nas/README.md @@ -180,13 +180,13 @@ TODO, not yet designed. | Backups | server/cron | ## Offlining dependent services -- Text: `cd ~/homelab/server/config/calibre-web && docker-compose down ; sudo umount /mnt/nas/calibre` +- Text: `cd ~/homelab/jafner-net/config/calibre-web && docker-compose down ; sudo umount /mnt/nas/calibre` - Torrenting: `cd ~/homelab/seedbox/config/deluge/ ; for DIR in emp ggn mam pub; do cd ./$DIR && docker-compose down && cd ../ ; done ; sudo umount /mnt/torrenting` -- Media: `cd ~/homelab/server/config/autopirate && docker-compose down ; cd ~/homelab/server/config/plex && docker-compose down ; sudo umount /mnt/nas/media` +- Media: `cd ~/homelab/jafner-net/config/autopirate && docker-compose down ; cd ~/homelab/jafner-net/config/plex && docker-compose down ; sudo umount /mnt/nas/media` - Backups: This cron job runs once per day at midnight. If possible, perform maintenance between runs. If not possible, comment out the jobs via `crontab -e`. ## Online dependent services -- Text: `sudo mount /mnt/nas/calibre && cd ~/homelab/server/config/calibre-web && docker-compose up -d` +- Text: `sudo mount /mnt/nas/calibre && cd ~/homelab/jafner-net/config/calibre-web && docker-compose up -d` - Torrenting: `sudo mount /mnt/torrenting && cd ~/homelab/seedbox/config/deluge/ ; for DIR in emp ggn mam pub; do cd ./$DIR && docker-compose up -d && cd ../ ; done` -- Media: `sudo mount /mnt/nas/media && cd ~/homelab/server/config/autopirate && docker-compose up -d ; cd ~/homelab/server/config/plex && docker-compose up -d` +- Media: `sudo mount /mnt/nas/media && cd ~/homelab/jafner-net/config/autopirate && docker-compose up -d ; cd ~/homelab/jafner-net/config/plex && docker-compose up -d` - Backups: Uncomment the commented lines with `crontab -e`. \ No newline at end of file