# {{ ansible_managed }} services: mobilizon: image: framasoft/mobilizon:{{ docker_mobilizon_version }} restart: always environment: MOBILIZON_INSTANCE_NAME: "{{ docker_mobilizon_instance_name }}" MOBILIZON_INSTANCE_HOST: "{{ docker_mobilizon_fqdn }}" MOBILIZON_INSTANCE_EMAIL: "{{ docker_mobilizon_email_from }}" MOBILIZON_REPLY_EMAIL: "{{ docker_mobilizon_email_from }}" MOBILIZON_INSTANCE_REGISTRATIONS_OPEN: "{{ docker_mobilizon_registrations_open }}" MOBILIZON_DATABASE_USERNAME: "{{ docker_mobilizon_db_user }}" MOBILIZON_DATABASE_PASSWORD: "{{ docker_mobilizon_db_password }}" MOBILIZON_DATABASE_DBNAME: "{{ docker_mobilizon_db_name }}" MOBILIZON_DATABASE_HOST: db MOBILIZON_INSTANCE_SECRET_KEY_BASE: "{{ docker_mobilizon_secret_key_base }}" MOBILIZON_INSTANCE_SECRET_KEY: "{{ docker_mobilizon_secret_key }}" MOBILIZON_SMTP_SERVER: "{{ docker_mobilizon_smtp_server }}" MOBILIZON_SMTP_PORT: "{{ docker_mobilizon_smtp_port }}" MOBILIZON_SMTP_USERNAME: "{{ docker_mobilizon_smtp_username }}" MOBILIZON_SMTP_PASSWORD: "{{ docker_mobilizon_smtp_password }}" MOBILIZON_WEB_PUSH_ENCRYPTION_SUBJECT: "mailto:{{ docker_mobilizon_email_from }}" MOBILIZON_WEB_PUSH_ENCRYPTION_PUBLIC_KEY: "{{ docker_mobilizon_web_push_encryption_public_key }}" MOBILIZON_WEB_PUSH_ENCRYPTION_PRIVATE_KEY: "{{ docker_mobilizon_web_push_encryption_private_key }}" volumes: - {{ docker_mobilizon_data_dir }}/{{ docker_mobilizon_service_id }}/uploads:/var/lib/mobilizon/uploads {% if docker_mobilizon_custom_config is true %} - ./config.exs:/etc/mobilizon/config.exs:ro {% endif %} labels: - "traefik.enable=true" - "traefik.docker.network=traefik" - "traefik.http.routers.{{ docker_mobilizon_service_id }}.entrypoints=web" - "traefik.http.routers.{{ docker_mobilizon_service_id }}.rule=Host(`{{ docker_mobilizon_fqdn }}`)" - "traefik.http.services.{{ docker_mobilizon_service_id }}.loadbalancer.server.port=4000" depends_on: db: condition: service_healthy networks: - traefik - mobilizon db: restart: always image: postgis/postgis:14-master shm_size: 256mb networks: - mobilizon healthcheck: test: "pg_isready -U {{ docker_mobilizon_db_user }} && psql -U {{ docker_mobilizon_db_user }} --list" volumes: - {{ docker_mobilizon_data_dir }}/{{ docker_mobilizon_service_id }}/db_data:/var/lib/postgresql/data environment: POSTGRES_DB: "{{ docker_mobilizon_db_name }}" POSTGRES_USER: "{{ docker_mobilizon_db_user }}" POSTGRES_PASSWORD: "{{ docker_mobilizon_db_password }}" networks: traefik: external: true mobilizon: internal: true