mastodon: enable elastic search

single-dockerfile
Ubuntu 2 years ago
parent fa14342f75
commit 70826bccad
  1. 14
      mastodon.yaml

@ -35,14 +35,20 @@ services:
- ./data/mastodon/redis:/data - ./data/mastodon/redis:/data
mastodon-es: mastodon-es:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 image: docker.elastic.co/elasticsearch/elasticsearch:7.17.5
restart: always restart: always
container_name: mastodon-es container_name: mastodon-es
environment: environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" - "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" - "cluster.name=es-mastodon"
- "discovery.type=single-node" - "discovery.type=single-node"
- "bootstrap.memory_lock=true" - "thread_pool.write.queue_size=1000"
env_file: env_file:
- ./env.production - ./env.production
- ./mastodon/env.production - ./mastodon/env.production
@ -53,7 +59,7 @@ services:
volumes: volumes:
- ./data/mastodon/elasticsearch:/usr/share/elasticsearch/data - ./data/mastodon/elasticsearch:/usr/share/elasticsearch/data
# fixup the permissions on the data directory since they are created as root on host # fixup the permissions on the data directory since they are created as root on host
entrypoint: ["/bin/sh", "-c", "chown -R elasticsearch:elasticsearch data && exec /usr/local/bin/docker-entrypoint.sh eswrapper"] entrypoint: ["/bin/sh", "-c", "sysctl -w vm.max_map_count=262144 && chown elasticsearch:elasticsearch data && exec /usr/local/bin/docker-entrypoint.sh eswrapper"]
ulimits: ulimits:
memlock: memlock:
soft: -1 soft: -1

Loading…
Cancel
Save