feat: ajoute un cron CleverCloud pour rebuild quotidien à minuit

This commit is contained in:
Jalil Arfaoui 2026-03-27 17:44:29 +01:00
parent f7ab4d5f71
commit 1bc75fc2f0
2 changed files with 13 additions and 0 deletions

3
clevercloud/cron.json Normal file
View file

@ -0,0 +1,3 @@
[
"0 23 * * * $ROOT/clevercloud/rebuild.sh"
]

10
clevercloud/rebuild.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash -l
if [[ "$INSTANCE_NUMBER" != "0" ]]; then
exit 0
fi
curl -X POST \
"https://api-bridge.clever-cloud.com/v2/organisations/${CC_OWNER_ID}/applications/${APP_ID}/instances" \
-H "Content-Type: application/json" \
-d "{\"token\": \"${REBUILD_API_TOKEN}\"}"