diff --git a/.openclaw/agents/deployer.md b/.openclaw/agents/deployer.md index 13184c6..cd0a395 100644 --- a/.openclaw/agents/deployer.md +++ b/.openclaw/agents/deployer.md @@ -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 сек) diff --git a/Dockerfile b/Dockerfile index 8a0db18..0573582 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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