feat: add listmonk mailing list service
This commit is contained in:
@@ -97,3 +97,7 @@ nerder.land {
|
||||
forms.nerder.land {
|
||||
reverse_proxy heyform-heyform-1:8000
|
||||
}
|
||||
|
||||
listmonk.nerder.land {
|
||||
reverse_proxy listmonk:9000
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
- name: make listmonk directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
loop:
|
||||
- /opt/stacks/listmonk
|
||||
|
||||
- name: Template out the compose file
|
||||
ansible.builtin.template:
|
||||
src: listmonk-compose.yml.j2
|
||||
dest: /opt/stacks/listmonk/compose.yml
|
||||
owner: root
|
||||
mode: 644
|
||||
|
||||
- name: deploy listmonk stack
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: /opt/stacks/listmonk
|
||||
files:
|
||||
- compose.yml
|
||||
@@ -7,4 +7,8 @@
|
||||
|
||||
- name: Install postiz
|
||||
import_tasks: postiz.yml
|
||||
tags: postiz
|
||||
tags: postiz
|
||||
|
||||
- name: Install listmonk
|
||||
import_tasks: listmonk.yml
|
||||
tags: listmonk
|
||||
@@ -0,0 +1,58 @@
|
||||
services:
|
||||
listmonk:
|
||||
image: listmonk/listmonk:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "9000:9000"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
command: [sh, -c, "./listmonk --install --idempotent --yes --config '' && ./listmonk --upgrade --yes --config '' && ./listmonk --config ''"]
|
||||
environment:
|
||||
LISTMONK_app__address: 0.0.0.0:9000
|
||||
LISTMONK_db__user: listmonk
|
||||
LISTMONK_db__password: {{ vault_listmonk.postgres_password }}
|
||||
LISTMONK_db__database: listmonk
|
||||
LISTMONK_db__host: db
|
||||
LISTMONK_db__port: 5432
|
||||
LISTMONK_db__ssl_mode: disable
|
||||
LISTMONK_db__max_open: 25
|
||||
LISTMONK_db__max_idle: 25
|
||||
LISTMONK_db__max_lifetime: 300s
|
||||
TZ: Etc/UTC
|
||||
LISTMONK_ADMIN_USER: {{ vault_listmonk.admin_user }}
|
||||
LISTMONK_ADMIN_PASSWORD: {{ vault_listmonk.admin_password }}
|
||||
volumes:
|
||||
- uploads:/listmonk/uploads
|
||||
labels:
|
||||
glance.name: Listmonk
|
||||
glance.url: https://{{ subdomains.listmonk }}/
|
||||
glance.description: Mailing list manager
|
||||
glance.id: listmonk
|
||||
|
||||
db:
|
||||
image: postgres:17-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: listmonk
|
||||
POSTGRES_PASSWORD: {{ vault_listmonk.postgres_password }}
|
||||
POSTGRES_DB: listmonk
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U listmonk"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
volumes:
|
||||
- listmonk-data:/var/lib/postgresql/data
|
||||
labels:
|
||||
glance.parent: listmonk
|
||||
glance.name: DB
|
||||
|
||||
volumes:
|
||||
uploads:
|
||||
listmonk-data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
external: true
|
||||
name: {{ docker.network_name }}
|
||||
Reference in New Issue
Block a user