No description
| desktop-crabfactory-mc | ||
| dockge | ||
| gateway | ||
| jcrm-admin-stack | ||
| ollama | ||
| open-webui | ||
| portainer | ||
| .gitignore | ||
| README.md | ||
| tools.yaml | ||
Crab Factory Swarm Infrastructure
Centralized Docker Swarm infrastructure management for crabfactory.net / home.arpa.
Directory Structure
All persistent infrastructure files are located in /opt/stacks/:
routing/: Traefik reverse proxy and global middlewares.portainer/: Standalone Portainer management stack.forgejo/: Forgejo Git server.swarm/: Shared data and configurations mounted via NFS (Pi-hole lists, Traefik static config)....other stacks...: Individual service stacks (n8n, kimai, etc).
Quick Reference
| Service | Local Domain | Internal Port | Stack |
|---|---|---|---|
| Traefik Dashboard | traefik.home.arpa |
8080 | routing |
| Pi-hole Admin | pihole.home.arpa |
80 | routing |
| Portainer | portainer.home.arpa |
9000 | portainer |
| Forgejo | git.home.arpa |
3000 | forgejo |
Core Infrastructure
1. Routing (Traefik)
Located in /opt/stacks/routing/.
Uses Docker Swarm Provider for dynamic service discovery and File Provider for global middlewares.
Shared Middlewares:
Defined in middleware.yml. Referenced in other stacks as local-only@file.
local-only: Restricted to LAN (192.168.2.0/24) and Swarm Ingress (10.0.0.0/8).secure-headers: Standard security headers.
2. DNS (Pi-hole)
Part of the routing stack. Processes all *.home.arpa queries.
- Host IP: 192.168.2.166
- Config:
/opt/stacks/swarm/pihole-data/etc-dnsmasq.d/02-lan.confhandles the.home.arpawildcard.
3. Management (Portainer)
Located in /opt/stacks/portainer/.
Pinned to the Manager Node with a local volume for database stability.
Deployment Workflow
- Edit the
compose.yamlordocker-compose.ymlin the respective stack directory. - If secrets are needed, ensure the
.envfile in the root is sourced. - Deploy/Update:
docker stack deploy -c /opt/stacks/<stack>/compose.yaml <stack_name>
Git Management
The /opt/stacks directory is a git repository.
- DO NOT commit
.envfiles (secrets). - DO NOT commit large data directories (already ignored in
.gitignore). - Only commit infrastructure definitions (Compose files, Traefik/Pi-hole configs).