apphub update

This commit is contained in:
qiaofeng1227 2023-10-24 14:33:49 +08:00
parent 5c74768fab
commit bea8007239
3 changed files with 16 additions and 3 deletions

View file

@ -36,3 +36,16 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Download redoc.standalone.js
run: wget -O apphub/apidocs/redoc.standalone.js https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js
- name: Run Docker container and get openapi.json
run: |
docker run -d --name apphub -p 8080:80 websoft9dev/apphub:${{ env.VERSION }}
sleep 10 # Wait for the container to start
wget -O apphub/apidocs/openapi.json http://localhost:8080/docs/openapi.json
docker stop apphub
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Upgrade apphub api docs

View file

@ -1,4 +1,4 @@
# modify time: 202310231530, you can modify here to trigger Docker Build action
# modify time: 202310241440, you can modify here to trigger Docker Build action
FROM python:3.10-bullseye AS buildstage
LABEL maintainer="Websoft9<help@websoft9.com>"

View file

@ -43,10 +43,10 @@ fi
create_apikey() {
# 容器第一次启动时不管apikey是否为空调用apphub genkey
if [ ! -f /websoft9/first_run ]; then
if [ ! -f /websoft9/apphub/src/config/first_run ]; then
echo "Create new apikey"
apphub genkey
touch /websoft9/first_run
touch /websoft9/apphub/src/config/first_run
fi
# apphub getkey 为空时创建新的apikey
if [ -z "$(apphub getkey)" ]; then