Files
Flight-Ops/docker-compose.ci.yml
T

41 lines
1.9 KiB
YAML

# Isolated e2e stack for CI (.gitea/workflows/ci.yml) — runs on the runner's shared dind
# daemon under project name flight-ci (distinct from production). Joins the external
# network flight-ci-e2e that the workflow attaches the job container to; the app is reached
# at its STATIC IP http://172.39.0.10:3000 — DNS bypassed for the browser because Chromium
# got ERR_SSL_PROTOCOL_ERROR via the hostname while node-side HTTP worked (the `app` alias
# stays as a convenience). Single deterministic address; survives `docker compose restart flight`.
# The build context is tarred by the compose client in the job and sent over DOCKER_HOST,
# so nothing here needs to be visible from inside dind; game state lives in a named volume
# (fresh per run — CI cleanup removes it — survives `docker compose restart flight` for
# e2e/state.spec.ts).
services:
flight:
build: .
image: flight-ops-ci
environment:
FLIGHT_TEST_HOOKS: "1"
# v0.65.0: shorten the pool refill cooldowns to seconds so e2e can watch taken slots come back;
# the job LIFETIME stays at its 1 h default on purpose — state.spec.ts restarts the container
# mid-suite and must not race a whole board expiring (the expire-package hook ages jobs instead).
FLIGHT_JOB_REFILL_MS: "5000"
FLIGHT_JOB_SMALL_REFILL_MS: "2000"
volumes:
# Self-hosted map-asset pack (styles/fonts/sprites): the workflow downloads it into ./public
# before build; absent/empty → app falls back to remote OFM styles. Mirrors docker-compose.yml's
# mount so e2e runs in self-hosted mode like local dev (map tests abort openfreemap.org traffic).
- "./public:/app/public"
- flight-db:/app/db
networks:
flight-ci-e2e:
aliases:
- app
ipv4_address: 172.39.0.10
networks:
flight-ci-e2e:
name: flight-ci-e2e
external: true
volumes:
flight-db: