Supported languages
We support the following application languages for Buildpacks:- Node.js
- Ruby
- Python
- Java
- Scala
- PHP
- Go
Configure Buildpacks
Some applications require no configuration, but some require specialized commands and options to run, such as: Environment variables — You may need to set certain environment variables to run your application. Processes — Sevalla can automatically detect your web process command. You can change this if required, and you can define additional processes. Processes in a Procfile — You may want to define your processes in a Procfile within your application’s code.Add or edit Buildpacks
You can manage buildpacks on your application’s Settings page. You can add additional build packs within **Build strategy **> Update build strategy > Add buildpack. When you add a buildpack, it’s automatically added to the end of the buildpacks list, so you may need to edit the order of your buildpacks. You can drag and drop the buildpacks to change their order, or remove buildpacks within Build strategy > Update build strategy.Buildpack binary directories
With buildpacks, the binary directories may differ from the default binary directories for the application language. The following table shows the binary directories used for each buildpack language:| Language | Directory |
|---|---|
| Node.js | /layers/heroku_nodejs-engine/dist/bin/node |
| Ruby | /usr/bin/ruby |
| Python | /usr/bin/python |
| Java | /layers/heroku_jvm/openjdk/bin/java |
| Scala | Scala doesn’t have a specific default binary path like some other compiled languages. When you compile a Scala program, it generates bytecode that runs on the Java Virtual Machine (JVM). The compiled Scala classes are typically stored in a directory structure that mirrors the package structure of your code. This is similar to how Java classes are organized. By default, when you compile a Scala source file, the compiled .class files will be placed in the same directory as the source code (within a subdirectory structure based on the package declarations). If needed, you can install Scala’s runtime tools using a Dockerfile instead of a buildpack. |
| PHP | /workspace/.heroku/php/bin/ |
| Go | Go doesn’t have a specific default binary path like some other compiled languages. When you compile a Go program, the resulting binary executable is typically placed in the same directory as your source code by default. If needed, you can install Go’s runtime tools using a Dockerfile instead of a buildpack. |
Set a Buildpack’s language version
When you select the option to use Buildpacks, if you do not specify a version in your application’s code, the Buildpack will use the latest available version. If you want to use a different language version for your application, you’ll need to set the version in your application’s files. The method for setting the version varies by language. Below we’ve included examples for currently supported languages.Go
To specify your Go version, include the following in your application’s go.mod file:Java
To specify your Java version, include the following in your application’s system.properties file:Node.js
To specify your Node.js and npm versions, include the following in your application’s package.json file:Specifying the npm version isn’t usually necessary (npm is bundled with Node.js). Setting the npm version is only needed when you want to use a different version than the one bundled with your version of Node.js
React
If you’re using React and want to specify your React version, replace or add the React version in thedependencies of your package.json file:
PHP
Buildpacks support the currently supported PHP versions; once a PHP version reaches end-of-life, it is no longer supported but remains available so you can upgrade your application to a newer version.
PHP.ini
You can change PHP.ini settings using a.user.ini file in the same directory as the .php file. For more information about which settings you can control, refer to the PHP manual.
A small set of PHP.ini configuration directives cannot be modified using .user.ini; for example, PHP_INI_SYSTEM. In this case, you must pass additional configuration settings for PHP at startup time using a custom configuration file fpm_custom.conf with the php_value and php_flag directives.
If you use a custom configuration file, you must tell your application to start with this configuration by adding -F to the start command. You can also use this configuration file to modify the PHP-FPM behavior.