Add base Docker Compose projects under platform-infra/stacks, using the Phase 1 ZFS platform datasets and shared networks: - bootstrap-networks.sh: idempotent creation of shared `proxy` (edge) and `platform` (internal) Docker networks. - traefik: edge router with TLS/ACME (HTTP-01), global HTTP->HTTPS redirect, file-based security-headers/TLS middlewares, and a basic-auth dashboard. Docker access via a least-privilege tecnativa/docker-socket-proxy instead of mounting docker.sock directly. - mariadb: shared instance on tank/platform/mariadb, utf8mb4, tuned; not published to the host (internal `platform` network only). - forgejo: Git + container registry over HTTPS (SSH disabled to avoid extra inbound ports), SQLite backend, data on tank/platform/forgejo. Each stack ships a committed .env.example (real .env is git-ignored) and the stacks README documents bring-up order, secrets, and verification. Also add root CLAUDE.md so fresh sessions orient from files cheaply: philosophy, doc pointers, naming quick-ref, repo map, commands, agreements. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
12 lines
606 B
Bash
Executable file
12 lines
606 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Create the two shared Docker networks the platform relies on. Idempotent.
|
|
# proxy — edge network: Traefik <-> per-site web containers.
|
|
# platform — internal network: MariaDB, monitoring. `--internal` = no egress.
|
|
# Run once on the host after Phase 1, before bringing up the stacks.
|
|
set -euo pipefail
|
|
|
|
docker network inspect proxy >/dev/null 2>&1 || docker network create proxy
|
|
docker network inspect platform >/dev/null 2>&1 || docker network create --internal platform
|
|
|
|
echo "Shared networks ready:"
|
|
docker network ls --filter name='^proxy$' --filter name='^platform$'
|