I’m trying to deploy my elasticsearch docker container on fly.io cloud service. As i have understood till now is that first of all:
Fly.io doesn’t allow working with docker-compose files making it harder to work with.
You can only work with Dockerfiles when deploying to the service.
So i am deploying my Elasticsearch container to the same but i want to maintain persistent storage so that the data doesn’t get lost when the container is restarted.
For maintaining persistent storage, Fly offers ‘volumes’ to attach to Docker container. And the data in the elasticsearch container which will be used for persistant storage will be at location:
‘/usr/share/elasticsearch/data’. I want to know how can i attach the volumes to the Dockerfile so that the data will remain persistant and will be accessible when the container restarts.
Hey thanks for your reply. But how will it be connected to the data folder in the running elasticsearch container? do i have to mention that in the destination? like this: