apiVersion: v1
kind: Pod
metadata:
  name: n8n
  labels:
    app: n8n
spec:
  restartPolicy: Always
  containers:
  - name: n8n
    image: docker.io/n8nio/n8n:latest
    ports:
    - hostPort: 5678
      containerPort: 5678
    env:
    - name: DB_TYPE
      value: sqlite
    - name: N8N_HOST
      value: localhost
    - name: N8N_PORT
      value: '5678'
    - name: N8N_PROTOCOL
      value: http
    - name: WEBHOOK_URL
      value: http://localhost:5678/
    - name: GENERIC_TIMEZONE
      value: Europe/Vienna
    volumeMounts:
    - name: vol-0
      mountPath: /home/node/.n8n
    securityContext:
      runAsUser: 1000
      runAsGroup: 1000
  volumes:
  - name: vol-0
    hostPath:
      path: ~/n8n/data
      type: DirectoryOrCreate
