deploy: enable valkey cache profile automatically
CI / Rust Checks (push) Has been cancelled
CI / UI Checks (push) Has been cancelled
CI / Frontend E2E (push) Has been cancelled
CI / Deployment Manifests (push) Has been cancelled
Deploy / build-images (apps/admin-api/Dockerfile, git.itexp.me/bsodfather/crank-community-admin-api, admin-api) (push) Has been cancelled
Deploy / build-images (apps/mcp-server/Dockerfile, git.itexp.me/bsodfather/crank-community-mcp-server, mcp-server) (push) Has been cancelled
Deploy / build-images (apps/ui/Dockerfile, git.itexp.me/bsodfather/crank-community-ui, ui) (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
CI / Rust Checks (push) Has been cancelled
CI / UI Checks (push) Has been cancelled
CI / Frontend E2E (push) Has been cancelled
CI / Deployment Manifests (push) Has been cancelled
Deploy / build-images (apps/admin-api/Dockerfile, git.itexp.me/bsodfather/crank-community-admin-api, admin-api) (push) Has been cancelled
Deploy / build-images (apps/mcp-server/Dockerfile, git.itexp.me/bsodfather/crank-community-mcp-server, mcp-server) (push) Has been cancelled
Deploy / build-images (apps/ui/Dockerfile, git.itexp.me/bsodfather/crank-community-ui, ui) (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
This commit is contained in:
@@ -177,10 +177,15 @@ jobs:
|
||||
ssh -p "$DEPLOY_PORT" "$DEPLOY_USER@$DEPLOY_HOST" "
|
||||
set -e
|
||||
cd '$DEPLOY_PATH'
|
||||
compose_profiles=''
|
||||
cache_backend=\$(grep -E '^CRANK_CACHE_BACKEND=' .env | tail -n1 | cut -d= -f2- || true)
|
||||
if [ \"\$cache_backend\" = 'valkey' ] || [ \"\$cache_backend\" = 'redis' ]; then
|
||||
compose_profiles='--profile cache'
|
||||
fi
|
||||
echo '$DEPLOY_REGISTRY_TOKEN' | docker login '${{ env.REGISTRY }}' -u '$DEPLOY_REGISTRY_USER' --password-stdin
|
||||
docker compose config -q
|
||||
docker compose pull admin-api mcp-server ui
|
||||
docker compose up -d --remove-orphans
|
||||
docker compose \$compose_profiles config -q
|
||||
docker compose \$compose_profiles pull
|
||||
docker compose \$compose_profiles up -d --remove-orphans
|
||||
"
|
||||
|
||||
- name: Verify health endpoints
|
||||
|
||||
@@ -181,6 +181,7 @@ services:
|
||||
- profile: `cache`
|
||||
- service: `valkey`
|
||||
- базовый запуск без profile должен оставаться полностью рабочим
|
||||
- CD включает profile `cache` автоматически, если в `.env` стоит `CRANK_CACHE_BACKEND=valkey` или `CRANK_CACHE_BACKEND=redis`
|
||||
|
||||
Пример:
|
||||
|
||||
@@ -191,6 +192,14 @@ docker compose \
|
||||
--profile cache up -d
|
||||
```
|
||||
|
||||
Для встроенного compose-сервиса `valkey` рекомендуемые значения в OpenBao:
|
||||
|
||||
```text
|
||||
CRANK_CACHE_BACKEND=valkey
|
||||
CRANK_CACHE_URL=redis://valkey:6379/0
|
||||
CRANK_CACHE_DEFAULT_TTL_MS=60000
|
||||
```
|
||||
|
||||
## 10. Healthchecks
|
||||
|
||||
Нужны как минимум:
|
||||
|
||||
Reference in New Issue
Block a user