简体   繁体   中英

Dokku not deploying my PHP app

I am trying to deploy a PHP app to dokku. When I push the code, or run dokku ps:rebuild app the build process gets all the way to the end, and says

=====> Application deployed:
   http://app.example.com

However, visiting the address does not serve up the app and if I run dokku ls I get the following output:

-----> App Name   Container Type    Container Id    Status                   
       app        NOT_DEPLOYED      NOT_DEPLOYED    NOT_DEPLOYED 

I have other (django) apps already running fine, so I know dokku is working.

I'm running on dokku 0.5.4.

This is the Procfile:

web: vendor/bin/heroku-php-nginx -C nginx.conf

This is the .env file:

export BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php.git

There is a composer.lock file.

Having had a chat with a colleague, in this situation you need to set the scale for the app. It's often caused by pushing the app to dokku before running dokku apps:create <app> . (Although I don't think that was the case for this app, it was probably something similar.)

So if after you push the app and dokku initially says deployed but the app is not actually deployed, run this command:

dokku scale <app> <proc=amount>

Where <app> is the name of your app, proc is the process type, in my case it was web , and amount is the number of processes you require, in my case it was 1 . So my command looked like:

dokku scale app web=1

(This solution was mostly taken from this dokku elastic search issue .)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM