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

Sync two (or more) hood.ie servers #547

Open
ooii opened this issue Sep 4, 2019 · 7 comments
Open

Sync two (or more) hood.ie servers #547

ooii opened this issue Sep 4, 2019 · 7 comments

Comments

@ooii
Copy link

ooii commented Sep 4, 2019

Is there any way to run two instances of hood.ie servers that keep in sync?
Hood.ie is based on couchdb which has a built-in sync feature. Is it used by hood.ie?
I see that there is a replicate function, how can I use it?
Thanks.

@pmbanugo
Copy link
Member

pmbanugo commented Sep 4, 2019

I think that would be configuring continuous replication between the two DBs. Hoodie doesn't have this feature AFAIK, so you'll manually set this up.

@ooii
Copy link
Author

ooii commented Sep 4, 2019

Thanks for your answer.
I was editing my question probably while you're answering. I added a link to the api server replicate function.
How one could configure continuous replication between the two DBs? Can we configure hood.ie's database?

@pmbanugo
Copy link
Member

pmbanugo commented Sep 4, 2019

You can try that but I haven't used it and don't know how that works from the store api. Hoodie is not a database, it's backed by CouchDB or some other database that implements the couchdb replication protocol. You are likely to connect it to a CouchDB instance you've setup or use Cloudant (hosted couchdb). Otherwise, I guess you're using the default config which I think sets you up with an in-memory data store. If you choose to set up a CouchDB instance or use Cloudant, this video can explain how to set up replication between servers

https://www.youtube.com/watch?v=uGcxFHZsy10

@ooii
Copy link
Author

ooii commented Sep 4, 2019

You're absolutely right, I'm using the in-memory data store. I'll connect it to a CouchDB instance, try, and comeback here to report.
Thanks again.

@ooii
Copy link
Author

ooii commented Sep 4, 2019

Do I need to create the database myself or hoodie will do that at first start?
I have a running couchdb instance and hoodie has the right credentials. But when starting it, it ends with Error: Could not set necessary CouchDB config. I don't see in the config doc any field to provide database name.
BTW: thanks for your phonebook app tutorial, well written and very good help.

@pmbanugo
Copy link
Member

pmbanugo commented Sep 5, 2019

you don't have to create the databases yourself. Just give hoodie config options so it knows how to connect to the DB. I guess you're missing some config that's why you're getting that error. check the documentation for details on config

@ooii
Copy link
Author

ooii commented Sep 5, 2019

Thanks @pmbanugo. I'm digging.

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