No description
Find a file
2026-01-19 20:47:27 -05:00
desktop-crabfactory-mc chore: include missing .env and config files in helios-docker 2026-01-19 18:24:15 -05:00
dockge chore: unify agent network and fix local portainer configuration 2026-01-19 20:47:27 -05:00
gateway chore: include missing .env and config files in helios-docker 2026-01-19 18:24:15 -05:00
jcrm-admin-stack chore: include missing .env and config files in helios-docker 2026-01-19 18:24:15 -05:00
ollama chore: include missing .env and config files in helios-docker 2026-01-19 18:24:15 -05:00
open-webui chore: include missing .env and config files in helios-docker 2026-01-19 18:24:15 -05:00
portainer chore: unify agent network and fix local portainer configuration 2026-01-19 20:47:27 -05:00
.gitignore chore: push all stack configurations now that app data is moved 2026-01-19 18:24:45 -05:00
README.md chore: consolidated stack configurations and removed binary bloat 2026-01-19 18:23:08 -05:00
tools.yaml chore: consolidated stack configurations and removed binary bloat 2026-01-19 18:23:08 -05:00

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.conf handles the .home.arpa wildcard.

3. Management (Portainer)

Located in /opt/stacks/portainer/. Pinned to the Manager Node with a local volume for database stability.

Deployment Workflow

  1. Edit the compose.yaml or docker-compose.yml in the respective stack directory.
  2. If secrets are needed, ensure the .env file in the root is sourced.
  3. 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 .env files (secrets).
  • DO NOT commit large data directories (already ignored in .gitignore).
  • Only commit infrastructure definitions (Compose files, Traefik/Pi-hole configs).