Initial commit.
This commit is contained in:
parent
820c5f67b8
commit
7be2bd8118
2
.gitignore
vendored
2
.gitignore
vendored
@ -0,0 +1,2 @@
|
||||
.env
|
||||
.env.*
|
45
docker-compose.yml
Executable file
45
docker-compose.yml
Executable file
@ -0,0 +1,45 @@
|
||||
# AUTHOR: Kris <connect@kristoffermalong.dev>
|
||||
# NOTE:
|
||||
# Permission fix for linux based operating systems (If you are using local-space instead of mounted volumes).
|
||||
# sudo chown -R 1000:1000 ./n8n_data
|
||||
# sudo chmod 755 ./n8n_data
|
||||
# then, restart docker compose container
|
||||
# This configuration is set to mounted volume by default.
|
||||
|
||||
services:
|
||||
n8n:
|
||||
image: n8nio/n8n:stable
|
||||
container_name: n8n
|
||||
ports:
|
||||
- "5678:5678"
|
||||
user: "1000:1000"
|
||||
environment:
|
||||
- N8N_BASIC_AUTH_ACTIVE=${N8N_BASIC_AUTH_ACTIVE}
|
||||
- N8N_BASIC_AUTH_USER=${N8N_BASIC_AUTH_USER}
|
||||
- N8N_BASIC_AUTH_PASSWORD=${N8N_BASIC_AUTH_PASSWORD}
|
||||
- N8N_HOST=${N8N_HOST}
|
||||
- N8N_PORT=${N8N_PORT}
|
||||
- N8N_PROTOCOL=${N8N_PROTOCOL}
|
||||
- N8N_EDITOR_BASE_URL=${N8N_EDITOR_BASE_URL}
|
||||
- TZ=${TZ}
|
||||
# For security. Set default values for the following environment variables.
|
||||
- N8N_RUNNERS_ENABLED=true
|
||||
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
|
||||
volumes:
|
||||
- n8n_data:/home/node/.n8n:rw
|
||||
restart: unless-stopped
|
||||
|
||||
# We do this since we are not autoscaling.
|
||||
# We can autoscale with kubernetes or k8s in the future.
|
||||
# This is to prevent your host PC or VPS from draining its resources.
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "${N8N_LIMIT_CPUS}"
|
||||
memory: "${N8N_LIMIT_MEMORY}"
|
||||
reservations:
|
||||
cpus: "${N8N_RESERVE_CPUS}"
|
||||
memory: "${N8N_RESERVE_MEMORY}"
|
||||
|
||||
volumes:
|
||||
n8n_data:
|
23
env.default
Normal file
23
env.default
Normal file
@ -0,0 +1,23 @@
|
||||
# Rename to ".env"
|
||||
# ----- System Variables
|
||||
N8N_BASIC_AUTH_ACTIVE=true
|
||||
N8N_BASIC_AUTH_USER=admin
|
||||
N8N_BASIC_AUTH_PASSWORD=changeme
|
||||
N8N_HOST=localhost
|
||||
N8N_PORT=5678
|
||||
N8N_PROTOCOL=http
|
||||
N8N_EDITOR_BASE_URL=http://localhost:5678
|
||||
TZ=Asia/Manila
|
||||
|
||||
|
||||
|
||||
|
||||
# ----- Resources
|
||||
# - Limits
|
||||
N8N_LIMIT_CPUS=0.25
|
||||
N8N_LIMIT_MEMORY=512MB
|
||||
|
||||
# - Reservations
|
||||
N8N_RESERVE_CPUS=0.25
|
||||
N8N_RESERVE_MEMORY=512MB
|
||||
|
Loading…
x
Reference in New Issue
Block a user