Avoid CI Docker subnet exhaustion for the dependency stack.
CI / backend (push) Failing after 3m16s
CI / frontend (push) Canceled after 8m4s

Reuse the host bridge network in a CI compose override, prune unused networks, and isolate the job under COMPOSE_PROJECT_NAME=vigilcare-ci.
This commit is contained in:
2026-10-06 17:40:33 +08:00
parent d320a53bb7
commit 1124c1f079
5 changed files with 54 additions and 42 deletions
+10 -2
View File
@@ -15,6 +15,11 @@ on:
jobs:
backend:
runs-on: ubuntu-latest
# Isolated compose project + CI override (docker-compose.ci.yml) so jobs do
# not steal Docker address-pool subnets from each other / from prod.
env:
COMPOSE_PROJECT_NAME: vigilcare-ci
COMPOSE_FILE: docker-compose.yml:docker-compose.ci.yml
# act_runner's docker executor runs steps inside their own job container — a
# sibling of the "docker compose" containers below — so "localhost" from inside
# the job container is NOT the Docker host and can't reach the published
@@ -31,7 +36,10 @@ jobs:
- uses: actions/checkout@v4
- name: Start dependency stack
run: docker compose up -d postgres redis minio
run: |
docker network prune -f || true
docker compose down --remove-orphans -v || true
docker compose up -d --remove-orphans postgres redis minio
- name: Wait for Postgres
run: |
@@ -91,7 +99,7 @@ jobs:
- name: Tear down stack
if: always()
run: docker compose down -v
run: docker compose down --remove-orphans -v
frontend:
runs-on: ubuntu-latest