mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
compose/cache.shared.override.yml attaches every worktree stack's
infinito service to the primary's network (infinito-nexus-core_default,
172.30.0.0/24) without an ipv4_address. The default network declared
no ip_range, so Docker IPAM handed out the lowest free address and the
worktree stacks took 172.30.0.2, .3, .8, .9 and, whenever the primary
container was down, .10, the primary's INFINITO_IP4. The primary's
`make compose-up` then failed with "Address already in use", and with
it `make quality-high` on main.
The default network now declares ip_range: ${INFINITO_IP_RANGE}, the
upper half of INFINITO_SUBNET. Every static address of the stack (.1,
.4 to .6, .10, .53) sits in the lower half, so a container without a
static address can no longer take one.
INFINITO_IP_RANGE is derived from the final INFINITO_SUBNET after
custom.env is applied, because a worktree pins its subnet there and
`make dotenv-force` regenerates without it in the environment. Existing
worktrees therefore get their own slot's range without a new pin.
A lint checks that every static IP in default.env and every
172.30.${slot}.N pin in scripts/system/worktree/up.sh lies below the
pool.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
137 lines
6.5 KiB
YAML
137 lines
6.5 KiB
YAML
---
|
|
x-ci-defaults: &ci_defaults
|
|
dns:
|
|
- ${INFINITO_DNS_IP}
|
|
dns_opt:
|
|
- ndots:1
|
|
|
|
services:
|
|
coredns:
|
|
image: coredns/coredns:1.14.4
|
|
container_name: ${INFINITO_RUNNER_PREFIX:?Run 'make dotenv' to generate the .env single source of truth}-coredns
|
|
command: ["-conf", "/Corefile"]
|
|
volumes:
|
|
- ./compose/coredns/Corefile:/Corefile:ro
|
|
networks:
|
|
default:
|
|
ipv4_address: ${INFINITO_DNS_IP}
|
|
|
|
infinito:
|
|
networks:
|
|
default:
|
|
ipv4_address: ${INFINITO_IP4}
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
INFINITO_PARENT_IMAGE: ${INFINITO_PARENT_IMAGE:?Run 'make dotenv' to generate the .env single source of truth}
|
|
INFINITO_SRC_DIR: ${INFINITO_SRC_DIR:?Run 'make dotenv' to generate the .env single source of truth}
|
|
INFINITO_PACKAGE_INSTALL_SCRIPT: ${INFINITO_PACKAGE_INSTALL_SCRIPT:?Run 'make dotenv' to generate the .env single source of truth}
|
|
INFINITO_PYTHON_INSTALL_SCRIPT: ${INFINITO_PYTHON_INSTALL_SCRIPT:?Run 'make dotenv' to generate the .env single source of truth}
|
|
INFINITO_DOCKER_CLI_INSTALL_SCRIPT: ${INFINITO_DOCKER_CLI_INSTALL_SCRIPT:?Run 'make dotenv' to generate the .env single source of truth}
|
|
INFINITO_VENV_DIR: ${INFINITO_VENV_DIR:?Run 'make dotenv' to generate the .env single source of truth}
|
|
NIX_CONFIG: ${NIX_CONFIG}
|
|
image: "${INFINITO_IMAGE}"
|
|
pull_policy: "${INFINITO_PULL_POLICY:?Run 'make dotenv' to generate the .env single source of truth}"
|
|
depends_on:
|
|
coredns:
|
|
condition: service_started
|
|
|
|
command:
|
|
- /sbin/init
|
|
- systemd.log_target=console
|
|
- systemd.log_level=debug
|
|
- systemd.journald.forward_to_console=1
|
|
- systemd.journald.max_level_console=debug
|
|
|
|
stop_signal: SIGRTMIN+3
|
|
|
|
privileged: true
|
|
cgroup: host
|
|
tmpfs:
|
|
- /run
|
|
- /run/lock
|
|
|
|
tty: true
|
|
stdin_open: true
|
|
|
|
container_name: ${INFINITO_CONTAINER:?Run 'make dotenv' to generate the .env single source of truth}
|
|
restart: "no"
|
|
mem_limit: ${INFINITO_MEM_LIMIT:?Run 'make dotenv' to generate the .env single source of truth}
|
|
memswap_limit: ${INFINITO_MEMSWAP_LIMIT:?Run 'make dotenv' to generate the .env single source of truth}
|
|
cpus: ${INFINITO_CPUS:?Run 'make dotenv' to generate the .env single source of truth}
|
|
<<: *ci_defaults
|
|
volumes:
|
|
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
|
- .:${INFINITO_SRC_DIR}
|
|
- ${INFINITO_DOCKER_VOLUME:?Run 'make dotenv' to generate the .env single source of truth}:${INFINITO_DOCKER_MOUNT:?Run 'make dotenv' to generate the .env
|
|
single source of truth}
|
|
- infinito:${INFINITO_DIR_VAR_LIB:?Run 'make dotenv' to generate the .env single source of truth}/
|
|
- letsencrypt:/etc/letsencrypt/
|
|
|
|
environment:
|
|
INFINITO_API_ANTHROPIC_KEY: ${INFINITO_API_ANTHROPIC_KEY}
|
|
INFINITO_API_OPENAI_KEY: ${INFINITO_API_OPENAI_KEY}
|
|
INFINITO_API_OPENROUTER_KEY: ${INFINITO_API_OPENROUTER_KEY}
|
|
INFINITO_BUILDKIT_ENABLED: ${INFINITO_BUILDKIT_ENABLED}
|
|
INFINITO_CONTAINER_CA_ENABLED: ${INFINITO_CONTAINER_CA_ENABLED}
|
|
INFINITO_DIR_VAR_LIB: ${INFINITO_DIR_VAR_LIB}
|
|
INFINITO_DNS_IP: ${INFINITO_DNS_IP}
|
|
INFINITO_DOMAIN: ${INFINITO_DOMAIN}
|
|
INFINITO_DOTENV_HOST_OWNED: "true"
|
|
INFINITO_GHCR_MIRROR_PREFIX: ${INFINITO_GHCR_MIRROR_PREFIX}
|
|
INFINITO_IMAGE_TAG: ${INFINITO_IMAGE_TAG}
|
|
INFINITO_IP4: ${INFINITO_IP4}
|
|
INFINITO_IP6: ${INFINITO_IP6}
|
|
INFINITO_MAIL_PRODUCTION_HOST: ${INFINITO_MAIL_PRODUCTION_HOST}
|
|
INFINITO_MAIL_PRODUCTION_RESOLVER: ${INFINITO_MAIL_PRODUCTION_RESOLVER}
|
|
INFINITO_PLAYWRIGHT_KEEP: ${INFINITO_PLAYWRIGHT_KEEP}
|
|
INFINITO_PLAYWRIGHT_REPORTS_BASE_DIR: ${INFINITO_PLAYWRIGHT_REPORTS_BASE_DIR}
|
|
INFINITO_SRC_DIR: ${INFINITO_SRC_DIR}
|
|
INFINITO_SWARM_MGR_IP: ${INFINITO_SWARM_MGR_IP}
|
|
INFINITO_TOR_SOCKS_PORT: ${INFINITO_TOR_SOCKS_PORT}
|
|
PYTHONHTTPSVERIFY: "1"
|
|
GIT_SSL_NO_VERIFY: "0"
|
|
|
|
ports:
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:25:25"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:110:110"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:143:143"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:465:465"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:587:587"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:993:993"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:995:995"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:4190:4190"
|
|
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:80:80"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:443:443"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:8448:8448"
|
|
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:3478-3480:3478-3480/udp"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:3478-3480:3478-3480"
|
|
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:1935:1935"
|
|
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:2201:2201"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:2202:2202"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:2203:22"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:33552:33552"
|
|
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:48081-48083:48081-48083"
|
|
- "${INFINITO_BIND_IP:?Run 'make dotenv' to generate the .env single source of truth}:48087:48087"
|
|
|
|
volumes:
|
|
docker:
|
|
infinito:
|
|
letsencrypt:
|
|
networks:
|
|
default:
|
|
driver: bridge
|
|
driver_opts:
|
|
com.docker.network.driver.mtu: "${INFINITO_OUTER_NETWORK_MTU:?Run 'make dotenv' to generate the .env single source of truth}"
|
|
ipam:
|
|
config:
|
|
- subnet: ${INFINITO_SUBNET:?Run 'make dotenv' to generate the .env single source of truth}
|
|
ip_range: ${INFINITO_IP_RANGE:?Run 'make dotenv' to generate the .env single source of truth}
|
|
gateway: ${INFINITO_GATEWAY:?Run 'make dotenv' to generate the .env single source of truth}
|