feat(deploy): SSH deploy hook, Dockerfile includes scripts/docs
This commit is contained in:
@@ -59,10 +59,17 @@ git push origin $NEW_TAG
|
||||
|
||||
### 3. Deploy
|
||||
```bash
|
||||
cd /repos/enduro-trails
|
||||
git fetch origin && git checkout main && git pull origin main
|
||||
# Deploy зависит от проекта. Для enduro-trails:
|
||||
# Файлы уже на месте после merge в main, nginx обслуживает static
|
||||
# Deploy через SSH на хост (orchestrator имеет SSH ключ)
|
||||
DEPLOY_USER=${DEPLOY_SSH_USER:-slin}
|
||||
DEPLOY_HOST=${DEPLOY_SSH_HOST:-127.0.0.1}
|
||||
HOOK=${DEPLOY_HOOK_SCRIPT:-/home/slin/bin/enduro-deploy-hook.sh}
|
||||
|
||||
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 ${DEPLOY_USER}@${DEPLOY_HOST} "bash ${HOOK}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Deploy hook failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "Deploy OK"
|
||||
```
|
||||
|
||||
### 4. Healthcheck (до 60 сек)
|
||||
|
||||
Reference in New Issue
Block a user