mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-11-04 04:08:15 +00:00 
			
		
		
		
	Refactored docker-compose roles
This commit is contained in:
		@@ -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]
 | 
			
		||||
 
 | 
			
		||||
@@ -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' %}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -10,4 +10,8 @@ features:
 | 
			
		||||
  oidc:                     true
 | 
			
		||||
domains:
 | 
			
		||||
  canonical:
 | 
			
		||||
    - "newsletter.{{ primary_domain }}"
 | 
			
		||||
    - "newsletter.{{ primary_domain }}"
 | 
			
		||||
docker:
 | 
			
		||||
  services:
 | 
			
		||||
    database:
 | 
			
		||||
      enabled: true
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
application_id:      "listmonk"
 | 
			
		||||
database_type:      "postgres"
 | 
			
		||||
application_id: "listmonk"
 | 
			
		||||
database_type:  "postgres"
 | 
			
		||||
container_port: "9000"
 | 
			
		||||
 | 
			
		||||
listmonk_settings:
 | 
			
		||||
  - key: "app.root_url"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user