How to change the data storage directory
Closed this issue · 3 comments
I deploy according to the docker-compose.all-in-one.yml file,
It can be deployed successfully and everything is normal. But he can only use the default disk of the system. I cannot switch to the newly installed disk.
Crash when the system default disk is used up。
I created a ubuntu VM in azure, the default is 30G. I mounted a new disk, but I don't know how to switch the service to the newly mounted disk.
My new disk is "datadrive". What configuration can I add in docker-compose.all-in-one.yml to store data in "datadrive"? I want to store all data in "datadrive"
That docker file you are pointing to is only storing the data inside of the container and will be lost when you should the container down. If you want to persist the data then you need to map the data directory to a volume in the compose file like this one does: https://github.com/exceptionless/Exceptionless/blob/master/samples/docker-compose.yml#L58 The docs talk about it here as well: https://exceptionless.com/docs/self-hosting/docker/
I added this sentence, but the data is still not stored in "datadrive"
`version: '3.5'
services:
elasticsearch:
image: exceptionless/exceptionless:latest
ports:
- 5000:80
- 9200:9200
- 9300:9300
volumes:
- esdata7:/datadrive/share/elasticsearch/data
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana:7.12.0
ports:
- 5601:5601
volumes:
esdata7:
driver: local
appdata:
driver: local
ssldata:
driver: local
`
The picture below is the file in my real environment
The volume name is: esdata
, and you wouldn't redefine the volumes at the bottom as you need to update the volume for the image:
services:
elasticsearch:
image: exceptionless/exceptionless:latest
ports:
- 5000:80
- 9200:9200
- 9300:9300
volumes:
- esdata:/datadrive/share/elasticsearch/data
Please let us know if you have any questions.