Automate your deployments on Heroku easily.
In dashboard:
You can copy the link of this repository and paste it in buildpacks or write diezep/flutter and will be added automatically.
In Heroku CLI:
$ heroku buildpacks:set diezep/flutter -a <Heroku App name>
You can add optional environment variables to customize the deployment of your project but nothing is required, all are optional.
All variables were built following the structure FLUTTER_VARNAME to identified easily in Heroku configurations. If you want to use some variable, remember use the structure following to the variable.
Variable | Type | Default | Description |
---|---|---|---|
CLEANUP | boolean | true | Remove uneccessary files of your project after the compile. |
VERSION | string | Last version in stable channel. | The name of the version you want to use to compile the project. |
BUILD | string | flutter build web --release --quiet | Customize the command to compile the project. |
Example of setting CLEANUP var in Heroku CLI:
$ heroku config:set FLUTTER_CLEANUP=true -a project-name
The next image is an example of setting environment variables following the structure mentioned above :
This buildpack is unofficial that means i don't have any conection with Heroku or Google from Flutter developer team . This repository was made as a hobby, i'm always interested in learn new things, this is one demostration of that :)
Recently, @ludwiktrammer developed a lighter version of this buildpack with some improvements, if you are having problems with size of project or you are using Heroku CI, i invite you to test it. here's the repo