Run
volumes:
db:
data_es:
services:
db:
image: kartoza/postgis:14-3
command: -c 'max_connections=200'
volumes:
- db:/var/lib/postgresql/data
- ./postgres/init:/docker-entrypoint-initdb.d
environment:
- EXTRA_CONF=max_connections=1000
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASS=postgres
- PGUSER=postgres
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "su - postgres -c 'pg_isready -h db -U postgres'" ]
interval: 3s
timeout: 10s
retries: 5
redis:
image: redis:4.0.11-alpine3.8
ports:
- "6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 10s
retries: 5
elasticsearch:
image: bitnami/elasticsearch:8.14.0
environment:
# - node.name=es01
# - cluster.name=es-docker-cluster
# - cluster.initial_master_nodes=es01
# - bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
# - xpack.security.enabled=false
- ELASTICSEARCH_PLUGINS=analysis-phonetic
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data_es:/bitnami/elasticsearch/data
ports:
- "9200:9200"
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1" ]
interval: 10s
timeout: 10s
retries: 3