web-app-espocrm: add resource limits, init/stop settings and cleanups

- Added CPU, memory and PID limits for espocrm, daemon and websocket services
- Enabled init process and graceful stop (SIGTERM, 30s) in docker-compose
- Adjusted env template (removed forced True/default flags)
- Introduced entity_name/ESPOCRM_SERVICE in vars for service naming
- Minor cleanup of get_app_conf defaults

Ref: https://chatgpt.com/share/68d937ce-9c34-800f-9136-54baed9c91c7
This commit is contained in:
2025-09-28 15:50:28 +02:00
parent fc59c64273
commit a9097a3ec3
4 changed files with 48 additions and 20 deletions

View File

@@ -20,7 +20,7 @@ CRON_DISABLED=true
# Initial admin account
# ------------------------------------------------
ESPOCRM_ADMIN_USERNAME={{ applications | get_app_conf(application_id, 'users.administrator.username') }}
ESPOCRM_ADMIN_PASSWORD={{ applications | get_app_conf(application_id, 'credentials.administrator_password', True) }}
ESPOCRM_ADMIN_PASSWORD={{ applications | get_app_conf(application_id, 'credentials.administrator_password') }}
# Public base URL of the EspoCRM instance
ESPOCRM_SITE_URL={{ ESPOCRM_URL }}
@@ -54,14 +54,14 @@ ESPOCRM_CONFIG_SMTP_SECURITY={{ "TLS" if SYSTEM_EMAIL.START_TLS else "SSL"}}
ESPOCRM_CONFIG_SMTP_AUTH=true
ESPOCRM_CONFIG_SMTP_USERNAME={{ users['contact'].email }}
ESPOCRM_CONFIG_SMTP_PASSWORD={{ users['contact'].mailu_token }}
ESPOCRM_CONFIG_OUTBOUND_EMAIL_FROM_NAME={{ applications | get_app_conf(application_id, 'email.from_name', True)}}
ESPOCRM_CONFIG_OUTBOUND_EMAIL_FROM_NAME={{ applications | get_app_conf(application_id, 'email.from_name')}}
ESPOCRM_CONFIG_OUTBOUND_EMAIL_FROM_ADDRESS={{ users['contact'].email }}
# ------------------------------------------------
# LDAP settings (optional)
# Applied only if the feature flag is true
# ------------------------------------------------
{% if applications | get_app_conf(application_id, 'features.ldap', False) %}
{% if applications | get_app_conf(application_id, 'features.ldap') %}
ESPOCRM_CONFIG_AUTHENTICATION_METHOD=Ldap
ESPOCRM_CONFIG_LDAP_HOST={{ LDAP.SERVER.DOMAIN }}
ESPOCRM_CONFIG_LDAP_PORT={{ LDAP.SERVER.PORT }}