Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get data to persist #138

Open
cgd1 opened this issue Jul 18, 2018 · 6 comments
Open

Unable to get data to persist #138

cgd1 opened this issue Jul 18, 2018 · 6 comments

Comments

@cgd1
Copy link

cgd1 commented Jul 18, 2018

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

@jjethwa
Copy link
Owner

jjethwa commented Jul 18, 2018

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

  1. filesystem method for storing projects needs /var/rundeck. Note: Rundeck now uses the database for this by default (Configured via RUNDECK_PROJECT_STORAGE_TYPE)
  2. filesystem method for key storage needs /var/lib/rundeck/var/storage (Configured via RUNDECK_STORAGE_PROVIDER)
  3. Extra plugins /opt/rundeck-plugins
  4. Rundeck logs /var/logs/rundeck

@cgd1
Copy link
Author

cgd1 commented Jul 18, 2018

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

@jjethwa
Copy link
Owner

jjethwa commented Jul 18, 2018

@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.

@cgd1
Copy link
Author

cgd1 commented Jul 18, 2018

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

@jjethwa
Copy link
Owner

jjethwa commented Jul 18, 2018

@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>

@jjethwa
Copy link
Owner

jjethwa commented Jul 31, 2018

Hi @cgd1

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants