Disable auto-start for all containers. (Set all restart: "no")

This commit is contained in:
Joey Hafner 2022-07-13 10:47:27 -07:00
parent 600b28b859
commit df054da499
31 changed files with 95 additions and 47 deletions

View File

@ -0,0 +1,48 @@
# About
"Rackdown" is AWS slang for turning a rack of hosts off and on again. In this case, the "rack" refers to practically all components of the DC. Server, NAS, disk shelf, switches, router, PiHole, modem, APs, and desktops. This doc will consolidate previous docs and provide an overall shutdown and reboot procedure.
# Overview (Dependency Graph)
```mermaid
flowchart TD;
CLN["CenturyLink node"]<--Depends--ONT;
ONT<--Cat5e-->Modem[ISP Modem/Router];
Modem<--Cat5e-->Router[Ubiquiti EdgeRouter 10X];
Router<--Cat5e-->switch_homelab[NetGear 8-Port Switch for Homelab];
switch_homelab<--Cat6-->desktop_joey[Joey's Desktop];
switch_homelab<--Cat5-->desktop_bridget[Bridget's Desktop];
switch_homelab<--Cat6-->NAS;
NAS<--SFP+ DAC-->Desktop;
NAS<--SFP+ DAC-->Server;
switch_homelab<--Cat6-->Server;
switch_homelab<--Cat6-->Seedbox;
switch_homelab<--Cat5e-->Pihole;
Router<--Cat5e-->switch_basementtv[TP-Link 5-Port Switch for Basement TV];
switch_basementtv<--Cat6-->desktop_maddie[Maddie's Desktop];
switch_basementtv<--Cat5e-->client_tv_downstairs[Downstairs TV];
Router<--Cat6-->wap_basement[Ubiquiti Unifi U6-Lite];
wap_basement<--Wifi6 2.4/5GHz-->clients_wireless_basement[Basement Wireless Clients];
Router<--Cat6-->wap_upstairs[Ubiquiti Unifi UAP-AC-LR];
wap_upstairs<--Wifi5 2.4/5GHz-->clients_wireless_upstairs[Upstairs Wireless Clients];
Router<--Cat6-->desktop_mom[Mom's Desktop];
Router<--Cat6-->desktop_dad[Dad's Desktop];
Router<-->desktop_gus[Gus' Desktop];
```
## Booting the ONT
1. Unplug the 6-pin power plug. Wait 15 seconds.
2. Plug the power plug back in. Wait for the top three lights to be solid green.
## Booting the modem (Zyxel C3000Z)
1. Unplug the barrel power plug. Wait 15 seconds.
2. Plug the power plug back in. Wait for the "Power" and "WAN/LAN" lights to be solid green (the WAN/LAN light might flicker, that's okay. )
## Booting the Router (Ubiquiti EdgeRouter 10X)
1. Uplug the barrel power plug. Wait 15 seconds.
2. Plug the power plug back in. Wait for the indicator LED to be solid white.
## Booting the Server
1. Shut down most services: `for app in ~/homelab/server/config/*; do echo "===== SHUTTING DOWN $app =====" && cd $app && docker-compose down; done`
2. Shut down Minecraft servers: `cd ~/homelab/server/config/minecraft && for service in ./*.yml; do echo "===== SHUTTING DOWN $service =====" && docker-compose -f $service down; done`
3. Shut down the host: `sudo shutdown now`. Wait 30 seconds.
4. 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.
5. Check current running docker containers

View File

@ -3,7 +3,7 @@ services:
5etools:
container_name: 5etools
image: jafner/5etools-docker
restart: always
restart: "no"
volumes:
- $DOCKER_DATA/htdocs:/usr/local/apache2/htdocs
environment:

View File

@ -3,7 +3,7 @@ services:
joplin:
image: joplin/server:2.6-beta
container_name: joplin_server
restart: unless-stopped
restart: "no"
env_file:
- .env
depends_on:
@ -20,7 +20,7 @@ services:
joplin_db:
image: postgres:13.1
container_name: joplin_db
restart: unless-stopped
restart: "no"
env_file:
- .env
volumes:

View File

@ -3,7 +3,7 @@ services:
librespeed:
container_name: librespeed
image: adolfintel/speedtest
restart: always
restart: "no"
environment:
- TITLE=LibreSpeed@Jafner.tools
- TELEMETRY=true

View File

@ -3,7 +3,7 @@ services:
traefik:
container_name: traefik_traefik
image: traefik:latest
restart: always
restart: "no"
networks:
- web
ports:

View File

@ -3,7 +3,7 @@ services:
uptime-kuma:
image: louislam/uptime-kuma
container_name: uptime-kuma_uptime-kuma
restart: always
restart: "no"
volumes:
- $DOCKER_DATA/data:/app/data
networks:

View File

@ -3,7 +3,7 @@ services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden_vaultwarden
restart: unless-stopped
restart: "no"
env_file:
- .env
networks:

View File

@ -3,7 +3,7 @@ services:
xbackbone:
image: linuxserver/xbackbone
container_name: xbackbone_xbackbone
restart: unless-stopped
restart: "no"
environment:
- PUID=1000
- PGID=1000

View File

@ -70,7 +70,7 @@ services:
image:
container_name: <stack>_<service>
user: "1000:1000"
restart: unless-stopped
restart: "no"
environment:
PUID: ${PUID}
PGID: ${PGID}
@ -90,7 +90,7 @@ services:
image:
container_name: <service>_db
user: "1000:1000"
restart: unless-stopped
restart: "no"
networks:
- <service>
environment:

View File

@ -3,7 +3,7 @@ services:
xbackbone:
image: linuxserver/xbackbone
container_name: xbackbone_xbackbone
restart: unless-stopped
restart: "no"
environment:
- PUID=1000
- PGID=1000

View File

@ -4,7 +4,7 @@ services:
postgresql:
image: postgres:12-alpine
container_name: authentik_postgres
restart: unless-stopped
restart: "no"
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
start_period: 20s
@ -33,7 +33,7 @@ services:
timeout: 3s
networks:
- authentik
restart: unless-stopped
restart: "no"
server:
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.7.1}
@ -43,7 +43,7 @@ services:
web:
aliases:
- authentik-server
restart: unless-stopped
restart: "no"
command: server
environment:
AUTHENTIK_HOST: http://authentik-server:9000
@ -67,7 +67,7 @@ services:
worker:
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.1.3}
container_name: authentik_worker
restart: unless-stopped
restart: "no"
networks:
- authentik
command: worker

View File

@ -3,7 +3,7 @@ services:
cloudflare-ddns:
image: oznu/cloudflare-ddns
container_name: ddns_cloudflare-ddns
restart: unless-stopped
restart: "no"
environment:
- API_KEY=6wjPH5DND2dFjWIuNTq_TVL-VJS9czp5Wlq3_4ju
- ZONE=jafner.net

View File

@ -3,7 +3,7 @@ services:
gitlab:
image: 'gitlab/gitlab-ee:latest'
container_name: gitlab_gitlab
restart: unless-stopped
restart: "no"
hostname: 'gitlab.jafner.net'
networks:
- web
@ -85,7 +85,7 @@ services:
gitlab-runner-0:
image: 'gitlab/gitlab-runner:latest'
container_name: gitlab_runner_0
restart: always
restart: "no"
environment:
- GODEBUG="x509ignoreCN=0"
volumes:
@ -97,7 +97,7 @@ services:
gitlab-runner-1:
image: 'gitlab/gitlab-runner:latest'
container_name: gitlab_runner_1
restart: always
restart: "no"
environment:
- GODEBUG="x509ignoreCN=0"
volumes:

View File

@ -4,7 +4,7 @@ services:
landing:
image: wordpress
container_name: wordpress_landing
restart: always
restart: "no"
environment:
WORDPRESS_DB_HOST: landing_db
WORDPRESS_DB_USER: wordpress
@ -27,7 +27,7 @@ services:
landing_db:
image: mysql:5.7
container_name: wordpress_landing-db
restart: always
restart: "no"
networks:
- landing
environment:

View File

@ -3,7 +3,7 @@ services:
librespeed:
container_name: librespeed
image: adolfintel/speedtest
restart: always
restart: "no"
environment:
- TITLE=LibreSpeed@Jafner.net
- TELEMETRY=true

View File

@ -24,7 +24,7 @@ services:
- $DOCKER_DATA/bmcp:/data:rw
networks:
- mc-router
restart: always
restart: "no"
networks:
mc-router:
external: true

View File

@ -17,7 +17,7 @@ services:
- $DOCKER_DATA/e6:/data:rw
networks:
- mc-router
restart: always
restart: "no"
networks:
mc-router:
external: true

View File

@ -23,7 +23,7 @@ services:
- $DOCKER_DATA/fan:/data:rw
networks:
- mc-router
restart: always
restart: "no"
networks:
mc-router:
external: true

View File

@ -3,7 +3,7 @@ services:
router:
image: itzg/mc-router
container_name: minecraft_mc-router
restart: always
restart: "no"
networks:
- mc-router
ports:

View File

@ -3,7 +3,7 @@ services:
grafana:
image: grafana/grafana-oss:latest
container_name: monitoring_grafana
restart: unless-stopped
restart: "no"
networks:
- monitoring
- web
@ -28,7 +28,7 @@ services:
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ${DOCKER_DATA}/prometheus:/prometheus
restart: unless-stopped
restart: "no"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
labels:
@ -47,7 +47,7 @@ services:
volumes:
- ${DOCKER_DATA}/loki:/etc/loki
- ./loki-config.yml:/etc/loki/loki-config.yml # not sure if this works. If not, just edit the config within the data volume
restart: unless-stopped
restart: "no"
command: -config.file=/etc/loki/loki-config.yml
labels:
- traefik.http.routers.loki.rule=Host(`loki.jafner.net`)
@ -56,7 +56,7 @@ services:
pihole-jafner-net:
image: ekofr/pihole-exporter:latest
container_name: monitoring_prometheus-pihole-jafner-net
restart: unless-stopped
restart: "no"
networks:
- monitoring
environment:
@ -71,7 +71,7 @@ services:
image: itzg/mc-monitor # https://github.com/itzg/mc-monitor
container_name: monitoring_mc-monitor
command: export-for-prometheus
restart: unless-stopped
restart: "no"
networks:
- monitoring
- mc-router
@ -83,7 +83,7 @@ services:
plex-exporter:
image: granra/plex_exporter
container_name: monitoring_plex-exporter
restart: unless-stopped
restart: "no"
networks:
- monitoring
command:
@ -96,7 +96,7 @@ services:
sabnzbd_exporter:
image: msroest/sabnzbd_exporter # https://github.com/msroest/sabnzbd_exporter
container_name: monitoring_sabnzbd_exporter
restart: unless-stopped
restart: "no"
networks:
- monitoring
environment:

View File

@ -6,7 +6,7 @@ services:
user: 1000:1000
networks:
- web
restart: unless-stopped
restart: "no"
environment:
ND_BASEURL: ""
volumes:

View File

@ -4,7 +4,7 @@ services:
nvgm:
image: wordpress
container_name: wordpress_nvgm
restart: unless-stopped
restart: "no"
environment:
WORDPRESS_DB_HOST: nvgm_db
WORDPRESS_DB_USER: wordpress
@ -26,7 +26,7 @@ services:
nvgm_db:
image: mysql:5.7
container_name: wordpress_nvgm-db
restart: unless-stopped
restart: "no"
networks:
- nvgm
environment:

View File

@ -3,7 +3,7 @@ services:
portainer:
image: portainer/portainer-ce
container_name: portainer_portainer
restart: unless-stopped
restart: "no"
command: -H unix:///var/run/docker.sock
networks:
- web

View File

@ -4,7 +4,7 @@ services:
portfolio:
image: wordpress
container_name: wordpress_portfolio
restart: always
restart: "no"
environment:
WORDPRESS_DB_HOST: portfolio_db
WORDPRESS_DB_USER: wordpress
@ -26,7 +26,7 @@ services:
portfolio_db:
image: mysql:5.7
container_name: wordpress_portfolio-db
restart: always
restart: "no"
networks:
- portfolio
environment:

View File

@ -3,7 +3,7 @@ services:
send:
image: registry.gitlab.com/timvisee/send:latest
container_name: send_send
restart: always
restart: "no"
networks:
- send
- web
@ -30,7 +30,7 @@ services:
container_name: send_redis
networks:
- send
restart: always
restart: "no"
volumes:
- send-redis:/data

View File

@ -3,7 +3,7 @@ services:
sftp:
image: atmoz/sftp
container_name: sftp_sftp
restart: unless-stopped
restart: "no"
ports:
- 23450:22/tcp
volumes:

View File

@ -3,7 +3,7 @@ services:
stash:
container_name: stash
image: stashapp/stash:latest
restart: unless-stopped
restart: "no"
volumes:
- /etc/localtime:/etc/localtime:ro
- $METADATA_DIR/generated:/generated

View File

@ -4,7 +4,7 @@ services:
traefik:
image: traefik:latest
container_name: traefik_traefik
restart: unless-stopped
restart: "no"
networks:
- web
ports:

View File

@ -3,7 +3,7 @@ services:
unifi-controller:
image: lscr.io/linuxserver/unifi-controller
container_name: unifi_controller
restart: unless-stopped
restart: "no"
environment:
- PUID=1000
- PGID=1000

View File

@ -7,7 +7,7 @@ services:
uptime-kuma:
image: louislam/uptime-kuma
container_name: monitoring_uptime-kuma
restart: unless-stopped
restart: "no"
volumes:
- ${DOCKER_DATA}/data:/app/data
networks:

View File

@ -3,7 +3,7 @@ services:
wg-easy:
image: weejewel/wg-easy
container_name: wireguard_wg-easy
restart: unless-stopped
restart: "no"
env_file:
- .env
ports: