mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-26 19:43:11 +00:00
31 lines
1 KiB
YAML
31 lines
1 KiB
YAML
---
|
|
- 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
|
|
memory: "{{ n8n_memory }}"
|
|
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 }}"
|
|
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"
|