This repo holds the code for the MyEnergy app and the scripts to build it.
See the repositories simt-myenergy-gh-pages-qa and simt-myenergy-gh-pages-prod. Build code is pushed to there and deployed to github pages which is where the app gets hosted.
Install:
The version used by the project is in .flutter-version.
To upgrade edit the .flutter-version file and run:
fvm use 3.35.7
fvm global 3.35.7You may need to update the vscodium settings file too:
"dart.flutterSdkPath": ".fvm/versions/3.35.7",
Add the following to /etc/hosts:
127.0.0.1 local.waterlilies.energy
127.0.0.1 local.hazelmead.energy
Run:
bin/build-local
bin/run-local [hmce]In github dashboard:
- create 2 environments - "hmce" and "wlce" and for each
- create a rule under "deployment branches and tags" that limits to only tags that match "-hmce" and "-wlce" respectively
- create a secret FLY_API_TOKEN for each environment with
fly tokens create deploy --name github-action-deploy-<env> --config fly/fly-<env>.toml
fly --config fly/fly.<esco>.toml launch --org microgridfoundry --copy-config
fly --config fly/fly.<esco>.toml scale count 1Tag and push tag to trigger a deploy. eg. 1.0.0-wlce will deploy the wlce app from the given tag.
see the github workflow file deploy.yml for how this works.