feat: ajoute un cron CleverCloud pour rebuild quotidien à minuit
This commit is contained in:
parent
f7ab4d5f71
commit
1bc75fc2f0
2 changed files with 13 additions and 0 deletions
3
clevercloud/cron.json
Normal file
3
clevercloud/cron.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[
|
||||||
|
"0 23 * * * $ROOT/clevercloud/rebuild.sh"
|
||||||
|
]
|
||||||
10
clevercloud/rebuild.sh
Executable file
10
clevercloud/rebuild.sh
Executable 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}\"}"
|
||||||
Loading…
Add table
Reference in a new issue