From 1314dd52d70d5e96d6daf105a63c0ca47c55bdd6 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 5 Dec 2023 14:37:50 +0100 Subject: [PATCH] Renamed containers --- roles/docker-listmonk/README.md | 7 +++++++ roles/docker-listmonk/templates/config.toml.j2 | 8 ++++---- .../templates/docker-compose.yml.j2 | 18 +++++++++--------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/roles/docker-listmonk/README.md b/roles/docker-listmonk/README.md index 66450eaa..5e211bde 100644 --- a/roles/docker-listmonk/README.md +++ b/roles/docker-listmonk/README.md @@ -1,5 +1,12 @@ # Role Docker Listmonk +## Setup +Remember to run the installation script after the first setup, to initialize the Database + +```bash +docker compose run --rm application ./listmonk --install +``` + ## Further Information - https://listmonk.app/docs/installation/ - https://github.com/knadh/listmonk/ \ No newline at end of file diff --git a/roles/docker-listmonk/templates/config.toml.j2 b/roles/docker-listmonk/templates/config.toml.j2 index 1bae4820..0fe645cd 100644 --- a/roles/docker-listmonk/templates/config.toml.j2 +++ b/roles/docker-listmonk/templates/config.toml.j2 @@ -1,5 +1,5 @@ [app] -# Interface and port where the app will run its webserver. The default value +# Interface and port where the application 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). @@ -9,12 +9,12 @@ address = "0.0.0.0:9000" # 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" +admin_username = "{{listmonk_admin_username}}" +admin_password = "{{listmonk_admin_password}}" # Database. [db] -host = "listmonk_db" +host = "database" port = 5432 user = "listmonk" password = "{{listmonk_database_password}}" diff --git a/roles/docker-listmonk/templates/docker-compose.yml.j2 b/roles/docker-listmonk/templates/docker-compose.yml.j2 index e1cbbc3e..21034fff 100644 --- a/roles/docker-listmonk/templates/docker-compose.yml.j2 +++ b/roles/docker-listmonk/templates/docker-compose.yml.j2 @@ -4,7 +4,7 @@ version: "3.7" -x-app-defaults: &app-defaults +x-application-defaults: &application-defaults restart: unless-stopped image: listmonk/listmonk:latest ports: @@ -14,7 +14,7 @@ x-app-defaults: &app-defaults environment: - TZ=Etc/UTC -x-db-defaults: &db-defaults +x-database-defaults: &database-defaults image: postgres:13-alpine ports: - "9432:5432" @@ -32,19 +32,19 @@ x-db-defaults: &db-defaults retries: 6 services: - db: - <<: *db-defaults - container_name: listmonk_db + database: + <<: *database-defaults + container_name: database volumes: - type: volume source: listmonk-data target: /var/lib/postgresql/data - app: - <<: *app-defaults - container_name: listmonk_app + application: + <<: *application-defaults + container_name: listmonk_application depends_on: - - db + - database volumes: - ./config.toml:/listmonk/config.toml