Files
computer-playbook/compose.yml
T
kevinveenbirkenbachandClaude Opus 4.7 64617514ac Add OOM reproduction knobs to compose.yml with SPOT docs
Expose INFINITO_MEM_LIMIT/INFINITO_MEMSWAP_LIMIT/INFINITO_CPUS on the
infinito service so operators can cap local runs to GitHub-hosted runner
specs and reproduce OOM failures like #162. Document the compose.yml as
a dev/CI-only artefact under docs/contributing/artefact/files/ and link
to it from the CI debugging guide.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 02:38:54 +02:00

137 lines
3.9 KiB
YAML

# CI profile defaults: point containers to CoreDNS and set search domain
x-ci-defaults: &ci_defaults
dns:
- ${DNS_IP}
dns_opt:
- ndots:1
services:
# ------------------------------------------------------------
# CoreDNS (CI only)
# ------------------------------------------------------------
coredns:
image: coredns/coredns:1.14.2
container_name: infinito-coredns
profiles: ["ci"]
command: ["-conf", "/Corefile"]
volumes:
- ./compose/Corefile:/Corefile:ro
networks:
default:
ipv4_address: ${DNS_IP}
# ------------------------------------------------------------
# Infinito runner container (systemd-enabled for CI)
# ------------------------------------------------------------
infinito:
networks:
default:
ipv4_address: ${IP4}
build:
context: .
dockerfile: Dockerfile
network: host
args:
NIX_CONFIG: ${NIX_CONFIG}
image: "${INFINITO_IMAGE}"
pull_policy: "${INFINITO_PULL_POLICY:-never}"
depends_on:
- coredns
# Run systemd as PID 1
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 inside docker needs access to the host cgroup namespace
privileged: true
# The following lines exist for documentation puporses;
# It could be that IPv6 behaves flaky in this case it may makes sense to deactivate IPv6
#sysctls:
# net.ipv6.conf.all.disable_ipv6: 1
# net.ipv6.conf.default.disable_ipv6: 1
# net.ipv6.conf.lo.disable_ipv6: 1
cgroup: host
tmpfs:
- /run
- /run/lock
# Helpful for interactive debugging
tty: true
stdin_open: true
container_name: infinito_nexus_${INFINITO_DISTRO:-debian}
restart: "no"
profiles: ["ci"]
# Resource caps for reproducing OOM/OOM-kill scenarios locally (e.g. issue #162
# web-app-peertube plugin install rc=137). Defaults of 0 map to "unlimited"
# in the Docker engine, so leaving these env vars unset behaves as if the
# keys were omitted.
mem_limit: ${INFINITO_MEM_LIMIT:-0}
memswap_limit: ${INFINITO_MEMSWAP_LIMIT:-0}
cpus: ${INFINITO_CPUS:-0}
<<: *ci_defaults
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- .:/opt/src/infinito
- ${INFINITO_DOCKER_VOLUME:-docker}:${INFINITO_DOCKER_MOUNT:-/var/lib/docker}
- infinito:/var/lib/infinito/
- letsencrypt:/etc/letsencrypt/
environment:
DNS_IP: ${DNS_IP}
DOMAIN: ${DOMAIN}
IP4: ${IP4}
INFINITO_COMPILE: "${INFINITO_COMPILE:-1}"
INFINITO_SRC_DIR: /opt/src/infinito
PYTHONHTTPSVERIFY: "1"
GIT_SSL_NO_VERIFY: "0"
ports:
- "${BIND_IP:-127.0.0.1}:25:25"
- "${BIND_IP:-127.0.0.1}:110:110"
- "${BIND_IP:-127.0.0.1}:143:143"
- "${BIND_IP:-127.0.0.1}:465:465"
- "${BIND_IP:-127.0.0.1}:587:587"
- "${BIND_IP:-127.0.0.1}:993:993"
- "${BIND_IP:-127.0.0.1}:995:995"
- "${BIND_IP:-127.0.0.1}:4190:4190"
- "${BIND_IP:-127.0.0.1}:80:80"
- "${BIND_IP:-127.0.0.1}:443:443"
- "${BIND_IP:-127.0.0.1}:8448:8448"
- "${BIND_IP:-127.0.0.1}:3478-3480:3478-3480/udp"
- "${BIND_IP:-127.0.0.1}:3478-3480:3478-3480"
- "${BIND_IP:-127.0.0.1}:1935:1935"
- "${BIND_IP:-127.0.0.1}:2201:2201"
- "${BIND_IP:-127.0.0.1}:2202:2202"
- "${BIND_IP:-127.0.0.1}:2203:22"
- "${BIND_IP:-127.0.0.1}:33552:33552"
- "${BIND_IP:-127.0.0.1}:48081-48083:48081-48083"
- "${BIND_IP:-127.0.0.1}:48087:48087"
volumes:
# Fallback docker volume for local deploy, GitHub runner uses mount
docker:
infinito:
letsencrypt:
networks:
default:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: "${INFINITO_OUTER_NETWORK_MTU:-1500}"
ipam:
config:
- subnet: ${SUBNET:-172.30.0.0/24}
gateway: ${GATEWAY:-172.30.0.1}