implemented listmonk base role

This commit is contained in:
Kevin Veen-Birkenbach 2023-12-05 13:46:06 +01:00
parent 4b9f2b9be2
commit 39d406a659
7 changed files with 32 additions and 11 deletions

View File

@ -205,6 +205,14 @@
vars:
domain: matomo.{{top_domain}}
http_port: 8018
- name: setup listmonk
hosts: listmonk
become: true
roles:
- role: docker-listmonk
vars:
domain: listmonk.{{top_domain}}
http_port: 8019
- name: setup akaunting hosts
hosts: akaunting
become: true

View File

@ -0,0 +1,5 @@
# Role Docker Listmonk
## Further Information
- https://listmonk.app/docs/installation/
- https://github.com/knadh/listmonk/

View File

@ -1,2 +1,2 @@
dependencies:
- docker-reverse-proxy
- nginx-docker-reverse-proxy

View File

@ -4,18 +4,24 @@
- name: configure {{domain}}.conf
template:
src: "roles/docker-reverse-proxy/templates/domain.conf.j2"
src: "roles/nginx-docker-reverse-proxy/templates/domain.conf.j2"
dest: "/etc/nginx/conf.d/{{domain}}.conf"
notify: restart nginx
- name: "create {{path_docker_compose_files}}listmonk/"
- name: "create {{path_docker_compose_folder}}"
file:
path: "{{path_docker_compose_files}}listmonk/"
path: "{{path_docker_compose_folder}}"
state: directory
mode: 0755
- name: add docker-compose.yml
template:
src: "docker-compose.yml.j2"
dest: "{{path_docker_compose_files}}listmonk/docker-compose.yml"
dest: "{{path_docker_compose_folder}}docker-compose.yml"
notify: recreate listmonk
- name: add config.toml
template:
src: "config.toml.j2"
dest: "{{path_docker_compose_folder}}config.toml"
notify: recreate listmonk

View File

@ -3,7 +3,7 @@
# of localhost will only listen to connections from the current machine. To
# listen on all interfaces use '0.0.0.0'. To listen on the default web address
# port, use port 80 (this will require running with elevated permissions).
address = "localhost:9000"
address = "0.0.0.0:9000"
# BasicAuth authentication for the admin dashboard. This will eventually
# be replaced with a better multi-user, role-based authentication system.
@ -14,10 +14,10 @@ admin_password = "listmonk"
# Database.
[db]
host = "localhost"
host = "listmonk_db"
port = 5432
user = "listmonk"
password = "listmonk"
password = "{{listmonk_database_password}}"
# Ensure that this database has been created in Postgres.
database = "listmonk"

View File

@ -8,20 +8,20 @@ x-app-defaults: &app-defaults
restart: unless-stopped
image: listmonk/listmonk:latest
ports:
- "9000:9000"
- "127.0.0.1:{{http_port}}:9000"
networks:
- listmonk
environment:
- TZ=Etc/UTC
x-db-defaults: &db-defaults
image: postgres:13
image: postgres:13-alpine
ports:
- "9432:5432"
networks:
- listmonk
environment:
- POSTGRES_PASSWORD=listmonk
- POSTGRES_PASSWORD={{listmonk_database_password}}
- POSTGRES_USER=listmonk
- POSTGRES_DB=listmonk
restart: unless-stopped
@ -47,6 +47,7 @@ services:
- db
volumes:
- ./config.toml:/listmonk/config.toml
networks:
listmonk:

View File

@ -0,0 +1 @@
path_docker_compose_folder: "{{path_docker_compose_files}}listmonk/"