Restructure into one folder per private repo/host, not a flat Docker/ dump

rocky-docker-lxc/, caddy-vm/, monitoring-vm/ (was missing entirely -
Grafana+Loki+Prometheus stack, refreshed and CA mount stripped same as
everything else), and automation/{ansible,automation-vm,iac}/ for the
three repos that live on the automation VM. Hawser is genuinely
deployed on all three of caddy-vm/monitoring-vm/automation-vm so it's
duplicated in each rather than picking one canonical home.

Old Ansible/ and "Infrastrucutre as Code/" content moved under
automation/ansible/old-playbooks and automation/iac/old-content as-is
for now - contents still need refreshing against the current repos and
a per-folder README, that's the next pass.
This commit is contained in:
thesabear committed 2026-07-06 02:41:53 +03:00
1 parent 08f705ffd7
commit c05c7164c8
146 files changed
+101 -84

No files matched your search

@@ -0,0 +1,48 @@
services:
gitea:
image: gitea/gitea:latest
container_name: gitea
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=gitea-db
- GITEA__database__PORT=5432
- GITEA__database__NAME=${POSTGRES_DB}
- GITEA__database__USER=${POSTGRES_USER}
- GITEA__database__PASSWD=${POSTGRES_PASSWORD}
- ROOT_URL=${GITEA_ROOT_URL}
- DOMAIN=${GITEA_DOMAIN}
- GITEA__migrations__ALLOW_LOCALNETWORKS=true
restart: always
volumes:
- /path/to/gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "${HTTP_PORT}:3000"
- "${SSH_PORT}:22"
depends_on:
- gitea-db
security_opt:
- no-new-privileges:true
networks:
- gitea-net
gitea-db:
image: postgres:latest
container_name: gitea-db
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- /path/to/gitea/postgres:/var/lib/postgresql
networks:
- gitea-net
networks:
gitea-net:
external: true
@@ -0,0 +1,19 @@
services:
hawser:
image: ghcr.io/finsys/hawser:latest
container_name: hawser
restart: unless-stopped
ports:
- "${HTTP_PORT}:2376"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /path/to/hawser/hawser_stacks:/data/stacks
environment:
- TOKEN=${TOKEN}
- TZ=${TZ}
networks:
- hawser-net
networks:
hawser-net:
external: true
@@ -0,0 +1,56 @@
services:
homeassistant:
container_name: home-assistant
image: ghcr.io/home-assistant/home-assistant:stable
volumes:
- /path/to/home-assistant/config:/config
- /etc/localtime:/etc/localtime:ro
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
restart: unless-stopped
ports:
- "${HTTP_PORT}:8123"
depends_on:
homeassistant-db:
condition: service_healthy
privileged: true
healthcheck:
test: [
"CMD-SHELL",
"curl -fsS -o /dev/null -w '%{http_code}' http://127.0.0.1:8123/api/
| grep -q 401",
]
interval: 30s
timeout: 10s
retries: 10
start_period: 90s
networks:
- home-assistant-net
homeassistant-db:
container_name: homeassistant-db
image: postgres:latest
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --locale=en_US.UTF-8
volumes:
- /path/to/home-assistant/schemas:/var/lib/postgresql
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
networks:
- home-assistant-net
networks:
home-assistant-net:
external: true
@@ -0,0 +1,75 @@
services:
postgres:
image: postgres:18
container_name: kestra-postgres
volumes:
- /path/to/kestra/postgres-data:/var/lib/postgresql
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 30s
timeout: 10s
retries: 10
networks:
- kestra-net
kestra:
image: kestra/kestra:latest
container_name: kestra
pull_policy: always
# Kestra, by default, has a termination grace period of 5m. We need to wait a little more to be sure no active tasks are running.
stop_grace_period: 6m
# Note that this setup with a root user is intended for development purpose.
# Our base image runs without root, but the Docker Compose implementation needs root to access the Docker socket
user: "root"
restart: unless-stopped
command: server standalone
volumes:
- /path/to/kestra/kestra-data:/app/storage
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/kestra-wd:/tmp/kestra-wd
# Mounted read-only so Kestra flows can drive the ansible repo directly
- /path/to/repos/ansible:/opt/repos/ansible:ro
- /path/to/ansible-venv:/home/user/ansible-venv:ro
- /path/to/ssh-keys:/home/user/.ssh:ro
environment:
KESTRA_CONFIGURATION: |
datasources:
postgres:
url: jdbc:postgresql://postgres:5432/kestra
driverClassName: org.postgresql.Driver
username: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}
kestra:
server:
basic-auth:
username: ${USERNAME}
password: ${PASSWORD}
repository:
type: postgres
storage:
type: local
local:
base-path: "/app/storage"
queue:
type: postgres
tasks:
tmp-dir:
path: /tmp/kestra-wd/tmp
url: http://localhost:8080/
ports:
- "${HTTP_PORT}:8080"
- "8081:8081"
depends_on:
postgres:
condition: service_started
networks:
- kestra-net
networks:
kestra-net:
external: true
@@ -0,0 +1,19 @@
services:
mosquitto:
image: eclipse-mosquitto:latest
container_name: mosquitto
restart: unless-stopped
ports:
- "${HTTP_PORT}:1883"
volumes:
- /path/to/mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
- /path/to/mosquitto/config/passwords:/mosquitto/config/passwords:ro
- /path/to/mosquitto/config/acl:/mosquitto/config/acl:ro
- /path/to/mosquitto/data:/mosquitto/data
- /path/to/mosquitto/log:/mosquitto/log
networks:
- notifier-net
networks:
notifier-net:
external: true
@@ -0,0 +1,64 @@
services:
n8n:
image: n8nio/n8n:latest
container_name: n8n
restart: unless-stopped
security_opt:
- no-new-privileges:true
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- GENERIC_TIMEZONE=${TZ}
- N8N_HOST=${N8N_HOST}
- N8N_PORT=${N8N_PORT}
- N8N_PROTOCOL=https
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=${N8N_POSTGRES_PASSWORD}
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=${N8N_USER}
- N8N_BASIC_AUTH_PASSWORD=${N8N_BASIC_AUTH_PASSWORD}
- WEBHOOK_URL=https://${N8N_HOST}
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
volumes:
- /path/to/n8n/data:/home/node/
ports:
- ${N8N_PORT}:5678
depends_on:
- postgres
networks:
- n8n-net
postgres:
image: postgres:latest
container_name: n8n-postgres
restart: unless-stopped
security_opt:
- no-new-privileges:true
environment:
POSTGRES_USER: n8n
POSTGRES_PASSWORD: ${N8N_POSTGRES_PASSWORD}
POSTGRES_DB: n8n
volumes:
- /path/to/n8n/postgres_data:/var/lib/postgresql
ports:
- "127.0.0.1:${POSTGRES_PORT}:5432"
networks:
- n8n-net
adminer:
image: adminer:latest
container_name: adminer
restart: unless-stopped
ports:
- "127.0.0.1:${ADMINER_PORT}:8080"
networks:
- n8n-net
networks:
n8n-net:
external: true
@@ -0,0 +1,112 @@
services:
postgres:
image: postgres:17-alpine
container_name: netbox-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- /path/to/netbox/postgres_data:/var/lib/postgresql/data
healthcheck:
test: pg_isready -q -t 2 -d $$POSTGRES_DB -U $$POSTGRES_USER
start_period: 20s
timeout: 30s
interval: 10s
retries: 5
networks:
- netbox-net
redis:
image: valkey/valkey:9.0-alpine
container_name: netbox-redis
restart: unless-stopped
command:
- sh
- -c
- valkey-server --appendonly yes --requirepass $$REDIS_PASSWORD
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
volumes:
- /path/to/netbox/redis_data:/data
networks:
- netbox-net
redis-cache:
image: valkey/valkey:9.0-alpine
container_name: netbox-redis-cache
restart: unless-stopped
command:
- sh
- -c
- valkey-server --requirepass $$REDIS_PASSWORD
environment:
REDIS_PASSWORD: ${REDIS_CACHE_PASSWORD}
volumes:
- /path/to/netbox/redis_cache:/data
networks:
- netbox-net
netbox: &netbox
image: netboxcommunity/netbox:latest
container_name: netbox
user: "netbox:root"
restart: unless-stopped
depends_on:
- postgres
- redis
- redis-cache
env_file: .env
ports:
- ${HTTP_PORT}:8080
environment:
SECRET_KEY: ${NETBOX_SECRET_KEY}
DB_NAME: ${POSTGRES_DB}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_HOST: postgres
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_DATABASE: 0
REDIS_CACHE_HOST: redis-cache
REDIS_CACHE_PORT: 6379
REDIS_CACHE_PASSWORD: ${REDIS_CACHE_PASSWORD}
REDIS_CACHE_DATABASE: 1
SUPERUSER_NAME: ${SUPERUSER_NAME}
SUPERUSER_PASSWORD: ${SUPERUSER_PASSWORD}
SUPERUSER_EMAIL: ${SUPERUSER_EMAIL}
volumes:
- /path/to/netbox/netbox_media:/opt/netbox/netbox/media
- /path/to/netbox/netbox_reports:/opt/netbox/netbox/reports
- /path/to/netbox/netbox_scripts:/opt/netbox/netbox/scripts
- ./configuration/extra.py:/etc/netbox/config/extra.py:ro
healthcheck:
test: curl -f http://localhost:8080/login/ || exit 1
start_period: 90s
timeout: 3s
interval: 15s
networks:
- netbox-net
netbox-worker:
<<: *netbox
container_name: netbox-worker
ports: []
depends_on:
netbox:
condition: service_healthy
command:
- /opt/netbox/venv/bin/python
- /opt/netbox/netbox/manage.py
- rqworker
healthcheck:
test: ps -aux | grep -v grep | grep -q rqworker || exit 1
start_period: 20s
timeout: 3s
interval: 15s
networks:
netbox-net:
external: true
@@ -0,0 +1,19 @@
services:
nodered:
image: nodered/node-red:latest
container_name: nodered
restart: unless-stopped
environment:
- TZ=${TZ}
- PUID=${PUID}
- PGID=${PGID}
ports:
- "${HTTP_PORT}:1880"
volumes:
- /path/to/nodered_data:/data
networks:
- notifier-net
networks:
notifier-net:
external: true