mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-07 03:15:56 +00:00
- Add reusable build-ci-images workflow to build and push ci-<sha> images for all distros - Make all deploy test workflows use prebuilt CI images (no local rebuilds) - Replace ci-version workflow with release workflow - Retag ci images to <version> and latest on tag push (no rebuild) - Move stable git tag only if all analyses/tests succeed and version is highest - Make compose image/pull policy configurable via env https://chatgpt.com/share/69662869-ee1c-800f-9e6c-bbbf47284fad
116 lines
3.0 KiB
YAML
116 lines
3.0 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}
|
|
image: "${INFINITO_IMAGE:-infinito-${INFINITO_DISTRO:-arch}}"
|
|
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
|
|
cgroup: host
|
|
tmpfs:
|
|
- /run
|
|
- /run/lock
|
|
|
|
# Helpful for interactive debugging
|
|
tty: true
|
|
stdin_open: true
|
|
|
|
container_name: infinito_nexus_${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}
|