By webclaus
I’m trying to change the document root when deploying a PHP app on the app platform.
I’ve tried committing a Procfile with:
web: heroku-php-apache2 docs/
…in order to change the doc root to docs/
(as per heroku docs on the topic)
It gets picked up during the deployment but doesn’t seem to take effect when running the app.
Any tips?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi,
Adding the directory to the command like you did is the right way to set the document root. The Run Command that is set in the component settings will override any run commands that are detected during the build process. It sounds even though your updated your Procfile, the run command is still set to the old one which was picked up when you first created your app.
You can update the run command in the Components tab on the app’s control panel page.
I put Procfile with content “web: vendor/bin/heroku-php-apache2 public/” and “force rebuild and deploy” on D.O site and that’s work’s for me.
Same times, only “force rebuild and deploy” works!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.