From 739a67aa7a74ee27bee2768f0579ecd9cdb4335e Mon Sep 17 00:00:00 2001 From: KArtHiK Date: Fri, 23 Jan 2026 19:52:43 +0100 Subject: [PATCH] Add n8n template --- app/web/views/shared/breadcrumb.templ | 4 +- templates/7-n8n.json | 155 ++++++++++++++++++++++++++ types/check/common.go | 2 +- 3 files changed, 158 insertions(+), 3 deletions(-) create mode 100644 templates/7-n8n.json diff --git a/app/web/views/shared/breadcrumb.templ b/app/web/views/shared/breadcrumb.templ index 8d10469..5fae45c 100644 --- a/app/web/views/shared/breadcrumb.templ +++ b/app/web/views/shared/breadcrumb.templ @@ -135,7 +135,7 @@ templ breadCrumbItem(crumb *bcItem, identifier bcIdentifier, isDropDownOpen stri { crumb.name } if crumb.listUrl != "" { { item.Name } } } diff --git a/templates/7-n8n.json b/templates/7-n8n.json new file mode 100644 index 0000000..0ab32d6 --- /dev/null +++ b/templates/7-n8n.json @@ -0,0 +1,155 @@ +{ + "icon": "https://raw.githubusercontent.com/cloudness-io/icons/refs/heads/main/n8n.svg", + "name": "n8n", + "readme": "n8n is a fair-code licensed workflow automation tool that lets you connect anything to everything via its open, fair-code model.", + "tags": [ + "automation", + "workflow" + ], + "services": [ + { + "icon": "https://raw.githubusercontent.com/cloudness-io/icons/refs/heads/main/n8n.svg", + "name": "n8n", + "build": { + "source": { + "registry": { + "image": "n8nio/n8n:latest" + } + } + }, + "deploy": {}, + "networking": { + "containerPorts": [ + 5678 + ], + "serviceDomain": { + "port": 5678, + "path": "/" + } + }, + "volumes": [ + { + "name": "n8n-data", + "mountPath": "/home/n8n" + } + ], + "variables": [ + { + "key": "N8N_USER_FOLDER", + "value": "/home/n8n", + "type": "run" + }, + { + "key": "N8N_HOST", + "value": "${{CLOUDNESS_PUBLIC_DOMAIN}}", + "type": "run" + }, + { + "key": "N8N_PROTOCOL", + "value": "https", + "type": "run" + }, + { + "key": "WEBHOOK_URL", + "value": "${{CLOUDNESS_PUBLIC_DOMAIN}}", + "type": "run" + }, + { + "key": "N8N_PORT", + "value": "5678", + "type": "run" + }, + { + "key": "DB_TYPE", + "value": "postgresdb", + "type": "run" + }, + { + "key": "DB_POSTGRESDB_HOST", + "value": "${{n8n-db.CLOUDNESS_PRIVATE_DOMAIN}}", + "type": "run" + }, + { + "key": "DB_POSTGRESDB_PORT", + "value": "5432", + "type": "run" + }, + { + "key": "DB_POSTGRESDB_DATABASE", + "value": "${{n8n-db.POSTGRES_DB}}", + "type": "run" + }, + { + "key": "DB_POSTGRESDB_USER", + "value": "${{n8n-db.POSTGRES_USER}}", + "type": "run" + }, + { + "key": "DB_POSTGRESDB_PASSWORD", + "value": "${{n8n-db.POSTGRES_PASSWORD}}", + "type": "run" + }, + { + "key": "EXECUTIONS_DATA_PRUNE", + "value": "true", + "type": "run" + }, + { + "key": "EXECUTIONS_DATA_MAX_AGE", + "value": "168", + "type": "run" + }, + { + "key": "N8N_METRICS", + "value": "false", + "type": "run" + } + ] + }, + { + "icon": "https://raw.githubusercontent.com/cloudness-io/icons/refs/heads/main/postgresql.svg", + "name": "n8n-db", + "build": { + "source": { + "registry": { + "image": "postgres:16-alpine" + } + } + }, + "deploy": {}, + "networking": { + "containerPorts": [ + 5432 + ] + }, + "volumes": [ + { + "name": "db-data", + "mountPath": "/var/lib/postgresql/data" + } + ], + "variables": [ + { + "key": "PGDATA", + "value": "/var/lib/postgresql/data/pgdata", + "type": "run" + }, + { + "key": "POSTGRES_USER", + "value": "n8n", + "type": "run" + }, + { + "key": "POSTGRES_DB", + "value": "n8n", + "type": "run" + }, + { + "key": "POSTGRES_PASSWORD", + "value": "${{secret(32)}}", + "type": "run" + } + ] + } + ] +} \ No newline at end of file diff --git a/types/check/common.go b/types/check/common.go index 2180a72..6e08b13 100644 --- a/types/check/common.go +++ b/types/check/common.go @@ -16,7 +16,7 @@ const ( gitRepoSshPattern = `^git@([\w.-]+):([\w-]+)\/([\w.-]+)\.git$` fqdnPattern = `^(https?://)([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$` ipV4Pattern = `^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$` - directoryPattern = `^((/[a-zA-Z0-9-_]+)+|/)$` + directoryPattern = `^((/[a-zA-Z0-9-_.]+)+|/)$` emailRegex = `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$` //variables