Refactored docker-compose roles

This commit is contained in:
2025-07-07 03:24:54 +02:00
parent 2ea7a606b6
commit 38ed1e94e8
102 changed files with 681 additions and 507 deletions

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 = "0.0.0.0:9000"
address = "0.0.0.0:{{ container_port }}"
# Database.
[db]

View File

@@ -1,18 +1,15 @@
services:
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
{% include 'roles/docker-compose/templates/base.yml.j2' %}
application:
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
{% set container_healthcheck = 'health' %}
{% include 'roles/docker-container/templates/base.yml.j2' %}
image: "{{ applications[application_id].images.listmonk }}"
ports:
- "127.0.0.1:{{ports.localhost.http[application_id]}}:9000"
- "127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}"
volumes:
- {{docker_compose.directories.config}}config.toml:/listmonk/config.toml
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
healthcheck:
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:9000/health || exit 1']
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
{% include 'roles/docker-container/templates/healthcheck/wget.yml.j2' %}
{% include 'templates/docker/compose/volumes-just-database.yml.j2' %}