-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add heroku #16
Add heroku #16
Conversation
Hey there, thanks a lot for your contribution, I'm really happy seeing people using this and wanting to make this better. However, I'm not really planning on adding a Heroku deploy button because Heroku has an ephemeral filesystem. This is a problem because this bot requires a LevelDB file which acts as a database to save every guild's settings, as well as a cache to see which offers have been notified about already. This bot is not suitable for Heroku unless the database backend is changed from an embedded to a serviced database, which I am not really planning on implementing yet since it would greatly increase the self-hosted complexity of this project. I'm sorry, I'm gonna have to close this, but thank you very much for this contribution! 😄 |
True, I did not see that levelDB was used, so yes ephemeral filesystem make the db dumb. If I set a detection for |
Yeah, the first thing that came to mind was Redis (at least for the cache part), but there's also the issue that Redis isn't really a persistent data store, more like a key-value memcache, so technically it wouldn't really replace the database. |
I do not get "Redis isn't really a persistent data store". Redis does snapshot time to time (~1h). Thus, only last hour will be lose in case of power outage. Not a big deal when self hosting for one/few server in my opinion. For 'medium' hosting, levelDB can be still used. And for a 'large' hosting', a proper database with shards and replicas should be used, but maybe this is not the purpose on short term ^^. |
Redis isn't persistent as in, if te Redis service is closed, all its data is cleared because Redis stores its data in RAM. I need the data to be persistent, as in, to stay there across restarts. |
TO my knowledge, if Redis is properly closed, the data is saved to the disk. If closed by a power outage, only the last snapshot will be used. https://redis.io/topics/persistence |
You're right, Redis has different backup methods that can somewhat help to persist data, though I still don't think it makes up for a good database alternative because Redis is not a database but a memcache. In any case, I think that the initial motivation to suggest Redis was for this project to be used in Heroku, but it seems that Redis for Heroku does not support snapshots in its free tier. |
Web will idle after 30min without incoming request. Service will run permanently.
Hi, Is it possible to re-open this PR ? I have a version with postgresql which is fully functional (with auto deploy). I tested it over a month and I had all the notifications as the levelDB version running on the discord server moonstar (even |
Hi, Are you implementing a Postgres DataProvider? I kinda want to keep LevelDB as the primary database because it's really simple to use on self-hosted systems that can have stateful storage. I don't mind adding support for Postgres as long as its use would implement the DataProvider interface so no changes have to be made in the files that consume In any case, I'm going to re-open this PR but I won't merge it yet because there isn't any change that will make it work on Heroku. |
Update: I didn't see the file changes. You must have pushed something while I was writing my reply. Let me check this during the weekend and I'll let you know. |
Postgres is used only if Update: You can also test it on your own (thk auto deploy ^^) during several weeks, it is not urgent, we have time :) |
Bump ? |
Hi, sorry I haven't been able to check this. College has gotten way too much of my time and I barely have time to maintain this. The thing is that I need quite some time to check your PR especially because it doesn't contain any tests. :/ |
https://blog.heroku.com/next-chapter Well this PR will lose some interest since Heroku stop his free plan... |
Hi, so I'll be closing this PR for the following reasons:
|
📝 Checklist
Make sure that your PR fulfills these requirements:
📄 Description
Add button for auto deploy in Heroku and related configuration files.
📌 Does this PR address any issue?
No.