When the Sophosia app checks for update, it request this server using the endpoint
https://sophosia-update-server.uc.r.appspot.com/<target>/<current_version>
This server grabs the latest release in sophosia repo and determine if the new release has different version number than the current_version
of the app. If version number is different, this server returns a list of update files for different platforms together with their download urls and signitures. Tauri will update itself according to the server response.
- Prepare the flask project.
- In
app.yaml
, add a lineruntime: python310
to specify the python runtime. - Add
requirements.txt
and add necessary dependencies,gunicorn
is needed to manage entry point. - In
main.py
, expose the app on host 0.0.0.0 and port 5000.
- Create a project on Google Cloud Platform.
- Add Cloud Build API.
- Download and install Google Cloud SDK.
- Initialize SDK and set our default project by doing
gcloud init
- Add AppEngine to GCP
gcloud components install app-engine-python
- Deploy
gcloud app deploy
- Browse app
gcloud app browse
After finish updating the app, to redeploy the app we simply do deploy it again,
gcloud app deploy