php-fpm to dokply

so, i already creating a docker image using github actions, and i push it to the docker repository ghcr.io after that, i create project in dokploy and i choose docker image. in provicer, i choose docker, i input the docker image, registry url, username, and password. when i click deploy, it's status is green. the deployment is success. i already filled my domain name, but i can not access my web. when i read the forum, php fpm can not be deployed directly using traefik. is there any extra configuration that i need to do to deploy my laravel docker image with php-fpm using dokploy? Thanks
6 Replies
niznet
niznet2mo ago
I just use Nixpacks and deal with it instead of trying to build the project with dockerfile. then create another same project for queue worker and use system cronjob to trigger scheduler. if you wish to have preview deployments, then create a production branch, I believe, every PR should automatically trigger dokploy to create a deployment preview. though, app_url is kinda tricky one for deployment preview since traefik subdomain created dynamically, unless you make a fixed subdomain from your own domain. it's better to do with nixpacks or railpacks for backend language that requires a internal webserver to connect with the backend language, for docker, so far, I only use dockerfile for js based deployment, rest are with nixpacks or railpack (when it work)
sameowrai
sameowraiOP2mo ago
do you have any documentation that i can read? I am using docker, sucess build, but it seems the dokploy seve https but always redirect to http. it awfull that i can not deploy my laravel project using docker and dokploy.
niznet
niznet2mo ago
niznet
niznet2mo ago
make sure app_url have https protocol, or you can also force laravel to use https like,
if($this->app->environment('production')) {
\URL::forceScheme('https');
}
if($this->app->environment('production')) {
\URL::forceScheme('https');
}
put it in the AppServiceProvider at the boot() method
sameowrai
sameowraiOP2mo ago
Thanks! I already input https But i dont know why it’s always return http wehem requesting asset Btw i use laravel 12 and inertia.
Henrique
Henrique2mo ago
I had this problem to solve it use this $middleware->trustProxies(at: '*'); bootstrap/app.php
No description

Did you find this page helpful?