mirror of
https://github.com/n8n-io/self-hosted-ai-starter-kit.git
synced 2026-03-15 08:48:08 +01:00
auto-import credentials and workflows at start
This commit is contained in:
@@ -9,6 +9,22 @@ volumes:
|
|||||||
networks:
|
networks:
|
||||||
n8n:
|
n8n:
|
||||||
|
|
||||||
|
x-n8n: &service-n8n
|
||||||
|
image: n8nio/n8n:latest
|
||||||
|
networks: ['n8n']
|
||||||
|
environment:
|
||||||
|
- DB_TYPE=postgresdb
|
||||||
|
- DB_POSTGRESDB_HOST=postgres
|
||||||
|
- DB_POSTGRESDB_USER=${POSTGRES_USER}
|
||||||
|
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
- N8N_DIAGNOSTICS_ENABLED=false
|
||||||
|
- N8N_PERSONALIZATION_ENABLED=false
|
||||||
|
- N8N_ENCRYPTION_KEY
|
||||||
|
- N8N_USER_MANAGEMENT_JWT_SECRET
|
||||||
|
- EXTERNAL_HOOK_FILES=/hooks.js
|
||||||
|
links:
|
||||||
|
- postgres
|
||||||
|
|
||||||
x-ollama: &service-ollama
|
x-ollama: &service-ollama
|
||||||
image: ollama/ollama:latest
|
image: ollama/ollama:latest
|
||||||
container_name: ollama
|
container_name: ollama
|
||||||
@@ -60,32 +76,35 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|
||||||
n8n:
|
n8n-import:
|
||||||
image: n8nio/n8n:latest
|
<<: *service-n8n
|
||||||
container_name: n8n
|
container_name: n8n-import
|
||||||
networks: ['n8n']
|
entrypoint: /bin/sh
|
||||||
restart: unless-stopped
|
command:
|
||||||
environment:
|
- "-c"
|
||||||
- DB_TYPE=postgresdb
|
- "n8n import:credentials --separate --input=/backup/credentials && n8n import:workflow --separate --input=/backup/workflows"
|
||||||
- DB_POSTGRESDB_HOST=postgres
|
|
||||||
- DB_POSTGRESDB_USER=${POSTGRES_USER}
|
|
||||||
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
|
|
||||||
- N8N_DIAGNOSTICS_ENABLED=false
|
|
||||||
- N8N_PERSONALIZATION_ENABLED=false
|
|
||||||
- N8N_ENCRYPTION_KEY
|
|
||||||
- N8N_USER_MANAGEMENT_JWT_SECRET
|
|
||||||
- EXTERNAL_HOOK_FILES=/hooks.js
|
|
||||||
ports:
|
|
||||||
- 5678:5678
|
|
||||||
links:
|
|
||||||
- postgres
|
|
||||||
volumes:
|
volumes:
|
||||||
- n8n_storage:/home/node/.n8n
|
- ./n8n/backup:/backup
|
||||||
- ./n8n/hooks.js:/hooks.js
|
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
|
n8n:
|
||||||
|
<<: *service-n8n
|
||||||
|
container_name: n8n
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 5678:5678
|
||||||
|
volumes:
|
||||||
|
- n8n_storage:/home/node/.n8n
|
||||||
|
- ./n8n/hooks.js:/hooks.js
|
||||||
|
- ./n8n/backup:/backup
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
n8n-import:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
|
||||||
qdrant:
|
qdrant:
|
||||||
image: qdrant/qdrant
|
image: qdrant/qdrant
|
||||||
container_name: qdrant
|
container_name: qdrant
|
||||||
|
|||||||
14
n8n/backup/credentials/sFfERYppMeBnFNeA.json
Normal file
14
n8n/backup/credentials/sFfERYppMeBnFNeA.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"createdAt": "2024-02-23T16:27:55.919Z",
|
||||||
|
"updatedAt": "2024-02-23T16:27:55.918Z",
|
||||||
|
"id": "sFfERYppMeBnFNeA",
|
||||||
|
"name": "QdrantApi account",
|
||||||
|
"data": "U2FsdGVkX18bm81Pk18TjmfyKEIbzd91Dt1O8pUPgTxVGk5v1mXp7MlE/3Fl+NHGTMBqa3u7RBS36wTQ74rijQ==",
|
||||||
|
"type": "qdrantApi",
|
||||||
|
"nodesAccess": [
|
||||||
|
{
|
||||||
|
"nodeType": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
|
||||||
|
"date": "2024-02-23T16:27:55.918Z"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
18
n8n/backup/credentials/xHuYe0MDGOs9IpBW.json
Normal file
18
n8n/backup/credentials/xHuYe0MDGOs9IpBW.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"createdAt": "2024-02-23T16:26:54.475Z",
|
||||||
|
"updatedAt": "2024-02-23T16:26:58.928Z",
|
||||||
|
"id": "xHuYe0MDGOs9IpBW",
|
||||||
|
"name": "Ollama account",
|
||||||
|
"data": "U2FsdGVkX18BVmjQBCdNKSrjr0GhmcTwMgG/rSWhncWtqOLPT62WnCIktky8RgM1PhH7vMkMc5EuUFIQA/eEZA==",
|
||||||
|
"type": "ollamaApi",
|
||||||
|
"nodesAccess": [
|
||||||
|
{
|
||||||
|
"nodeType": "@n8n/n8n-nodes-langchain.lmChatOllama",
|
||||||
|
"date": "2024-02-23T16:26:58.927Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "@n8n/n8n-nodes-langchain.lmOllama",
|
||||||
|
"date": "2024-02-23T16:26:58.927Z"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
86
n8n/backup/workflows/srOnR8PAY3u4RSwb.json
Normal file
86
n8n/backup/workflows/srOnR8PAY3u4RSwb.json
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"createdAt": "2024-02-23T16:58:31.616Z",
|
||||||
|
"updatedAt": "2024-02-23T16:58:31.616Z",
|
||||||
|
"id": "srOnR8PAY3u4RSwb",
|
||||||
|
"name": "Demo workflow",
|
||||||
|
"active": false,
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"parameters": {},
|
||||||
|
"id": "74003dcd-2ac7-4caa-a1cd-adecc5143c07",
|
||||||
|
"name": "Chat Trigger",
|
||||||
|
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||||
|
"typeVersion": 1,
|
||||||
|
"position": [
|
||||||
|
660,
|
||||||
|
340
|
||||||
|
],
|
||||||
|
"webhookId": "cdb5c076-d458-4b9d-8398-f43bd25059b1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {},
|
||||||
|
"id": "ce8c3da4-899c-4cc4-af73-8096c64eec64",
|
||||||
|
"name": "Basic LLM Chain",
|
||||||
|
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||||
|
"typeVersion": 1.3,
|
||||||
|
"position": [
|
||||||
|
880,
|
||||||
|
340
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"id": "3dee878b-d748-4829-ac0a-cfd6705d31e5",
|
||||||
|
"name": "Ollama Chat Model",
|
||||||
|
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
|
||||||
|
"typeVersion": 1,
|
||||||
|
"position": [
|
||||||
|
900,
|
||||||
|
560
|
||||||
|
],
|
||||||
|
"credentials": {
|
||||||
|
"ollamaApi": {
|
||||||
|
"id": "xHuYe0MDGOs9IpBW",
|
||||||
|
"name": "Ollama account"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"connections": {
|
||||||
|
"Chat Trigger": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Basic LLM Chain",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Ollama Chat Model": {
|
||||||
|
"ai_languageModel": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Basic LLM Chain",
|
||||||
|
"type": "ai_languageModel",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"executionOrder": "v1"
|
||||||
|
},
|
||||||
|
"staticData": null,
|
||||||
|
"meta": {
|
||||||
|
"templateCredsSetupCompleted": true
|
||||||
|
},
|
||||||
|
"pinData": {},
|
||||||
|
"versionId": "4e2affe6-bb1c-4ddc-92f9-dde0b7656796",
|
||||||
|
"triggerCount": 0,
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user