zammad/.devcontainer/default/compose.yaml
Mantas Masalskis f9cf9cac77 Fixes #5906 - ElasticSearch attachments limit is hardcoded
Fixes #5907 - Attachments over ES limit are silently not indexed
2026-04-03 18:12:23 +03:00

80 lines
2.6 KiB
YAML

name: "zammad-devcontainer"
services:
devcontainer:
"image": "ghcr.io/rails/devcontainer/images/ruby:3.4.9"
environment:
MEMCACHE_SERVERS: memcached:11211
# Don't specify the postgresql database here. This will get merged with an existing database.yml.
DATABASE_URL: postgres://zammad:zammad@postgresql:5432
REDIS_URL: redis://redis:6379
# Performance / DX / tests tuning
CI_SKIP_ASSETS_PRECOMPILE: 'true'
CI_SKIP_DB_RESET: 'true'
RAILS_SERVE_STATIC_FILES: 'true'
TZ: 'Europe/London'
Z_LOCALES: en-us:en-gb:de-de
ES_URL: http://elasticsearch:9200
ES_INDEX: estest.local_zammad
VITE_RUBY_HOST: '127.0.0.1'
BETA_UI_FEEDBACK_API_HOST: 'http://localhost:3000'
depends_on:
- memcached
- postgresql
- redis
volumes:
- ../../..:/workspaces:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
elasticsearch:
image: elasticsearch:9.3.2
environment:
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
- discovery.type=single-node
- xpack.security.enabled=false
- http.cors.enabled=true
- http.cors.allow-origin=/https:\/\/app.elasticvue.com/
# Uncomment and change the following settings if you need to allow larger payloads, e.g. for debugging or testing.
# Max length of 100MB translates to ~40MB for allowed attachments, due to base64 encoding overhead.
# Indexing pressure limit of 10% of heap memory is enough for ~50MB attachments (see a ES_JAVA_OPTS above).
# Keep in mind to keep these limits aligned with the following Zammad settings:
# `es_attachment_max_size_in_mb=10` and `es_total_max_size_in_mb=300`.
# - http.max_content_length=100mb
# - indexing_pressure.memory.limit=10%
# - indexing_pressure.memory.coordinating.limit=10%
restart: unless-stopped
ports:
# Expose the ES service for direct access if needed, but avoid conflicts with host services.
- 127.0.0.1:19200:9200
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
memcached:
command: memcached -m 256M
image: memcached:1.6.38-alpine
restart: unless-stopped
postgresql:
environment:
POSTGRES_DB: zammad_development
POSTGRES_USER: zammad
POSTGRES_PASSWORD: zammad
image: postgres:17.5-alpine
restart: unless-stopped
volumes:
- postgresql-data:/var/lib/postgresql/data
redis:
image: redis:7.0
restart: unless-stopped
volumes:
elasticsearch-data:
driver: local
postgresql-data:
driver: local