redis
docker run -p 6379:6379 --name redis --restart=always -v /data/redis/conf/redis.conf:/etc/redis/redis.conf -v /data/redis/data:/data -d redis redis-server /etc/redis/redis.conf --appendonly yes
mysql
mongodb
elasticsearch
#宿主机
mkdir /data/elasticsearch/data1
chmod 777 /data/elasticsearch/data1
#单节点
docker run -d -p 9200:9200 -p 9300:9300 -v /data/elasticsearch/data1:/usr/share/elasticsearch/data -e "discovery.type=single-node" --restart=always --name elasticsearch elasticsearch:7.8.1
#参考:https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docker.html
kibana
docker run --link elasticsearch:elasticsearch -d -p 5601:5601 --restart=always --name kibana kibana:7.8.1
#参考:https://www.elastic.co/guide/en/kibana/current/docker.html
exceptionless
#docker-compose方式:
#其中redis使用了现有的redis容器;
#执行之前要给esdata目录授权:
chmod 777 /data/exceptionless/esdata7
version: '3.7'
services:
app:
depends_on:
- elasticsearch
image: exceptionless/app:6.1.0
container_name: exceptionless-app
environment:
EX_AppMode: Production
EX_ConnectionStrings__Cache: provider=redis
EX_ConnectionStrings__Elasticsearch: server=http://elasticsearch:9200
EX_ConnectionStrings__MessageBus: provider=redis
#EX_ConnectionStrings__Metrics: provider=statsd;server=statsd;
EX_ConnectionStrings__Queue: provider=redis
EX_ConnectionStrings__Redis: server=10.6.66.*:6379,password=***,defaultDatabase=1,abortConnect=false
#ASPNETCORE_URLS: http://+;https://+
#ASPNETCORE_HTTPS_PORT: 5001
#ASPNETCORE_Kestrel__Certificates__Default__Password: password
#ASPNETCORE_Kestrel__Certificates__Default__Path: /https/aspnetapp.pfx
EX_RunJobsInProcess: 'false'
ports:
- 5000:80
- 5001:443
volumes:
- /data/exceptionless/appdata:/app/storage
- /data/exceptionless/ssldata:/https
jobs:
depends_on:
- app
image: exceptionless/job:6.1.0
container_name: exceptionless-job
environment:
EX_AppMode: Production
EX_BaseURL: http://localhost:5100
EX_ConnectionStrings__Cache: provider=redis
EX_ConnectionStrings__Elasticsearch: server=http://elasticsearch:9200
#EX_ConnectionStrings__Email: smtps://user:password@smtp.host.com:587
EX_ConnectionStrings__MessageBus: provider=redis
#EX_ConnectionStrings__Metrics: provider=statsd;server=statsd;
EX_ConnectionStrings__Queue: provider=redis
EX_ConnectionStrings__Redis: server=10.6.66.*:6379,password=***,defaultDatabase=1,abortConnect=false
EX_ConnectionStrings__Storage: provider=folder;path=/app/storage
volumes:
- /data/exceptionless/appdata:/app/storage
elasticsearch:
image: exceptionless/elasticsearch:7.7.1
container_name: elasticsearch
environment:
discovery.type: single-node
xpack.security.enabled: 'false'
ES_JAVA_OPTS: -Xms1g -Xmx1g
ports:
- 9200:9200
- 9300:9300
volumes:
- /data/exceptionless/esdata7:/usr/share/elasticsearch/data
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana:7.7.1
container_name: kibana
ports:
- 5601:5601
mkdir /data/exceptionless/esdata
chmod 777 /data/exceptionless/esdata
docker run -it -d -p 5000:80 -p 5001:443
-e EX_AppMode=Production
-e EX_ConnectionStrings__Cache="provider=redis"
-e EX_ConnectionStrings__Redis="server=10.6.66.237:6379,abortConnect=false"
-e EX_ConnectionStrings__Elasticsearch="server=http://10.6.66.237:9200"
-e EX_ConnectionStrings__MessageBus="provider=redis"
-e EX_ConnectionStrings__Queue="provider=redis"
-e EX_RunJobsInProcess=false
--name exceptionless
-v /data/exceptionless/esdata:/usr/share/elasticsearch/data
exceptionless/exceptionless:6.1.0
#参考:https://github.com/exceptionless/Exceptionless/wiki/Self-Hosting
#注:redis可以单独制定一个db