mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-26 01:20:28 +00:00
apphub
This commit is contained in:
parent
b4d849f135
commit
0f65442684
3 changed files with 24 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
FROM python:3.10-bullseye AS buildstage
|
||||
LABEL maintainer="Websoft9<help@websoft9.com>"
|
||||
LABEL version="0.8.17"
|
||||
LABEL version="0.0.1"
|
||||
|
||||
|
||||
ENV LIBRARY_VERSION=v0.5.4
|
||||
|
|
|
@ -1,10 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
# check
|
||||
check_file_exists() {
|
||||
file_path=$1
|
||||
max_attempts=$2
|
||||
|
||||
for ((i=1; i<=max_attempts; i++))
|
||||
do
|
||||
if [ -f "$file_path" ]; then
|
||||
echo "$file_path exists"
|
||||
break
|
||||
else
|
||||
echo "$file_path is not exists, wait a moment.."
|
||||
fi
|
||||
sleep 2
|
||||
if ((i==max_attempts)); then
|
||||
echo "$file_path is not exists, timeout."
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
check_file_exists "/websoft9/credentials/proxy" 10
|
||||
check_file_exists "/websoft9/credentials/git" 10
|
||||
check_file_exists "/websoft9/credentials/deployment" 10
|
||||
|
||||
# start by supervisord
|
||||
|
||||
/usr/local/bin/supervisord
|
||||
supervisorctl start all
|
||||
tail -f /dev/null
|
|
@ -1,12 +1,9 @@
|
|||
[supervisord]
|
||||
|
||||
nodaemon=false
|
||||
|
||||
[supervisorctl]
|
||||
|
||||
|
||||
[program:apphub]
|
||||
|
||||
command=uvicorn app.main:app --reload --host 0.0.0.0 --port 8080 --log-level info
|
||||
command=uvicorn main:app --reload --port 8080
|
||||
autostart=true
|
||||
directory=/websoft9/apphub/src
|
Loading…
Reference in a new issue