-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from diezep/develop
Update README.md
- Loading branch information
Showing
1 changed file
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,62 @@ | ||
# Heroku × Flutter | ||
Compile and deploy your Flutter Web projects automatically on Heroku easily. | ||
# Heroku Buildpack for Flutter | ||
 | ||
Automate your deployments on Heroku easily. | ||
|
||
## 🔨 Setup | ||
#### 1. Add this buildpack in your Heroku app. | ||
|
||
#### Add this Buildpack in your Heroku app | ||
|
||
You can copy the [link](https://github.com/diezep/heroku-buildpack-flutter) of this repository and paste it in buildpacks or write **diezep/flutter** and will be added automatically. | ||
#### 2. Add PHP buildpack in your Heroku app. | ||
Is necessary add PHP buildpack **after** this buildpack. | ||
|
||
PHP Buildpack is needed to run the static files in a web service that can be opened in browsers. | ||
*You can skip this step if you have another way to deploy statics files, like NodeJS, Flask..* | ||
|
||
#### **IMPORTANT:** | ||
#### Optional | ||
|
||
You can add optional [environment variables](#--environment-variables) to customize the deployment of your project but nothing is required, all are optional. | ||
|
||
#### Problems to compile | ||
By default, this buildpack get the **last version** of Flutter automatically, sometimes because is on beta channel, that version may have problems to compile a project with web support. | ||
|
||
If this is your case, you can try downgrade the Flutter version manually, add FLUTTER_VERSION variable in your Heroku environment with the number of the most recent version that are currently working correctly. | ||
|
||
**[UPDATED] Last working version:** 1.19.0-4.3.pre | ||
**Last working version :** 1.19.0-4.3.pre | ||
|
||
## 🚩 TODO : | ||
|
||
### Environment variables : | ||
|
||
* [x] VERSION to set the name of custom version of Flutter. | ||
* [x] CLEANUP to remove uneccessary files after the build. | ||
* [ ] CACHE to remove and download every file its need to compile the project in every deploy. | ||
* [ ] SUBDIR to ubicate the project if it isn't in a root directory. | ||
|
||
### Features : | ||
|
||
* [x] No more PHP Buildpack needed. | ||
* [x] Save and restore Flutter and Dart SDK in cache. | ||
* [x] Save and restore [dhttpd](https://github.com/diezep/dhttpd) in cache. | ||
* [ ] Save and restore project dependencies needed in cache. | ||
|
||
## 🚧 Environment variables: | ||
|
||
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* | <center>true</center> |Remove **uneccessary files** of your project after the compile. | | ||
| VERSION | <center>*string*</center> | *Last version in [beta channel](https://flutter.dev/docs/development/tools/sdk/releases?tab=linux).* | The **name of the version** you want to use to compile the project.| | ||
|
||
### Set variable | ||
Example of setting CLEANUP var in Heroku CLI: | ||
```shellscript | ||
$ heroku config:set FLUTTER_CLEANUP=true -a project-name | ||
``` | ||
### Example | ||
|
||
The next image is an example of setting environment variables following the structure mentioned above : | ||
|
||
 | ||
|
||
<!-- TODO: ## 📌 LICENCE --> | ||
<!-- TODO: ## 📌 CONTRIBUTE --> | ||
|
||
And that's it, your web page will be ready in a few minutes. | ||
## 📝 Final note | ||
This buildpack is unofficial that means i don't have any conection with Heroku or Google from Flutter developer team <!--Although I would like belonging to any of the two :D -->. This repository was made as a hobby, i'm always interested in learn new things, this is one demostration of that :) |