mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Memcached, Joomla, Moodle, Odoo, Shopware, Snipe-IT and SuiteCRM set
their cache size, PHP memory_limit, OPcache, worker limits and search
heap as literals next to a mem_limit they never read. They now ask
lookup('service_memory_mb') for a share of that limit. The shares are
chosen so every rendered value stays what it was.
Where the parameter lives in a file that cannot hold a template, the
value is handed in: Shopware's init script reads INIT_PHP_MEMORY_LIMIT
and refuses to start without it, SuiteCRM's image takes it as a build
argument. Shopware's worker gets --memory-limit as a command appended
to its entrypoint, and Moodle's OPcache size moves from the static ini
into the rendered one.
The performance.php.memory_limit keys of Joomla and Moodle are gone
from services.yml; nothing else read them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
59 lines
1.7 KiB
Django/Jinja
59 lines
1.7 KiB
Django/Jinja
[options]
|
|
; Database settings
|
|
db_host = {{ ODOO_DB_HOST }}
|
|
db_port = {{ ODOO_DB_PORT }}
|
|
db_user = {{ ODOO_DB_USER }}
|
|
db_password = {{ ODOO_DB_PASSWORD }}
|
|
db_name = {{ ODOO_DB_NAME }}
|
|
db_sslmode = prefer
|
|
db_maxconn = 64
|
|
db_template = template0
|
|
|
|
; Admin settings
|
|
admin_passwd = {{ ODOO_MASTER_PASSWORD }}
|
|
list_db = False
|
|
|
|
; Paths
|
|
data_dir = {{ lookup('volume', 'web-app-odoo', 'data').target }}
|
|
addons_path = {{ lookup('volume', 'web-app-odoo', 'addons').target }},/mnt/custom-addons,/usr/lib/python3/dist-packages/odoo/addons
|
|
|
|
; Logging
|
|
log_level = info
|
|
log_handler = :INFO
|
|
|
|
; Server settings
|
|
http_interface = 0.0.0.0
|
|
http_port = {{ container_port }}
|
|
gevent_port = {{ container_websocket_port }}
|
|
proxy_mode = True
|
|
workers = 4
|
|
max_cron_threads = 2
|
|
limit_memory_hard = {{ (lookup('service_memory_mb', application_id, 'odoo', 0.625) | int) * 1048576 }}
|
|
limit_memory_soft = {{ (lookup('service_memory_mb', application_id, 'odoo', 0.5) | int) * 1048576 }}
|
|
limit_time_cpu = 600
|
|
limit_time_real = 1200
|
|
limit_time_real_cron = 600
|
|
|
|
{% set email = lookup('email', application_id) %}
|
|
{% if email.enabled | bool %}
|
|
; SMTP settings
|
|
smtp_server = {{ ODOO_SMTP_HOST }}
|
|
smtp_port = {{ ODOO_SMTP_PORT }}
|
|
smtp_user = {{ ODOO_SMTP_USER }}
|
|
smtp_password = {{ ODOO_SMTP_PASSWORD }}
|
|
smtp_ssl = {{ ODOO_SMTP_SSL | lower }}
|
|
email_from = {{ email['from'] }}
|
|
{% endif %}
|
|
|
|
{% if ODOO_REDIS_ENABLED | bool %}
|
|
; Redis session store
|
|
session_store_redis = True
|
|
session_store_redis_host = {{ lookup('engine', 'redis', application_id, 'host') }}
|
|
session_store_redis_port = {{ lookup('engine', 'redis', application_id, 'port') }}
|
|
session_store_redis_pass = {{ lookup('engine', 'redis', application_id, 'password') }}
|
|
session_store_redis_prefix = odoo_session
|
|
{% endif %}
|
|
|
|
; Security
|
|
server_wide_modules = base,web
|