Files
computer-playbook/docker-compose.yml
T
kevinveenbirkenbach f3fa8d7680 fix(ci): avoid git ownership issues by syncing source as root
- Replace clean-container with compose down for predictable teardown
- Add explicit up/down targets to Makefile
- Sync bind-mounted source into internal repo using rsync --chown=root:root
- Prevent git dubious ownership errors in CI containers running as root

https://chatgpt.com/share/695d7045-a1f8-800f-83d0-f5872d85cfcf
2026-01-06 21:27:43 +01:00

116 lines
2.9 KiB
YAML

# CI profile defaults: point containers to CoreDNS and set search domain
x-ci-defaults: &ci_defaults
dns:
- 172.30.0.53
dns_opt:
- ndots:1
services:
# ------------------------------------------------------------
# CoreDNS (CI only)
# ------------------------------------------------------------
coredns:
image: coredns/coredns:1.11.1
container_name: infinito-coredns
profiles: ["ci"]
command: ["-conf", "/Corefile"]
volumes:
- ./compose/Corefile:/Corefile:ro
networks:
default:
ipv4_address: 172.30.0.53
# ------------------------------------------------------------
# Infinito runner container (systemd-enabled for CI)
# ------------------------------------------------------------
infinito:
build:
context: .
dockerfile: Dockerfile
network: host
args:
NIX_CONFIG: ${NIX_CONFIG}
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
cgroup: host
tmpfs:
- /run
- /run/lock
# Helpful for interactive debugging
tty: true
stdin_open: true
container_name: infinito_nexus_${INFINITO_DISTRO:-arch}
image: "infinito-${INFINITO_DISTRO:-arch}"
restart: "no"
profiles: ["ci"]
<<: *ci_defaults
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- .:/opt/src/infinito
- docker:/var/lib/docker/volumes/
- infinito:/var/lib/infinito/
- letsencrypt:/etc/letsencrypt/
environment:
INSTALL_LOCAL_BUILD: "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:
docker:
infinito:
letsencrypt:
networks:
default:
driver: bridge
ipam:
config:
- subnet: ${SUBNET:-172.30.0.0/24}
gateway: ${GATEWAY:-172.30.0.1}