Widemesh Builds with Buildpacks
Formula: Buildpacks
The buildpack
formula automatically detects and builds source code for most programming languages without any intervention using buildpacks.
This formula follows the Procfile
file in the source code and maps Heroku Process Types to Widemesh Services, and keeps its commands in sync.
Note: If you don’t have a Procfile in your source code, the buildpack detected for your source code will generate one for you to run as a web application listening on $PORT
The web
process type
In Widemesh, all services are private by default except when the buildpack formula detects a web
process type in the Procfile, which gets automatically published through the platform alias endpoint of the environment; it does not automatically publish to Custom Domain Endpoints.
The release
process type
The release process type indicates the command Widemesh should run on every new deployment, which can be useful for tasks such as:
- Running database schema migrations
- Uploading artifacts compiled in the build process to an external system
If a stack release command fails, the new build is not applied to its services, leaving your current workloads unaffected.
Example Procfile
with release
command:
web: bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}
release: bundle exec rake db:migrate
Supported Languages
The buildpacks support the following languages out of the box:
- Ruby
- Node.js
- Python
- Java
- PHP
- Go
Builders
Widemesh currently supports two builders matching the latest Heroku stacks:
heroku/buildpacks:18
heroku/buildpacks:20
To set the builder in a stack with the CLI:
mesh stack buildpacks set-builder heroku/buildpacks:20
Custom Buildpacks
In addition to the built-in buildpacks for Supported Languages, you can also use Custom Buildpacks from the following sources:
- Github repositories (e.g.
https://github.com/heroku/heroku-buildpack-go.git#v149
) - Heroku Registry(e.g.
heroku-community/awscli
) - Heroku Buildpack shorthand(e.g.
heroku/go
) - URL to tar gunzip (e.g.
https://buildpack-registry.s3.amazonaws.com/buildpacks/aissaoui-ahmed/vim.tgz
)
Once you deploy your app successfully, the platform sets the detected buildpacks permanently for future pushes to your stack; you can see the list of detected buildpacks as follow:
mesh stack info
Builders process buildpacks in an orderly fashion. Widemesh provides a command to insert a buildpack at a given position:
mesh stack buildpacks insert --index 0 --buildpack heroku-community/awscli
mesh stack buildpacks insert --index 1 --buildpack heroku/nodejs