I think I remember hearing in some Eddie's livestream a suggestion about using Docker in this project. This issue is to start the conversation and discussion about this topic.
From my point of view, maybe we could simplify the development process of a new contributor, by enabling the use of a command like docker run eddiebot-image that has everything set up. The main challenge I see is settings up the Firebase Firestore database in this environment, but @stemount is an expert at DevOps so he could surely help in this regard 馃槃.
Let me know your thoughts 馃槂.
It鈥檇 be good if you could mock the firebase database. I find that the firebase element of this is a barrier to entry to the project but also a blessing for people to find PaaS.
A docker-compose solution was something I was cooking up the first thing is to get my dotenv PR in.
The bad thing about my dotenv solution is it breaks the flow it would break everyone鈥檚 solution if it didn鈥檛 support both... dunno if it鈥檚 just worth simplifying the README big time.
I found a Firebase Local Emulator Suite, maybe it will help running the app in a local environment.
@alrifay for sure, that's what I mean, if the container would mock Firebase firestore then it's a winner 馃檶馃徎
It looks like the emulator has come a long way since I looked at it a while ago 馃憤 . Before it was just functions, now it seems to have much more and the Firestore DB too - I was recently considering moving away from Firebase because the barrier to entry is quite high to get it set up for then first, second and maybe third time, then it becomes a bit easier.
+1 for Docker. Using Docker quite a lot and its extremely easy to build a container. Depending on how public it should be you may want to look into where to deploy (https://hub.docker.com, https://github.com/features/packages, etc.). Docker makes it a lot more reliable in my opinion, thanks to "auto restart on" etc.
@TECHNOFAB11 oh I forgot it could be hosted on GitHub 馃帀
@eddiejaoude I wasn't sure because Gitlab had this feature for some time, but Github seems to have it too. Im mainly using Gitlab so i often times dont realize which features Github has :D
But yeah, i guess Github is the best option here, especially as it probably is easier to deploy to using workflows (or however Githubs CI is called ^^) and people who are see the repo will directly be able to pull the image. Maybe its even possible to limit it to organization members, but you'll probably make it public either way :)
I do everything public 馃挭
@BOLT04 @TECHNOFAB11 @BOLT04 massively disappointed that the Firebase Emulation suite doesn't allow you to (without some dodgy hax, which I did try) just create a project (You still need valid online credentials - the documentation is super vague), I left the code in feature/add-dotenv-with-firestore-local or something for somebody if they wanna try and rescue that code, but it seemed to add little value to use a local DB if you use a test account anyway
@stemount I agree, when I tried the location emulator, I noticed that it added little value too - I wasted a lot of time on this. Since then there has been a major release though, I was hoping and heard that it was much better - maybe not?!
The only benefit from using Firebase is the realtime data (and the eco system is quite friendly), but I think offline mode and automated testing would be a great benefit to our projects - which would also lower the barrier to entry. Maybe there are some alternatives? Serverless is epic but doesn't work with WebSockets 馃槩
When dockerized you're basically free to use whatever DB you want. At least if it has a docker image. You can then just tell docker-compose to create the containers with the same network and you're completely offline. But I havent read a lot about firebase, so if there is a big benefit of using it switching to some other DB may be a bad idea :)
Switch DBs can be painful, but unfortunately Firebase is not open source, so there is no way to run it with or without Docker - it only runs on their live platform. I think any other DB would be a better choice for a DB.
I was excited by the realtime part of Firebase (Firestore), but it is not that important and we can run web sockets anyway if we need.
Most helpful comment
@BOLT04 @TECHNOFAB11 @BOLT04 massively disappointed that the Firebase Emulation suite doesn't allow you to (without some dodgy hax, which I did try) just create a project (You still need valid online credentials - the documentation is super vague), I left the code in feature/add-dotenv-with-firestore-local or something for somebody if they wanna try and rescue that code, but it seemed to add little value to use a local DB if you use a test account anyway