# 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.11.1 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:-infinito-${INFINITO_DISTRO:-debian}}" 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"] <<: *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 ipam: config: - subnet: ${SUBNET:-172.30.0.0/24} gateway: ${GATEWAY:-172.30.0.1}