diff --git a/.env.production b/.env.production index 37be08d..136fec1 100644 Binary files a/.env.production and b/.env.production differ diff --git a/docker-compose.yml b/docker-compose.yml index 8b92cc0..4423116 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,6 +44,7 @@ services: depends_on: - db - redis + - es volumes: - ./mastodon:/opt/my-mastodon @@ -119,6 +120,38 @@ services: volumes: - ./data/redis:/mnt/redis:ro + # Comment this service if you want to disable full-text search. + es: + container_name: mastodon-es + restart: always + image: elasticsearch:7.17.20 + mem_limit: 1.5gb + environment: + - "ES_JAVA_OPTS=-Xms512m -Xmx512m -Des.enforce.bootstrap.checks=true" + - "xpack.license.self_generated.type=basic" + - "xpack.security.enabled=false" + - "xpack.watcher.enabled=false" + - "xpack.graph.enabled=false" + - "xpack.ml.enabled=false" + - "bootstrap.memory_lock=true" + - "cluster.name=es-mastodon" + - "discovery.type=single-node" + - "thread_pool.write.queue_size=1000" + networks: + - internal_network + - external_network + healthcheck: + test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"] + volumes: + - ./data/elasticsearch:/usr/share/elasticsearch/data + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + networks: external_network: internal_network: diff --git a/env.production.sample b/env.production.sample index e7f2521..432fb01 100644 --- a/env.production.sample +++ b/env.production.sample @@ -44,6 +44,6 @@ SMTP_OPENSSL_VERIFY_MODE=none SMTP_ENABLE_STARTTLS=auto SMTP_FROM_ADDRESS='Mastodon ' -# ES_ENABLED=true -# ES_HOST=localhost -# ES_PORT=9200 +ES_ENABLED=true +ES_HOST=es +ES_PORT=9200