mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-10 12:47:04 +00:00
scripts/docker/entry.sh's two compile-control reads (INFINITO_COMPILE
and INFINITO_COMPILE_SILENCE) crashed during Dockerfile RUN because
that context has no env-pipeline: env/default.env exists in the repo
but no make/BASH_ENV/load.sh chain materialises it into the running
shell. The bare reads under `set -u` triggered unbound-variable exit
even though the keys were registered in default.env + passthrough.
Move build/silence control from env to script flags so entry.sh is
self-contained at bootstrap time. Each flag now triggers its action
directly inside the parse loop -- no COMPILE/SILENCE state vars:
--compile -> run_local_build (streaming)
--compile-silent -> run_local_build >/dev/null 2>&1
-- -> end flag parsing, rest is the exec target
Drop INFINITO_COMPILE + INFINITO_COMPILE_SILENCE from the whole
registry surface: env/default.env, passthrough.STATIC_KEYS, the
infinito_compile handler (gone entirely), compose.yml's env
injection block, the dotenv-generator baseline test, the
build_env unit-test fixture, and the now-no-op `-e INFINITO_COMPILE=0`
in test-install-{make,pkgmgr} workflows.
Dockerfile RUN switches to `entry.sh --compile -- true`; runtime
ENTRYPOINT receives no flags so the default (no-compile) holds and
exec hands off to systemd via the CMD.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
121 lines
4.8 KiB
YAML
121 lines
4.8 KiB
YAML
---
|
|
x-ci-defaults: &ci_defaults
|
|
dns:
|
|
- ${INFINITO_DNS_IP}
|
|
dns_opt:
|
|
- ndots:1
|
|
|
|
# Bare CI/runtime stack. Cache layers in via compose/cache.override.yml.
|
|
|
|
services:
|
|
coredns:
|
|
image: coredns/coredns:1.14.3
|
|
container_name: infinito-coredns
|
|
profiles: ["ci"]
|
|
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
|
|
network: host
|
|
args:
|
|
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
|
|
|
|
# systemd needs the host cgroup namespace.
|
|
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"
|
|
profiles: ["ci"]
|
|
# Defaults of 0 map to "unlimited" in dockerd.
|
|
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
|
|
- .:/opt/src/infinito
|
|
- ${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:/var/lib/infinito/
|
|
- letsencrypt:/etc/letsencrypt/
|
|
|
|
environment:
|
|
INFINITO_DNS_IP: ${INFINITO_DNS_IP}
|
|
INFINITO_DOMAIN: ${INFINITO_DOMAIN}
|
|
INFINITO_IP4: ${INFINITO_IP4}
|
|
INFINITO_SRC_DIR: /opt/src/infinito
|
|
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}
|
|
gateway: ${INFINITO_GATEWAY:?Run 'make dotenv' to generate the .env single source of truth}
|