src.nth.io/

summaryrefslogtreecommitdiff
path: root/ergo
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-03-23 22:22:36 -0500
committerLuke Hoersten <[email protected]>2026-03-23 22:22:36 -0500
commit1859f62813f0c586ea49f912944fb25efd60520f (patch)
tree5e92465f6e24cda9f4c38c2c2c00d0c0ccd7c525 /ergo
parentb7fbbf6810d4d53ca7a0afca31134181f7025a67 (diff)
Fixed log rotation and log2ram sizing.
Diffstat (limited to 'ergo')
-rw-r--r--ergo/defaults/main.yaml2
-rw-r--r--ergo/tasks/main.yaml11
-rw-r--r--ergo/templates/config.yaml.j26
-rw-r--r--ergo/templates/ergo.service.j2 (renamed from ergo/files/ergo.service)2
-rw-r--r--ergo/templates/nginx.conf.j22
5 files changed, 13 insertions, 10 deletions
diff --git a/ergo/defaults/main.yaml b/ergo/defaults/main.yaml
index 23bcec3..c1edf28 100644
--- a/ergo/defaults/main.yaml
+++ b/ergo/defaults/main.yaml
@@ -7,4 +7,6 @@ ergo_arch: "arm64"
ergo_tar_name: "ergo-{{ergo_version}}-linux-{{ergo_arch}}"
ergo_tar: "{{ergo_tar_name}}.tar.gz"
ergo_url: "https://github.com/ergochat/ergo/releases/download/v{{ergo_version}}/{{ergo_tar}}"
+ergo_run_dir: "/var/ergo"
+ergo_data_dir: "/var/ergo"
ergo_force_nick_equals_account: false
diff --git a/ergo/tasks/main.yaml b/ergo/tasks/main.yaml
index fd5da50..5998713 100644
--- a/ergo/tasks/main.yaml
+++ b/ergo/tasks/main.yaml
@@ -26,14 +26,15 @@
- name: create ergo dirs
become: yes
file:
- path: "{{item}}/ergo"
+ path: "{{item}}"
owner: "ergo"
group: "ergo"
mode: "0755"
state: "directory"
loop:
- - "/etc"
- - "/var"
+ - "/etc/ergo"
+ - "{{ergo_run_dir}}"
+ - "{{ergo_data_dir}}"
- name: configure ergo
become: yes
@@ -54,8 +55,8 @@
- name: install ergo service
become: yes
- copy:
- src: "ergo.service"
+ template:
+ src: "ergo.service.j2"
dest: "/lib/systemd/system/ergo.service"
mode: "0644"
notify: restart ergo
diff --git a/ergo/templates/config.yaml.j2 b/ergo/templates/config.yaml.j2
index a0c3249..c2e22a8 100644
--- a/ergo/templates/config.yaml.j2
+++ b/ergo/templates/config.yaml.j2
@@ -58,7 +58,7 @@ server:
# proxy: false
# Example of a Unix domain socket for proxying:
- "/var/ergo/socket":
+ "{{ergo_run_dir}}/socket":
# Example of a Tor listener: any connection that comes in on this listener will
# be considered a Tor connection. It is strongly recommended that this listener
@@ -288,7 +288,7 @@ server:
# ergo will write files to disk under certain circumstances, e.g.,
# CPU profiling or data export. by default, these files will be written
# to the working directory. set this to customize:
- output-path: "/var/ergo"
+ output-path: "{{ergo_run_dir}}"
# account options
accounts:
@@ -685,7 +685,7 @@ debug:
# datastore configuration
datastore:
# path to the datastore
- path: "/var/ergo/ergo.db"
+ path: "{{ergo_data_dir}}/ergo.db"
# if the database schema requires an upgrade, `autoupgrade` will attempt to
# perform it automatically on startup. the database will be backed
diff --git a/ergo/files/ergo.service b/ergo/templates/ergo.service.j2
index 54ff847..a885a3d 100644
--- a/ergo/files/ergo.service
+++ b/ergo/templates/ergo.service.j2
@@ -10,7 +10,7 @@ After=network.target mysql.service
[Service]
Type=simple
User=ergo
-WorkingDirectory=/var/ergo
+WorkingDirectory={{ergo_run_dir}}
ExecStart=/usr/local/bin/ergo run --conf /etc/ergo/config.yaml
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
diff --git a/ergo/templates/nginx.conf.j2 b/ergo/templates/nginx.conf.j2
index 1b1a83b..b6c9354 100644
--- a/ergo/templates/nginx.conf.j2
+++ b/ergo/templates/nginx.conf.j2
@@ -1,6 +1,6 @@
server {
listen 6697 ssl;
- proxy_pass unix:/var/ergo/socket;
+ proxy_pass unix:{{ergo_run_dir}}/socket;
proxy_protocol on;
ssl_certificate {{nginx_ssl_cert}};