Dockerization for v4
Is there already sombody who made a Docker solution that can be shared?
I beleve MUST HAVE containers for avarage FilamentPHP project are:
- App (php-fpm)
- Database (PostgreSQL/MySQL)
- NGINX
- NodeJs
- Supervisor as separated container
- Redis
- Laravel Horizon
I will start on making it today, but if somebody already have solution he/she can legally share, would be happy to see it.
16 Replies
search for laravel docker envs. Since Filament runs inside a Laravel app, it will work with docker as well
serversideup/php
@Ricardo Sawir this one actually solved 90% of needs. Thank You! I'll share my solution later.
people still use docker for php apps, shesh.
Why not?
And what do you suggest to use? đź’€
@toeknee I'm also curious why you think Docker isn't suitable for PHP?
@Urbanist I'm using, and love, Laravel Sail FWIW
It's probably my more narrowminded view from my usecase. Dockers great, but more complex than it needs to be. Local dev is done with Herd / Database of choosing and deployments are done under Ploi, Forge, Voyre etc. No need to have multiple docker containers confingured / debug / compile with changes.
I guess it depends on the projects. For most of mine it's overkill, too.
But I also had projects where it was useful (lots of services) or no access to prod server.
Yeah absolutely it's very useful for exisiting projects and legacy applications hands done. I just would find it strange ti do it on a new project I suppose.
Well I have multiple developers, I 100% will have multiple integrations with other services my company sells, and I need to onboard new developers fast. Also it’s cool when all devs have same env with prod so I don’t hear “it works on my PC”.
Basically - Docker ❤️
Yeah that makes sense providing they can use Docker, some people really struggle with it. Your composer should ensure it is is the same setup though...
You composer does not ensure that.
Mac, Windows, Linux.
Herd, XAMPP, Valet, Laragon, Plain PHP + nginx
3rd party tools
Differents configs
....
Yeah for simple things Herd/etc can be handy - especially if you have Herd Pro and can use that to set your dependency versions too.
I'd say that's just a project-complexity thing though, nothing to do with PHP itself.
I think Laravel docker works well, but if you d like to use my php 8.2, you are welcome
zenepay/laravel-sail-php8.2
for Nginx I use "nginx:latest" , it works well for me.
For development I'd recommend DDEV, very easy to use for people new to docker when you commit the .ddev files, just ddev start
They have "addons" aswell to install things like gotenberg, redis. And xdebug is included, mailpit etc