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

Data loss with docker instructions #2654

Open
axelson opened this issue Dec 20, 2019 · 3 comments
Open

Data loss with docker instructions #2654

axelson opened this issue Dec 20, 2019 · 3 comments

Comments

@axelson
Copy link

axelson commented Dec 20, 2019

Is it expected that you would lose your data if you run via docker with docker run -it -p 3000:3000 huginn/huginn and close and restart the process.

@dsander
Copy link
Collaborator

dsander commented Dec 20, 2019

Not directly, the README has this:

NOTE: If you do not export the volume, or use a separate database container, you cannot update Huginn without losing your data.

In your case the data isn't gone yet. docker ps -a should list your previous container and you can start it again using docker start <containerid>.

@axelson
Copy link
Author

axelson commented Dec 22, 2019

Ah, ok. I'm glad that my data still exists! I didn't notice that message when installing Huginn initially (and I want to work on a PR to update the installation instructions). Quick question, if I continue running Huginn with docker start <containerid> the data will be okay until I update Huginn?

And if I want to use the docker installation of Huginn with an already running external postgres instance is it just a matter of passing HUGINN_DATABASE_USERNAME, HUGINN_DATABASE_PASSWORD, and HUGINN_DATABASE_ADAPTER to the docker instance?

@dsander
Copy link
Collaborator

dsander commented Dec 22, 2019

Quick question, if I continue running Huginn with docker start <containerid> the data will be okay until I update Huginn?

It will, but getting the data out of the container is not easy.

And if I want to use the docker installation of Huginn with an already running external postgres instance is it just a matter of passing HUGINN_DATABASE_USERNAME, HUGINN_DATABASE_PASSWORD, and HUGINN_DATABASE_ADAPTER to the docker instance?

Yes, this should work:

docker run --rm --name huginn \
    -p 3000:3000 \
    -e DATABASE_USERNAME=huginn \
    -e DATABASE_PASSWORD=mysecretpassword \
    -e DATABASE_ADAPTER=postgresql \
    -e DATABASE_HOST=iporhostnameofpostgres \
    -e DATABASE_NAME=huginn \
    huginn/huginn

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