I was wondering if there is a method for having an application which is not auto-deployed, but is deployed via a start/stop rule to rebuild using the latest HEAD of a branch on startup?
Is there a best practice for enforcing that the app is rebuilt every morning? Would that just be writing a custom lifecycle job?
Curious if this is a use case you all have supported previously or have thoughts on.
Hi @piuggi , excellent question. Thanks for asking.
In your case, I’ll definitely use a Job to force your app to be rebuilt every. But instead of a Lifecycle Job, I will use a Cronjob.
Here are the steps to follow:
Create a project tooling (for example, you can give the name you want).
Inside this project, you create an environment prod.
Then you add a Cronjob app redeployer with the cron expression * 8 * * * to redeploy your app every day at 8 am. (be careful - it’s UTC, so you need to convert to the appropriate time)
Here are a quick example of how to use the Qovery Python client.
if __name__ == '__main__':
configuration = qovery.Configuration(access_token='your Qovery API Token')
qovery_client = qovery.ApiClient(configuration)
# get my organization
org = organization_main_calls_api.OrganizationMainCallsApi(qovery_client).get_organization('my-org-uuid')
# get the name of my organization
org.name
I hope it helps. Let me know if you have further questions.