fix(deploy): allow variable expansion in deploy scripts and add web health route
Fix heredoc quoting in deploy workflow to allow IMAGE_TAG and REGISTRY_URL variable expansion. Add Next.js API health check route. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
@@ -176,7 +176,7 @@ jobs:
|
|||||||
scp -i ~/.ssh/deploy_key docker-compose.prod.yml "$DEPLOY_USER@$DEPLOY_HOST:~/goodgo/"
|
scp -i ~/.ssh/deploy_key docker-compose.prod.yml "$DEPLOY_USER@$DEPLOY_HOST:~/goodgo/"
|
||||||
scp -i ~/.ssh/deploy_key -r monitoring/ "$DEPLOY_USER@$DEPLOY_HOST:~/goodgo/monitoring/"
|
scp -i ~/.ssh/deploy_key -r monitoring/ "$DEPLOY_USER@$DEPLOY_HOST:~/goodgo/monitoring/"
|
||||||
|
|
||||||
ssh -i ~/.ssh/deploy_key "$DEPLOY_USER@$DEPLOY_HOST" << 'DEPLOY_SCRIPT'
|
ssh -i ~/.ssh/deploy_key "$DEPLOY_USER@$DEPLOY_HOST" << DEPLOY_SCRIPT
|
||||||
cd ~/goodgo
|
cd ~/goodgo
|
||||||
export IMAGE_TAG="${IMAGE_TAG}"
|
export IMAGE_TAG="${IMAGE_TAG}"
|
||||||
export REGISTRY_URL="${REGISTRY_URL}"
|
export REGISTRY_URL="${REGISTRY_URL}"
|
||||||
@@ -240,7 +240,7 @@ jobs:
|
|||||||
scp -i ~/.ssh/deploy_key docker-compose.prod.yml "$DEPLOY_USER@$DEPLOY_HOST:~/goodgo/"
|
scp -i ~/.ssh/deploy_key docker-compose.prod.yml "$DEPLOY_USER@$DEPLOY_HOST:~/goodgo/"
|
||||||
scp -i ~/.ssh/deploy_key -r monitoring/ "$DEPLOY_USER@$DEPLOY_HOST:~/goodgo/monitoring/"
|
scp -i ~/.ssh/deploy_key -r monitoring/ "$DEPLOY_USER@$DEPLOY_HOST:~/goodgo/monitoring/"
|
||||||
|
|
||||||
ssh -i ~/.ssh/deploy_key "$DEPLOY_USER@$DEPLOY_HOST" << 'DEPLOY_SCRIPT'
|
ssh -i ~/.ssh/deploy_key "$DEPLOY_USER@$DEPLOY_HOST" << DEPLOY_SCRIPT
|
||||||
cd ~/goodgo
|
cd ~/goodgo
|
||||||
export IMAGE_TAG="${IMAGE_TAG}"
|
export IMAGE_TAG="${IMAGE_TAG}"
|
||||||
export REGISTRY_URL="${REGISTRY_URL}"
|
export REGISTRY_URL="${REGISTRY_URL}"
|
||||||
|
|||||||
9
apps/web/app/api/health/route.ts
Normal file
9
apps/web/app/api/health/route.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { NextResponse } from 'next/server';
|
||||||
|
|
||||||
|
export function GET() {
|
||||||
|
return NextResponse.json({
|
||||||
|
status: 'ok',
|
||||||
|
service: 'goodgo-web',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
});
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user