budget
budget copied to clipboard
Create Docker image that includes database and PHP without seperating it, similar to LSIO containers
Linuxserver.io containers (or LSIO for short) run some of the most popular docker containers in the world, with billions of pulls. One of the main reasons for this is because they make it incredibly easy for users to run the containers: you won't need to run seperate databases. nginx and PHP version for every app - instead, the bundle everything inside the container in the most lightweight OS possible, while still allowing you to set things like PGID and PUID for easy permission mapping as well.
My request is that you change the docker container to contain the database + nginx + PHP, instead of requiring them as seperate containers. This will make it so much easier to maintain and oversee for users, especially those that run multiple containers, and makes it much easier for yourself to troubleshoot things too, as you won't have to worry about dealing with botched installs of PHP, nginx, etc, as it will all be included within your container.
See here for more info: https://docs.linuxserver.io/general/understanding-puid-and-pgid
Heimdall is a good example of a web app that already includes nginx and other dependencies, making it a breeze to install for users: https://docs.linuxserver.io/images/docker-heimdall
I think this would make it much easier for people to start using Budget.
Great idea, this would really improve the OOTB experience.
I would advice against adding a database though, at least not as a default. Maybe we can go for an image with nginx + php and provide a "quick start" docker-compose.yml with the other dependencies like mysql and redis?
I could whip up something real quick if no one else is working on smth already?
Sure, that'd be cool!
I heard that it's useful to keep the database in a separate Docker image tho, so you can easily back it up, what's your stance on that? Seeing as you're an advocate of having everything in a single image..?
Totally, a different container should be the way to go. The same for redis.
We should not shoehorn users into running an included database server if they already got one running, backed up, maybe on a more powerful host..
If someone really wants a database included, they can just grab the docker-compose.yml and run the app, with the database, redis etc.. Still separate images, but at least it's quick to get started.
First things first tho, a production ready image with nginx + php, and after that we can tweak the docker-compose if necessary.
Agreed.
I'm quite a pleb when it comes to Docker (as you can probably see by the Dockerfile 😛). You wanna take this on?
Got it. I'll start hacking on a Dockerfile asap and let you know ;)
+1 for keeping the database separate but merge the webserver (Apache and/or nginx) and php.
If your not familiar with docker maybe you could ask for help over at LSIO (Linuxserver.io) I guess that they would love to help a fellow developer
Separating the database makes sense. Thanks for working on this, this should make it easier for everyone to manage. Also, please make sure to allow users to set PGID and PUID as well for easy permission mapping. See here for more info: https://docs.linuxserver.io/general/understanding-puid-and-pgid
I hope a docker installation steps would be published soon as I want to try Budget from few weeks now, but I'm using Unraid and can't use the docker-compose method :(
Any progress on this request?
I will continue with this tonight, and hopefully make a decision rather soon.
Alright, there are 2 images, which I'm going to attempt to summarize and compare in this comment.
There is #170, made by @saschahemleb.
- Uses Supervisor (which I am, but I assume many others are too, quite familiar with)
- Specifies the version number for the programs we need (Composer, Yarn, NGINX, etc.)
- Seems to utilize multi-staging
And there is #169, made by @jbrunink.
- Uses s6, which I am not quite familiar with
- Doesn't seem to utilize mult-staging
If I had to choose, I'd go for @saschahemleb's PR, because it seems easier to use and maintain. However, since I am not an expert on Docker, I'm going to ask you guys to vote as well.
🎉 for @saschahemleb's PR, 🚀 for @jbrunink's PR
Whichever PR will be picked, I want to thank both authors for their contribution. I appreciate it.
How can I test the image from @saschahemleb?
I would love to test it too :+1:
Any progress to report on this issue/request?
Ah, yes. I shall revisit this soon, thanks for bringing it up (kinda lost track 😰 ).
I didn't dare to talk about it .... haha Great news !
Apologies for asking again but what is the status on this request? Any progress? Can we expect a image soon or is this a long term implementation?
Apologies for the delay. I tested it again tonight, and it works. Apart from some cosmetics (code style, etc.) it's approved from my side. I'll try and get in touch with @saschahemleb to finalize this.
@BobWs perhaps you can try his branch and let me know if it works for you?
Apologies for the delay. I tested it again tonight, and it works. Apart from some cosmetics (code style, etc.) it's approved from my side. I'll try and get in touch with @saschahemleb to finalize this.
@BobWs perhaps you can try his branch and let me know if it works for you?
Okay I could test his branch. Where can I find it?
In his fork. However I haven't been able to get in touch with him.
I have recently gotten more experienced with Docker myself so I'm attempting my own PR. I will keep you updated.
@BobWs you are free to check out #267 and take it for a test drive.
@BobWs you are free to check out #267 and take it for a test drive.
Thanks I will give it a spin and let you know if it is working for me.
@BobWs you are free to check out #267 and take it for a test drive.
So where can I find the docker image?
So where can I find the docker image?
It should be the Dockerfile and docker-compose.yml in the PR that I referenced above. Check out the README.md for the latest instructions on how to get it running.
Closing this, as we have a (seemingly working) Docker setup now.