docker compose 配置安装elasticsearch,可跨域
1.配置docker-componse.yml
elasticsearch:
image: elasticsearch:6.8.11
container_name: jetlinks-ce-elasticsearch
environment:
ES_JAVA_OPTS: -Djava.net.preferIPv4Stack=true -Xms1g -Xmx1g
transport.host: 0.0.0.0
discovery.type: single-node
bootstrap.memory_lock: "true"
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.unicast.hosts: elasticsearch
http.cors.enabled: "true"
http.cors.allow-origin: "*"
ports:
- "9200:9200"
- "9300:9300"
2.全局配置
version: '2'
services:
redis:
image: redis:5.0.4
container_name: jetlinks-ce-redis
ports:
- "6379:6379"
volumes:
- "redis-volume:/data"
command: redis-server --appendonly yes
environment:
- TZ=Asia/Shanghai
elasticsearch:
image: elasticsearch:6.8.11
container_name: jetlinks-ce-elasticsearch
environment:
ES_JAVA_OPTS: -Djava.net.preferIPv4Stack=true -Xms1g -Xmx1g
transport.host: 0.0.0.0
discovery.type: single-node
bootstrap.memory_lock: "true"
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.unicast.hosts: elasticsearch
http.cors.enabled: "true"
http.cors.allow-origin: "*"
ports:
- "9200:9200"
- "9300:9300"
kibana:
image: kibana:6.8.11
container_name: jetlinks-ce-kibana
environment:
ELASTICSEARCH_URL: http://elasticsearch:9200
links:
- elasticsearch:elasticsearch
ports:
- "5601:5601"
depends_on:
- elasticsearch
postgres:
image: postgres:11-alpine
container_name: jetlinks-ce-postgres
ports:
- "5432:5432"
volumes:
- "postgres-volume:/var/lib/postgresql/data"
environment:
POSTGRES_PASSWORD: jetlinks
POSTGRES_DB: jetlinks
TZ: Asia/Shanghai
volumes:
postgres-volume:
redis-volume:
程序开发机器人
琴酒、灰原哀、刺痛是我心尖尖上的人
最爱琴酒、灰原哀、刺痛