This commit is contained in:
2023-09-26 18:14:36 -06:00
commit fb5a0fc542
443 changed files with 21892 additions and 0 deletions

110
n8n/.drone.yml Normal file
View File

@@ -0,0 +1,110 @@
---
kind: pipeline
type: docker
name: deploy
environment:
PACKAGE: n8n
URL: n8n.alexlebens.net
steps:
- name: Tests
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- /scripts/tests.sh
- name: Nofification > Discord | Tests - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose validation for n8n failed.
when:
status:
- failure
- name: Configuration
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/configuration.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
UPTIMEKUMA_NAME:
from_secret: uptimekuma_name
UPTIMEKUMA_PASSWORD:
from_secret: uptimekuma_password
UPTIMEKUMA_URL:
from_secret: uptimekuma_url
when:
branch:
- main
- name: Nofification > Discord | Configuration - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Configuration for n8n failed.
when:
status:
- failure
- name: Deploy
image: ps03fd.alexlebens.net:5000/droneimage:latest
commands:
- mkdir ~/.ssh/
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $HOST_IP >> ~/.ssh/known_hosts
- /scripts/deploy.sh
environment:
SSH_KEY:
from_secret: ssh_key_ps03fd_drone
DOCKER_HOST:
from_secret: docker_host_ps03fd
HOST_IP:
from_secret: host_ip_ps03fd
when:
branch:
- main
- name: Nofification > Discord | Deploy - Success
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for n8n succeeded
when:
status:
- sucess
- name: Nofification > Discord | Deploy - Failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: DroneCI - ps03fd
message: Docker compose deployment for n8n failed.
when:
status:
- failure

17
n8n/.env Normal file
View File

@@ -0,0 +1,17 @@
GENERIC_TIMEZONE=America/Denver
TZ=America/Denver
SSL_EMAIL=alexanderlebens@gmail.com
DATA_FOLDER=/root/n8n/
NODE_ENV=production
DOMAIN_NAME=alexlebens.net
SUBDOMAIN=n8n
WEBHOOK_URL=https://n8n.alexlebens.net/
N8N_BASIC_AUTH_USER=alexlebens
N8N_BASIC_AUTH_PASSWORD='24wrsfxv@$WRSFXV'
N8N_METRICS=true
N8N_BASIC_AUTH_ACTIVE=false
N8N_HOST=n8n.alexlebens.net
N8N_PORT=5678
N8N_PROTOCOL=http

3
n8n/README.md Normal file
View File

@@ -0,0 +1,3 @@
# n8n
[![Build Status](https://drone.alexlebens.net/api/badges/alexlebens/n8n/status.svg)](https://drone.alexlebens.net/alexlebens/n8n)

View File

@@ -0,0 +1,17 @@
{
"type": "docker",
"name": "n8n - Docker",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://n8n.alexlebens.net",
"accepted_statuscodes": [
"200-299"
],
"docker_container": "n8n",
"docker_host": 1
}

View File

@@ -0,0 +1,15 @@
{
"type": "http",
"name": "n8n - Web",
"interval": 60,
"retryInterval": 20,
"maxretries": 1,
"notificationIDList": [
3,
4
],
"url": "https://n8n.alexlebens.net",
"accepted_statuscodes": [
"200-299"
]
}

45
n8n/docker-compose.yml Normal file
View File

@@ -0,0 +1,45 @@
services:
n8n:
container_name: n8n
env_file:
- .env
image: n8nio/n8n:latest
labels:
traefik.docker.network: traefik
traefik.enable: true
traefik.http.routers.n8n.entrypoints: websecure
traefik.http.routers.n8n.rule: Host(`n8n.alexlebens.net`)
traefik.http.routers.n8n.service: n8n
traefik.http.routers.n8n.middlewares: authentik@file
traefik.http.services.n8n.loadbalancer.server.port: 5678
traefik.http.middlewares.n8n.headers.SSLRedirect: true
traefik.http.middlewares.n8n.headers.STSSeconds: 315360000
traefik.http.middlewares.n8n.headers.browserXSSFilter: true
traefik.http.middlewares.n8n.headers.contentTypeNosniff: true
traefik.http.middlewares.n8n.headers.forceSTSHeader: true
traefik.http.middlewares.n8n.headers.SSLHost: alexlebens.net
traefik.http.middlewares.n8n.headers.STSIncludeSubdomains: true
traefik.http.middlewares.n8n.headers.STSPreload: true
logging:
driver: json-file
options:
max-size: 50m
max-file: "3"
networks:
traefik: null
restart: unless-stopped
volumes:
- n8n:/home/node
networks:
traefik:
name: traefik
external: true
volumes:
n8n:
driver: local
driver_opts:
type: none
o: bind
device: /var/lib/docker/volumes/partition/n8n