rundeck
rundeck copied to clipboard
Unable to get data to persist
Hi - firstly, thank you for creating the repo, saved me some time!
What would be the best practice to get the container to retain data/settings after restart? Any assistance would be greatly appreciated
With respect Craig
Hi @cgd1
Thanks so much! 😄
I would suggest using volumes to persist your data across restarts and container updates. At the very minimum you need volumes for /etc/rundeck and /var/lib/mysql.
Optional or config dependent
- filesystem method for storing projects needs /var/rundeck. Note: Rundeck now uses the database for this by default (Configured via RUNDECK_PROJECT_STORAGE_TYPE)
- filesystem method for key storage needs /var/lib/rundeck/var/storage (Configured via RUNDECK_STORAGE_PROVIDER)
- Extra plugins /opt/rundeck-plugins
- Rundeck logs /var/logs/rundeck
Thank you for the timely response!
Ok, so at run, I need to add:
-v rundeck_data:/etc/rundeck
Like so:
docker volume create rundeck_data
docker run -p 4440:4440 -t rundeck3:latest -v rundeck_data:/etc/rundeck
@cgd1
That's correct. You should create separate directories for each volume so maybe something like
-v rundeck_etc_rundeck:/etc/rundeck -v rundeck_var_lib_mysql:/var/lib/mysql
or similar depending on how you like to organize things 😄 I also like to use exact paths just to make sure nothing weird happens.
I'm scratching my head here - I cant seem to get it top work
docker run -p 4440:4440 -t rundeck3:latest -v rundeck_etc_rundeck:/etc/rundeck -v rundeck_var_lib_mysql:/var/lib/mysql
Thats what I used, just doesnt seem to work - its working for other containers
@cgd1 do you see anything getting generated under the volume directories after starting the container? Are there any errors in the container logs?
docker logs <CONTAINER_NAME>
Hi @cgd1
Any updates?