From 8ff1d263d40b8e32ae88a306e5aa8aa49a99707e Mon Sep 17 00:00:00 2001 From: CC Date: Wed, 20 May 2026 23:33:00 +0100 Subject: [PATCH] n8n module test --- compose/.env | 19 +++++++++++++++++-- compose/docker-compose.yml | 25 +++++++++++++++++++------ terraform/single.tfvars.example | 20 +++++--------------- terraform/terraform.tfvars | 11 +++++++++++ 4 files changed, 52 insertions(+), 23 deletions(-) create mode 100644 terraform/terraform.tfvars diff --git a/compose/.env b/compose/.env index 4f9dbfa..d9c1928 100644 --- a/compose/.env +++ b/compose/.env @@ -1,2 +1,17 @@ -APP_NAME=myservice -APP_PORT=8080 +APP_NAME=n8n +APP_PORT=5678 +# DOMAIN_NAME and SUBDOMAIN together determine where n8n will be reachable from +# The top level domain to serve from +DOMAIN_NAME=charcarservices.uk + +# The subdomain to serve from +SUBDOMAIN=nein + +# The above example serve n8n at: https://n8n.example.com + +# Optional timezone to set which gets used by Cron and other scheduling nodes +# New York is the default value if not set +GENERIC_TIMEZONE=Europe/London + +# The email address to use for the TLS/SSL certificate creation +SSL_EMAIL=user@example.com \ No newline at end of file diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 973dc04..52a72c1 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -1,9 +1,22 @@ services: - app: - image: your-image:latest - container_name: ${APP_NAME} - restart: unless-stopped + n8n: + image: docker.n8n.io/n8nio/n8n + restart: always ports: - - "${APP_PORT}:8080" + - "5678:5678" environment: - - TZ=Europe/London + - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true + - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME} + - N8N_PORT=5678 + - N8N_PROTOCOL=https + - NODE_ENV=production + - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/ + - GENERIC_TIMEZONE=${GENERIC_TIMEZONE} + - TZ=${GENERIC_TIMEZONE} + volumes: + - ./n8n_data:/home/node/.n8n + - ./local-files:/files + +volumes: + n8n_data: + traefik_data: diff --git a/terraform/single.tfvars.example b/terraform/single.tfvars.example index 2b46128..7705723 100644 --- a/terraform/single.tfvars.example +++ b/terraform/single.tfvars.example @@ -1,21 +1,11 @@ instance_mode = "single" instance = { - service_name = "grafana" - vm_name = "grafana-01" + service_name = "n8n" + vm_name = "n8n-01" node_name = "pop" - app_port = 3000 - app_image = "grafana/grafana:latest" - vm_tags = ["monitoring"] + app_port = 5678 + app_image = "docker.n8n.io/n8nio/n8n" + vm_tags = ["agentic"] } -vm_defaults = { - node_datastore = "hlst" - vm_bios = "ovmf" - vm_machine = "q35" - vm_user_sshkey = "ssh-ed25519 AAAA..." - bridge = "vmbr0" - vm_cpu = 2 - vm_ram = 4096 - vm_size = "20G" -} diff --git a/terraform/terraform.tfvars b/terraform/terraform.tfvars new file mode 100644 index 0000000..7705723 --- /dev/null +++ b/terraform/terraform.tfvars @@ -0,0 +1,11 @@ +instance_mode = "single" + +instance = { + service_name = "n8n" + vm_name = "n8n-01" + node_name = "pop" + app_port = 5678 + app_image = "docker.n8n.io/n8nio/n8n" + vm_tags = ["agentic"] +} +