App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to publish code directly to DigitalOcean servers without worrying about the underlying infrastructure.
App Platform supports two ways to build an image for your app: Cloud Native Buildpacks and Dockerfiles.
When you give App Platform access to your code, it defaults to using a Dockerfile if one is present in the root of the directory or specified in the app spec. Otherwise, App Platform checks your code to determine what language or framework it uses. If it supports the language or framework, it chooses an appropriate resource type and uses the proper buildpack to build the app and deploy a container.
heroku-buildpack-php is utilized as the buildpack for detecting and building your PHP applications.
App Platform looks for any of the following to detect a PHP application:
composer.json
index.php
composer.json
by your app or a dependency. To configure the version used for your app, add a php
dependency to composer.json
like so:{
"require": {
"php": "^8.0.0"
}
}
Composer versions 1.x and 2.x are supported. App Platform will determine the version to use based on the version of Composer that generated the composer.lock
file. Generally, you can update your project by running composer update --lock
using Composer 2.