2021-01-23 15:01:19 +00:00
|
|
|
---
|
|
|
|
- name: Create n8n Directory
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- "{{ n8n_data_directory }}"
|
|
|
|
|
|
|
|
- name: n8n Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: n8n
|
|
|
|
image: n8nio/n8n
|
|
|
|
pull: true
|
|
|
|
ports:
|
|
|
|
- "{{ n8n_port }}:5678"
|
|
|
|
volumes:
|
|
|
|
- "{{ n8n_data_directory }}:/home/node/.n8n:rw"
|
|
|
|
- "/etc/timezone:/etc/timezone:ro"
|
|
|
|
restart_policy: unless-stopped
|
2021-02-23 15:16:29 +00:00
|
|
|
memory: "{{ n8n_memory }}"
|
2021-01-23 15:01:19 +00:00
|
|
|
env:
|
|
|
|
N8N_BASIC_AUTH_ACTIVE: "true"
|
|
|
|
N8N_BASIC_AUTH_USER: "{{ n8n_basic_auth_user }}"
|
|
|
|
N8N_BASIC_AUTH_PASSWORD: "{{ n8n_basic_auth_password }}"
|
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ n8n_available_externally }}"
|
2021-01-23 15:15:07 +00:00
|
|
|
traefik.http.routers.n8n.rule: "Host(`{{ n8n_hostname }}.{{ ansible_nas_domain }}`)"
|
|
|
|
traefik.http.routers.n8n.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.n8n.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.n8n.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.services.gitea.loadbalancer.server.port: "5678"
|