By telkins
Because App Platform doesn’t allow me to run composer config before composer install is executed, I have been told that I should use the other method of building an app: Dockerfiles (https://docs.digitalocean.com/products/app-platform/languages-frameworks/php/)
The problem is…there is no documentation. Nevermind that DO boasts about “robust documentation” and has had App Platform in the wild for well over a year. 😒
Anyway, I’d really like to get this to work, but I have no idea where to begin or what to do. The only thing I know is that I need a dockerfile.
DO support pointed me to this community, but my searches haven’t yielded anything valuable…perhaps because I’m not entirely sure what I should be searching for.
Thanks in advance for any help you might be able to provide. 🤓
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!
Hello, I’m attaching the App Spec Reference here if you haven’t already seen it: https://docs.digitalocean.com/products/app-platform/references/app-specification-reference/
Under the component type that you’re interested in building (service, worker, job… etc) you can find dockerfile_path
You would then put the Dockerfile path relative to the root directory of the repository in that field.
Here is an example of a dockerfile based app: https://github.com/digitalocean/sample-dockerfile
Here is an example of the app spec for the above example: https://github.com/digitalocean/sample-dockerfile/blob/main/.do/app.yaml
To deploy that, you would use doctl with the following:
doctl apps create --spec /path/to/app/spec
Alternatively you can use a registry such as Dockerhub or DigitalOcean Container registry. Here is a link to documentation for that: https://docs.digitalocean.com/products/app-platform/how-to/deploy-from-container-images/
Happy Coding! Greg
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.