No more tianji. Got umami
This commit is contained in:
parent
d8dcb7aa4e
commit
52396e1f8a
@ -9,12 +9,6 @@
|
||||
- role: apps/vaultwarden
|
||||
vars:
|
||||
port: 7072
|
||||
- role: apps/erugo
|
||||
vars:
|
||||
port: 7073
|
||||
- role: apps/tianji
|
||||
vars:
|
||||
port: 7074
|
||||
- role: apps/stirling-pdf
|
||||
vars:
|
||||
port: 7075
|
||||
@ -57,6 +51,14 @@
|
||||
instance_name: "javi"
|
||||
share: "javi"
|
||||
port: 7086
|
||||
- role: apps/n8n
|
||||
vars:
|
||||
port: 7087
|
||||
domain: "melab.fyi"
|
||||
subdomain: "automate"
|
||||
- role: apps/umami
|
||||
vars:
|
||||
port: 7088
|
||||
tasks:
|
||||
- name: Personal DW drop
|
||||
ansible.builtin.include_role:
|
||||
|
@ -1,62 +0,0 @@
|
||||
---
|
||||
- name: Install Tianji Reporter
|
||||
# hosts: vms:!apps # Tianji is already installed on apps node
|
||||
# hosts: "{{ (groups['vms'] + groups['proxies']) | unique }}"
|
||||
hosts: caddy_external
|
||||
become: true
|
||||
vars:
|
||||
server_url: "http://10.89.0.108:7074"
|
||||
workspace_id: "clnzoxcy10001vy2ohi4obbi0"
|
||||
tasks:
|
||||
- name: Ensure curl and wget are installed (Debian)
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- curl
|
||||
- wget
|
||||
update_cache: true
|
||||
|
||||
- name: Create install directory
|
||||
ansible.builtin.file:
|
||||
path: /usr/local/tianji/reporter
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Check if Tianji reporter binary already exists
|
||||
stat:
|
||||
path: /usr/local/tianji/reporter/tianji-reporter
|
||||
register: tianji_binary
|
||||
|
||||
- name: Download Tianji reporter binary
|
||||
ansible.builtin.get_url:
|
||||
url: "https://github.com/msgbyte/tianji/releases/latest/download/tianji-reporter-linux-amd64"
|
||||
dest: /usr/local/tianji/reporter/tianji-reporter
|
||||
mode: '0755'
|
||||
when: not tianji_binary.stat.exists
|
||||
|
||||
- name: Create systemd service
|
||||
ansible.builtin.copy:
|
||||
dest: /usr/lib/systemd/system/tianji-reporter.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Tianji-Reporter
|
||||
Documentation=https://github.com/msgbyte/tianji
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/tianji/reporter/tianji-reporter --url "{{ server_url }}" --workspace "{{ workspace_id }}"
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
mode: '0644'
|
||||
|
||||
- name: Reload systemd
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Enable and start Tianji reporter
|
||||
ansible.builtin.systemd:
|
||||
name: tianji-reporter
|
||||
enabled: true
|
||||
state: reloaded
|
@ -83,9 +83,6 @@
|
||||
- name: "gist"
|
||||
host: "{{ lookup('hostip', 'portainer_main') }}"
|
||||
port: 5006
|
||||
- name: "tianji"
|
||||
host: "{{ lookup('hostip', 'apps') }}"
|
||||
port: 7074
|
||||
- name: "tasks"
|
||||
host: "{{ lookup('hostip', 'apps') }}"
|
||||
port: 7085
|
||||
@ -97,4 +94,10 @@
|
||||
sites:
|
||||
- name: "files"
|
||||
host: "{{ lookup('hostip', 'apps') }}"
|
||||
port: 7086
|
||||
port: 7086
|
||||
- name: "automate"
|
||||
host: "{{ lookup('hostip', 'apps') }}"
|
||||
port: 7087
|
||||
- name: "analytics"
|
||||
host: "{{ lookup('hostip', 'apps') }}"
|
||||
port: 7088
|
0
roles/apps/n8n/defaults/main.yml
Normal file
0
roles/apps/n8n/defaults/main.yml
Normal file
52
roles/apps/n8n/tasks/main.yml
Normal file
52
roles/apps/n8n/tasks/main.yml
Normal file
@ -0,0 +1,52 @@
|
||||
- name: Create app DB
|
||||
ansible.builtin.include_role:
|
||||
role: app/database
|
||||
vars:
|
||||
app_name: "n8n"
|
||||
|
||||
- name: Set up data folders on nfs share
|
||||
ansible.builtin.include_role:
|
||||
role: docker/container-data
|
||||
vars:
|
||||
dir_name: "n8n"
|
||||
|
||||
- name: Set facts
|
||||
ansible.builtin.set_fact:
|
||||
data_path: "{{ container_data_base_path }}/n8n"
|
||||
|
||||
- name: Create subdirectories
|
||||
ansible.builtin.file:
|
||||
dest: "{{ data_path }}/{{ item }}"
|
||||
state: directory
|
||||
mode: '0777'
|
||||
loop:
|
||||
- config
|
||||
- files
|
||||
|
||||
- name: Deploy n8n container
|
||||
community.docker.docker_container:
|
||||
name: n8n
|
||||
image: docker.n8n.io/n8nio/n8n
|
||||
restart_policy: always
|
||||
state: started
|
||||
ports:
|
||||
- "{{ port }}:5678"
|
||||
env:
|
||||
DOMAIN_NAME: "{{ domain }}"
|
||||
SUBDOMAIN: "{{ subdomain }}"
|
||||
N8N_HOST: "{{ subdomain }}.{{ domain }}"
|
||||
N8N_PORT: "5678"
|
||||
N8N_PROTOCOL: "https"
|
||||
NODE_ENV: "production"
|
||||
WEBHOOK_URL: "{{ subdomain }}.{{ domain }}"
|
||||
GENERIC_TIMEZONE: "America/New_York"
|
||||
DB_TYPE: "postgresdb"
|
||||
DB_POSTGRESDB_HOST: "{{ pg_host }}"
|
||||
DB_POSTGRESDB_PORT: "{{ pg_port | string }}"
|
||||
DB_POSTGRESDB_DATABASE: "n8n"
|
||||
DB_POSTGRESDB_USER: "n8n"
|
||||
DB_POSTGRESDB_PASSWORD: "password"
|
||||
N8N_RUNNERS_ENABLED: "true"
|
||||
volumes:
|
||||
- "{{ data_path }}/files:/files"
|
||||
- "{{ data_path }}/config:/home/node/.n8n"
|
0
roles/apps/umami/defaults/main.yml
Normal file
0
roles/apps/umami/defaults/main.yml
Normal file
19
roles/apps/umami/tasks/main.yml
Normal file
19
roles/apps/umami/tasks/main.yml
Normal file
@ -0,0 +1,19 @@
|
||||
- name: Make Umami DB
|
||||
ansible.builtin.include_role:
|
||||
role: app/database
|
||||
vars:
|
||||
app_name: "umami"
|
||||
|
||||
- name: Deploy umami container
|
||||
community.docker.docker_container:
|
||||
name: umami-analytics
|
||||
state: started
|
||||
image: ghcr.io/umami-software/umami:postgresql-latest
|
||||
ports:
|
||||
- "{{ port }}:3000"
|
||||
env:
|
||||
DATABASE_URL: "postgresql://umami:password@{{ pg_host }}:{{ pg_port }}/umami"
|
||||
DATABASE_TYPE: "postgresql"
|
||||
APP_SECRET: "base64:qtj57E7iiiFV9ULhiTGkNc67mU0/kwdURLp2Yc2GHso="
|
||||
init: true
|
||||
restart_policy: always
|
Loading…
x
Reference in New Issue
Block a user