How to save the database of the workflow definition and the tasks definition when restart the docker containers.
Hi,
I run it with docker-compose up, it will be start 4 containers, when it close with Ctrl-c, or docker-compose down, it will be down docker_elasticsearch and docker_dynomite, and restart with docker-compose up, the stores is clean.
When i set es volumes for es data to save node to disk like this
volumes:
- ./esdata:/usr/share/elasticsearch/data
It does not work for it .
How to do or how to think about it ?
Thanks!
Hey @suxiaoyuv if you did ctrl+c (and not docker-compose down) you can run docker-compose start from that same directory and the containers should come back up. You can bring the containers down again with docker-compose stop
docker-compose down will remove the containers. Thus they cannot be restarted as above
You can see the stopped containers using docker ps -a
Hope this help! Let me know if this solves your problem
Thanks @jcantosz , that is right. But i want to know about how to save the database of the workflow definition and the tasks definition when restart the docker containers. Possible representation is not clear. Please forgive me.
Edit: A quick test showed restarting the dynomite container on its own causes all of its data to be cleared (or at least not accessible by the conductor server or ui). Restarting other containers did not appear to have this same effect. This is probably the place to begin debugging
I took a closer look at this today, and found that restarting the stopped compose seemed reset the DB (added a task and on compose stop + compose start I no longer saw that task). I found that starting & stopping just the conductor:server did not have this result. I haven't had a chance to look into mounting docker data volumes for dynomite & elastic, but I imagine this is what you are seeing.
I'll do a some more poking around, but I think @v1r3n will know more about why the data is not persisting.
And i have two questions:
- Is dynomite db save data in memory?
- ES will be clear data directory when start, why?
Thanks!
- Dynomite uses redis which uses in memory store. There are options to configure AOF persistence and keep the data onto disk, but that is not the purpose of this docker image which is meant for quick trying out. For production usage, consider deploying dynomite in a high availability mode.
- ES image used in the docker compose is the official elasticsearch image provided by Elastic. We have little control over how it works.
Thanks!
- Dynomite uses redis which uses in memory store. There are options to configure AOF persistence and keep the data onto disk, but that is not the purpose of this docker image which is meant for quick trying out. For production usage, consider deploying dynomite in a high availability mode.
- ES image used in the docker compose is the official elasticsearch image provided by Elastic. We have little control over how it works.
I could not find anything related to AOF with dynomite and docker-compose files... Could you please give an example or a tutorial link?
I tried:
dynomite:
image: v1r3n/dynomite
restart: always
networks:
- internal
ports:
- 8102:8102
command: ['redis-server', '--appendonly', 'yes']
volumes:
- dynomite_redis:/data