fix(ci): never touch postgres/redis in deploy — app containers only
CI/CD / CI · API (dotnet build + test) (push) Successful in 54s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 45s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m3s
CI/CD / CI · Admin Web (tsc) (push) Has been cancelled
CI/CD / CI · Website (tsc) (push) Has been cancelled
CI/CD / CI · Koja (tsc) (push) Has been cancelled
CI/CD / Deploy · all services (push) Has been cancelled
CI/CD / CI · API (dotnet build + test) (push) Successful in 54s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 45s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m3s
CI/CD / CI · Admin Web (tsc) (push) Has been cancelled
CI/CD / CI · Website (tsc) (push) Has been cancelled
CI/CD / CI · Koja (tsc) (push) Has been cancelled
CI/CD / Deploy · all services (push) Has been cancelled
The meezi-redis container was created before the name:meezi label existed in docker-compose.yml, so Compose doesn't recognise it as its own project container and tries to CREATE a new one, causing the name conflict. Real fix: postgres and redis are persistent infrastructure — CI should never restart them. Remove them from all deploy steps entirely. Only api, web, website, koja, admin-api, admin-web are cycled on deploy. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -310,19 +310,11 @@ jobs:
|
||||
DOCKER_BUILDKIT: 1
|
||||
COMPOSE_DOCKER_CLI_BUILD: 1
|
||||
|
||||
- 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: |
|
||||
docker compose up -d \
|
||||
--no-deps \
|
||||
--no-recreate \
|
||||
postgres redis
|
||||
|
||||
- name: Deploy main app services
|
||||
# Only cycle the app containers — postgres and redis are long-running
|
||||
# infrastructure that must never be restarted by CI.
|
||||
# --force-recreate: always swap in the freshly-built images.
|
||||
# --no-deps: infra is already handled above; don't touch postgres/redis.
|
||||
# --no-deps: do NOT pull in postgres/redis as dependencies.
|
||||
run: |
|
||||
docker compose up -d \
|
||||
--no-deps \
|
||||
|
||||
Reference in New Issue
Block a user