chore(backup): track n8n workflows JSON in Git
- Added exception to .gitignore for n8n JSON exports - SQL dumps remain local to prevent repo bloat - Latest workflows snapshot included
This commit is contained in:
1 parent
bd145c8914
commit
f3dba584ff
2 files changed
+5
No files matched your search
@@ -32,3 +32,5 @@ ops/secrets-catalog.sh
|
||||
.env
|
||||
__pycache__/
|
||||
ops/backups/*.sql
|
||||
ops/backups/*.sql
|
||||
!ops/backups/*.json
|
||||
@@ -0,0 +1,3 @@
|
||||
Acquiring database migration lock...
|
||||
Deprecation warning: The storage directory "/home/node/.n8n/binaryData" will be renamed to "/home/node/.n8n/storage" in n8n v3. To migrate now, set N8N_MIGRATE_FS_STORAGE_PATH=true. If you have a volume mounted at the old path, update your mount configuration after migration.
|
||||
[{"updatedAt":"2026-10-08T16:48:29.376Z","createdAt":"2026-09-11T12:37:51.879Z","id":"TSqu00NJx2JOrtoN","name":"Uptime Kuma → Gitea Self-Healing","description":null,"active":false,"isArchived":false,"nodes":[{"parameters":{"httpMethod":"POST","path":"uptime-kuma","responseMode":"responseNode","options":{}},"name":"Uptime Kuma Webhook","webhookId":"95de5809-c2a6-4ba1-a472-89debbc46fbb","type":"n8n-nodes-base.webhook","typeVersion":2,"position":[144,256],"id":"a4c37fdc-fe82-4d53-8cd9-0d6af7afc90f"},{"parameters":{"jsCode":"const webhookData = $input.first().json;\nconst body = webhookData.body || webhookData;\n\n// УМНАЯ ПРОВЕРКА: если monitor_name пуст или 'Unknown', берем домен из URL\nlet monitorName = body.monitor_name || 'Unknown';\nif (monitorName === 'Unknown' || !monitorName) {\n const url = body.monitor_url || '';\n monitorName = url ? url.replace(/https?:\\/\\//, '').split('/')[0] : 'Unknown Service';\n}\n\nconst monitorUrl = body.monitor_url || 'N/A';\nconst status = parseInt(body.heartbeat_status) || 0;\nconst message = body.heartbeat_message || 'Service is down';\n\nconst ctMatch = monitorName.match(/\\((\\d+)\\)/);\nconst ctId = ctMatch ? ctMatch[1] : null;\n\n// Создаем четкий заголовок для Gitea\nconst giteaTitle = `AUTO-FIX: ${monitorName} DOWN`;\n\nreturn [{\n json: {\n monitorName,\n monitorUrl,\n status,\n message,\n ctId,\n giteaTitle,\n timestamp: new Date().toISOString(),\n shouldAlert: status === 0 && ctId !== null\n }\n}];"},"name":"Extract Info","type":"n8n-nodes-base.code","typeVersion":2,"position":[368,256],"id":"23e46b7d-28db-4d26-b90b-f86f49d216bc"},{"parameters":{"conditions":{"boolean":[{"value1":"={{ $json.shouldAlert }}","value2":true}],"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":1},"combinator":"and"},"options":{}},"name":"Should Create Issue?","type":"n8n-nodes-base.if","typeVersion":2,"position":[608,256],"id":"2b7f557f-8d80-4266-8f67-6b1dc3c38f25"},{"parameters":{"method":"POST","url":"http://192.168.1.140:3000/api/v1/repos/root/buryan-hub/issues","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Authorization","value":"token 416f50c1a559be2def78bd6e3616a97906b0623d"},{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"specifyBody":"json","jsonBody":"={{ JSON.stringify({ title: $json.giteaTitle, body: \"CT_DOWN: \" + $json.ctId + \"\\n\\nАвтоматическое восстановление: \" + $json.monitorName + \".\\n\\nURL: \" + $json.monitorUrl + \"\\nMessage: \" + $json.message + \"\\nTime: \" + $json.timestamp, labels: [2] }) }}","options":{}},"name":"Create Gitea Issue","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[832,160],"id":"40bcfe34-b905-4ab2-ac2d-5de5ad5e9d5b"},{"parameters":{"method":"POST","url":"https://193.233.210.184/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/sendMessage","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"bodyParameters":{"parameters":[{"name":"chat_id","value":"=273442500"},{"name":"text","value":"=🚨 <b>{{ $json.monitorName }}</b> DOWN\n\nURL: {{ $json.monitorUrl }}\nВремя: {{ new Date().toLocaleString(\"ru-RU\") }}\n\n✅ Issue создан в Gitea: {{ $json.giteaTitle }}"},{"name":"parse_mode","value":"HTML"}]},"options":{"allowUnauthorizedCerts":true}},"name":"Notify Telegram","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[1088,256],"id":"9cbd83b9-944f-4d3f-9803-62ccf51cd458"},{"parameters":{"respondWith":"json","responseBody":"={{ JSON.stringify({ ok: true, issue_created: $json.html_url || null }) }}","options":{}},"name":"Respond","type":"n8n-nodes-base.respondToWebhook","typeVersion":1.1,"position":[1312,256],"id":"6eac3128-5c63-4315-89af-4fb0be610522"}],"connections":{"Uptime Kuma Webhook":{"main":[[{"node":"Extract Info","type":"main","index":0}]]},"Extract Info":{"main":[[{"node":"Should Create Issue?","type":"main","index":0}]]},"Should Create Issue?":{"main":[[{"node":"Create Gitea Issue","type":"main","index":0}]]},"Create Gitea Issue":{"main":[[{"node":"Notify Telegram","type":"main","index":0}]]},"Notify Telegram":{"main":[[{"node":"Respond","type":"main","index":0}]]}},"settings":{"binaryMode":"separate","executionOrder":"v1"},"staticData":null,"meta":null,"nodeGroups":[],"pinData":{},"versionId":"804c1a12-b975-4e70-853e-5294085461b9","activeVersionId":null,"versionCounter":7,"triggerCount":1,"sourceWorkflowId":null,"tags":[],"shared":[{"updatedAt":"2026-10-06T17:32:23.758Z","createdAt":"2026-10-06T17:32:23.758Z","role":"workflow:owner","workflowId":"TSqu00NJx2JOrtoN","projectId":"Zd9FtLQS8Pbp0htn","project":{"updatedAt":"2026-10-06T14:24:06.720Z","createdAt":"2026-10-06T14:21:02.176Z","id":"Zd9FtLQS8Pbp0htn","name":"Roman Buryan <maloyakapg@gmail.com>","type":"personal","icon":null,"description":null,"customTelemetryTags":Line truncated
|
||||
Reference in new issue
Block a user