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

@@ -1,21 +1,14 @@
services:
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
{% include 'roles/docker-compose/templates/base.yml.j2' %}
application:
image: "{{ applications[application_id].images[application_id] }}"
volumes:
- uploads:/var/lib/mobilizon/uploads
- {{ mobilizon_host_conf_exs_file }}:/etc/mobilizon/config.exs:ro
ports:
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ mobilizon_exposed_docker_port }}"
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:{{ mobilizon_exposed_docker_port }}"]
interval: 30s
timeout: 10s
retries: 3
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% include 'roles/docker-container/templates/depends_on_dmbs.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}

View File

@@ -15,7 +15,7 @@ MOBILIZON_INSTANCE_HOST={{ domains | get_domain(application_id) }}
# MOBILIZON_INSTANCE_LISTEN_IP
# The port to listen on (defaults to 4000). Point your reverse proxy on this port.
MOBILIZON_INSTANCE_PORT={{ mobilizon_exposed_docker_port }}
MOBILIZON_INSTANCE_PORT={{ container_port }}
# Whether registrations are opened or closed. Can be changed in the admin settings UI as well.
# Make sure to moderate actively your instance if registrations are opened.

View File

@@ -15,4 +15,8 @@ domains:
canonical:
- "event.{{ primary_domain }}"
aliases:
- "events.{{ primary_domain }}"
- "events.{{ primary_domain }}"
docker:
services:
database:
enabled: true

View File

@@ -4,5 +4,5 @@ database_type: "postgres"
database_gis_enabled: true
mobilizon_oidc_callback_url: "{{ domains | get_url(application_id, web_protocol) }}/auth/openid_connect/callback"
mobilizon_exposed_docker_port: 4000
container_port: 4000
mobilizon_host_conf_exs_file: "{{docker_compose.directories.config}}config.exs"