fix(deploy): split log dump by service, revert litestream to latest
The 100-line combined log dump was entirely filled by litestream R2 errors, hiding the actual blue-app crash output. Now dumps blue-app (60 lines), router (10 lines), and litestream (10 lines) separately. Revert litestream image tag to latest — the R2 errors were caused by misconfigured endpoint/bucket CI variables, not a litestream version bug. The v0.5.8 tag may not exist on Docker Hub (tags omit 'v' prefix). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,12 @@ $COMPOSE --profile "$TARGET" run --rm "${TARGET}-app" \
|
|||||||
echo "==> Starting $TARGET (waiting for health check)..."
|
echo "==> Starting $TARGET (waiting for health check)..."
|
||||||
if ! $COMPOSE --profile "$TARGET" up -d --wait; then
|
if ! $COMPOSE --profile "$TARGET" up -d --wait; then
|
||||||
echo "!!! Health check failed — dumping logs"
|
echo "!!! Health check failed — dumping logs"
|
||||||
$COMPOSE logs --tail=100 2>&1 || true
|
echo "--- ${TARGET}-app logs ---"
|
||||||
|
$COMPOSE logs --tail=60 "${TARGET}-app" 2>&1 || true
|
||||||
|
echo "--- router logs ---"
|
||||||
|
$COMPOSE logs --tail=10 router 2>&1 || true
|
||||||
|
echo "--- litestream logs ---"
|
||||||
|
$COMPOSE logs --tail=10 litestream 2>&1 || true
|
||||||
echo "!!! Rolling back"
|
echo "!!! Rolling back"
|
||||||
$COMPOSE stop "${TARGET}-app" "${TARGET}-worker" "${TARGET}-scheduler"
|
$COMPOSE stop "${TARGET}-app" "${TARGET}-worker" "${TARGET}-scheduler"
|
||||||
LATEST=$($COMPOSE run --rm --entrypoint "" "${TARGET}-app" \
|
LATEST=$($COMPOSE run --rm --entrypoint "" "${TARGET}-app" \
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ services:
|
|||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
|
||||||
litestream:
|
litestream:
|
||||||
image: litestream/litestream:v0.5.8
|
image: litestream/litestream:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
# Auto-restore from R2 if DB file is missing, then start continuous replication.
|
# Auto-restore from R2 if DB file is missing, then start continuous replication.
|
||||||
# Handles: new server, deleted volume, disaster recovery.
|
# Handles: new server, deleted volume, disaster recovery.
|
||||||
|
|||||||
Reference in New Issue
Block a user