fix wiki
This commit is contained in:
parent
788faa73e1
commit
15ffa62a02
29
docs/wiki.md
29
docs/wiki.md
@ -92,3 +92,32 @@ func encodeCreateGroupResponse(response CreateGroupRes, w http.ResponseWriter, s
|
||||
switch response := response.(type) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "https://card.syui.ai")
|
||||
```
|
||||
|
||||
### northflank
|
||||
|
||||
`cron`, `repo(private)`, `pass(token)`
|
||||
|
||||
```sh
|
||||
#!/bin/zsh
|
||||
|
||||
pass=password
|
||||
/usr/bin/northflank exec service --project $project --service $service --cmd "/app/data/api/backup.sh $pass"
|
||||
|
||||
function f(){
|
||||
rm /app/data/api/backup.sh
|
||||
echo '#!/bin/bash
|
||||
pass=$1
|
||||
git config --global user.email syui@syui.ai
|
||||
git config --global user.name syui
|
||||
cp -rf /app/data/new.sqlite /app/data/api/latest.sqlite
|
||||
cp -rf /app/data/new.sqlite /app/data/api/`date '+%w'`.sqlite
|
||||
cd /app/data/api
|
||||
git remote add origin https://$pass@github.com/ai/api
|
||||
git add .
|
||||
git commit -m backup
|
||||
git push origin main
|
||||
git remote rm origin
|
||||
' >> /app/data/api/backup.sh
|
||||
chmod +x /app/data/api/backup.sh
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user