Merge pull request 'feat(deploy): SSH deploy hook, Dockerfile includes scripts/docs' (#14) from fix/deploy-hook-ssh into main

This commit was merged in pull request #14.
This commit is contained in:
2026-06-01 20:03:59 +03:00
2 changed files with 14 additions and 4 deletions

View File

@@ -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 сек)

View File

@@ -4,6 +4,9 @@ COPY src/api/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY src/api/ ./src/api/
COPY src/web/ ./src/web/
COPY scripts/ ./scripts/
COPY migrations/ ./migrations/
COPY docs/ ./docs/
ENV STATIC_DIR=/app/src/web
ENV PORT=5556
EXPOSE 5556