Intro #
n8n is a node based software automation tool. I mainly use this to run periodic task.
my first use case #
tidle is not as popular as spotify #
there is a playlist that i want on tidle that is only currently available on spotify. It gets updated about every week. Doing this myself manually is a lot of work. Automating this is not. The spotify_to_tidal project already solves the bulk of the issue. Now to automate, so i installed it to my server linux os and set n8n to run the spotify_to_tidal command i want via ssh every week. Now I can use tidle like nothing has changed.
Docker compose #
n8n:
restart: always
image: docker.n8n.io/n8nio/n8n
environment:
- EXECUTIONS_MODE=regular
- N8N_ENCRYPTION_KEY=${ENCRYPTION_KEY}
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
- N8N_HOST=${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- N8N_RUNNERS_ENABLED=true
- NODE_ENV=production
- WEBHOOK_URL=https://${DOMAIN_NAME}/
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
- TZ=${GENERIC_TIMEZONE}
volumes:
- /nfs/configs/n8n/config:/home/node/.n8n
- /nfs/configs/spotify_to_tidal:/home/node/spotify_to_tidal
ports:
- 5678:5678
labels:
traefik.enable: "true"
traefik.http.routers.n8n80.entrypoints: web
traefik.http.routers.n8n80.rule: Host(`n8n.ian.lan`)
traefik.http.routers.n8n80.tls: "false"
traefik.http.routers.n8n80.middlewares: n8n-http
traefik.http.middlewares.n8n-http.redirectscheme.scheme: https
traefik.http.routers.n8n.entrypoints: websecure
traefik.http.routers.n8n.rule: Host(`n8n.ian.lan`)
traefik.http.routers.n8n.tls: "true"
traefik.http.services.n8n.loadbalancer.server.port: "5678"
.env
POSTGRES_USER=n8n
POSTGRES_PASSWORD=REPALCE
POSTGRES_DB=n8n
POSTGRES_NON_ROOT_USER=n8n
POSTGRES_NON_ROOT_PASSWORD=REPALCE
ENCRYPTION_KEY=REPALCE
DOMAIN_NAME=n8n.ian.lan
GENERIC_TIMEZONE=Europe/Brussels