fix(ci): split infra vs app services to prevent redis name conflict
CI/CD / CI · API (dotnet build + test) (push) Successful in 43s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 31s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m4s
CI/CD / CI · Admin Web (tsc) (push) Successful in 35s
CI/CD / CI · Website (tsc) (push) Successful in 44s
CI/CD / CI · Koja (tsc) (push) Successful in 49s
CI/CD / Deploy · all services (push) Failing after 10s
CI/CD / CI · API (dotnet build + test) (push) Successful in 43s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 31s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m4s
CI/CD / CI · Admin Web (tsc) (push) Successful in 35s
CI/CD / CI · Website (tsc) (push) Successful in 44s
CI/CD / CI · Koja (tsc) (push) Successful in 49s
CI/CD / Deploy · all services (push) Failing after 10s
docker compose up without --no-recreate tries to recreate postgres/redis when it detects a config change or finds a stopped container, which causes "container name already in use" when the container is still running. Fix: infrastructure (postgres, redis) uses --no-recreate so a healthy container is never touched. App services (api, web, website, koja, admin-api, admin-web) use --force-recreate so freshly-built images are always applied. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -310,19 +310,33 @@ jobs:
|
|||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
COMPOSE_DOCKER_CLI_BUILD: 1
|
COMPOSE_DOCKER_CLI_BUILD: 1
|
||||||
|
|
||||||
- name: Start main services
|
- name: Start infrastructure services (postgres, redis)
|
||||||
|
# --no-recreate: never touch a container that is already running.
|
||||||
|
# Prevents the "container name already in use" conflict when redis/postgres
|
||||||
|
# are healthy from a previous deploy.
|
||||||
run: |
|
run: |
|
||||||
docker compose up -d \
|
docker compose up -d \
|
||||||
--no-deps \
|
--no-deps \
|
||||||
postgres redis api web website koja
|
--no-recreate \
|
||||||
|
postgres redis
|
||||||
|
|
||||||
- name: Start admin services
|
- name: Deploy main app services
|
||||||
|
# --force-recreate: always swap in the freshly-built images.
|
||||||
|
# --no-deps: infra is already handled above; don't touch postgres/redis.
|
||||||
|
run: |
|
||||||
|
docker compose up -d \
|
||||||
|
--no-deps \
|
||||||
|
--force-recreate \
|
||||||
|
api web website koja
|
||||||
|
|
||||||
|
- name: Deploy admin services
|
||||||
run: |
|
run: |
|
||||||
docker compose \
|
docker compose \
|
||||||
-f docker-compose.yml \
|
-f docker-compose.yml \
|
||||||
-f docker-compose.admin.yml \
|
-f docker-compose.admin.yml \
|
||||||
up -d \
|
up -d \
|
||||||
--no-deps \
|
--no-deps \
|
||||||
|
--force-recreate \
|
||||||
admin-api admin-web
|
admin-api admin-web
|
||||||
|
|
||||||
- name: Wait for main API healthy
|
- name: Wait for main API healthy
|
||||||
|
|||||||
Reference in New Issue
Block a user