mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-09 22:41:03 +01:00
Merge branch 'master' of github.com:kevinveenbirkenbach/server-playbook
This commit is contained in:
commit
491d3a7b29
8
roles/docker-listmonk/handlers/main.yml
Normal file
8
roles/docker-listmonk/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: recreate listmonk
|
||||
command:
|
||||
cmd: docker-compose -p listmonk up -d --force-recreate
|
||||
chdir: "{{path_docker_compose_files}}listmonk/"
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
2
roles/docker-listmonk/meta/main.yml
Normal file
2
roles/docker-listmonk/meta/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- docker-reverse-proxy
|
21
roles/docker-listmonk/tasks/main.yml
Normal file
21
roles/docker-listmonk/tasks/main.yml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: recieve {{domain}} certificate
|
||||
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
|
||||
|
||||
- name: configure {{domain}}.conf
|
||||
template:
|
||||
src: "roles/docker-reverse-proxy/templates/domain.conf.j2"
|
||||
dest: "/etc/nginx/conf.d/{{domain}}.conf"
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{path_docker_compose_files}}listmonk/"
|
||||
file:
|
||||
path: "{{path_docker_compose_files}}listmonk/"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template:
|
||||
src: "docker-compose.yml.j2"
|
||||
dest: "{{path_docker_compose_files}}listmonk/docker-compose.yml"
|
||||
notify: recreate listmonk
|
31
roles/docker-listmonk/templates/config.toml
Normal file
31
roles/docker-listmonk/templates/config.toml
Normal file
@ -0,0 +1,31 @@
|
||||
[app]
|
||||
# Interface and port where the app will run its webserver. The default value
|
||||
# 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"
|
||||
|
||||
# BasicAuth authentication for the admin dashboard. This will eventually
|
||||
# be replaced with a better multi-user, role-based authentication system.
|
||||
# IMPORTANT: Leave both values empty to disable authentication on admin
|
||||
# only where an external authentication is already setup.
|
||||
admin_username = "listmonk"
|
||||
admin_password = "listmonk"
|
||||
|
||||
# Database.
|
||||
[db]
|
||||
host = "localhost"
|
||||
port = 5432
|
||||
user = "listmonk"
|
||||
password = "listmonk"
|
||||
|
||||
# Ensure that this database has been created in Postgres.
|
||||
database = "listmonk"
|
||||
|
||||
ssl_mode = "disable"
|
||||
max_open = 25
|
||||
max_idle = 25
|
||||
max_lifetime = "300s"
|
||||
|
||||
# Optional space separated Postgres DSN params. eg: "application_name=listmonk gssencmode=disable"
|
||||
params = ""
|
54
roles/docker-listmonk/templates/docker-compose.yml.j2
Normal file
54
roles/docker-listmonk/templates/docker-compose.yml.j2
Normal file
@ -0,0 +1,54 @@
|
||||
# NOTE: This docker-compose.yml is meant to be just an example guideline
|
||||
# on how you can achieve the same. It is not intented to run out of the box
|
||||
# and you must edit the below configurations to suit your needs.
|
||||
|
||||
version: "3.7"
|
||||
|
||||
x-app-defaults: &app-defaults
|
||||
restart: unless-stopped
|
||||
image: listmonk/listmonk:latest
|
||||
ports:
|
||||
- "9000:9000"
|
||||
networks:
|
||||
- listmonk
|
||||
environment:
|
||||
- TZ=Etc/UTC
|
||||
|
||||
x-db-defaults: &db-defaults
|
||||
image: postgres:13
|
||||
ports:
|
||||
- "9432:5432"
|
||||
networks:
|
||||
- listmonk
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=listmonk
|
||||
- POSTGRES_USER=listmonk
|
||||
- POSTGRES_DB=listmonk
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U listmonk"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
|
||||
services:
|
||||
db:
|
||||
<<: *db-defaults
|
||||
container_name: listmonk_db
|
||||
volumes:
|
||||
- type: volume
|
||||
source: listmonk-data
|
||||
target: /var/lib/postgresql/data
|
||||
|
||||
app:
|
||||
<<: *app-defaults
|
||||
container_name: listmonk_app
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
- ./config.toml:/listmonk/config.toml
|
||||
networks:
|
||||
listmonk:
|
||||
|
||||
volumes:
|
||||
listmonk-data:
|
Loading…
Reference in New Issue
Block a user