version: '3.7' services: app: image: {{ stack_image }}:{{ monica_version }} networks: - "{{ docker_swarm_public_network_name }}" - backend volumes: - data:/var/www/html/storage environment: {% if server_domain is not undefined and not none %} - APP_ENV=production {% else %} - APP_ENV=local {% endif %} - APP_KEY={{ monica_app_key }} {% if monica_app_disable_signups is sameas true %} - APP_DISABLE_SIGNUP=true {% endif %} - DB_HOST=db - DB_DATABASE={{ monica_db_database }} - DB_USERNAME={{ monica_db_username }} - DB_PASSWORD={{ monica_db_password }} {% if server_domain is not undefined and not none %} - "APP_URL={{ (monica_use_https == True) | ternary('https', 'http') }}://{{ (subdomain_alias is not undefined and not none) | ternary(subdomain_alias, stack_name) }}.{{server_domain}}" {% if monica_app_geolocation_api_key is not undefined and not none %} - ENABLE_GEOLOCATION=true - LOCATION_IQ_API_KEY={{ monica_app_geolocation_api_key }} {% if monica_app_weather_api_key is not undefined and not none %} - ENABLE_WEATHER=true - DARKSKY_API_KEY={{ monica_app_weather_api_key }} {% endif %} {% endif %} {% if monica_mail_host is not undefined and not none %} - MAIL_MAILER=smtp - MAIL_HOST={{ monica_mail_host }} - MAIL_PORT={{ monica_mail_port }} - MAIL_ENCRYPTION={{ monica_mail_encryption }} - MAIL_USERNAME={{ monica_mail_username }} - MAIL_PASSWORD={{ monica_mail_password }} - MAIL_FROM_ADDRESS={{ monica_mail_from }} - MAIL_FROM_NAME="{{ monica_mail_from_name }}" - APP_EMAIL_NEW_USERS_NOTIFICATION={{ monica_mail_new_user_notification_address }} {% endif %} {% else %} - "APP_URL={{ (monica_use_https == True) | ternary('https', 'http') }}://localhost/{{ (subdomain_alias is not undefined and not none) | ternary(subdomain_alias, stack_name) }}/" - APP_FORCE_URL=true {% endif %} db: image: mariadb:10 environment: - MYSQL_ROOT_PASSWORD={{ monica_db_root_password }} - MYSQL_DATABASE={{ monica_db_database }} - MYSQL_USER={{ monica_db_username }} - MYSQL_PASSWORD={{ monica_db_password }} networks: - backend volumes: - db:/var/lib/mysql volumes: data: db: networks: "{{ docker_swarm_public_network_name }}": external: true backend: