mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-24 01:50:19 +08:00
apphub
This commit is contained in:
parent
b4d849f135
commit
0f65442684
@ -1,6 +1,6 @@
|
|||||||
FROM python:3.10-bullseye AS buildstage
|
FROM python:3.10-bullseye AS buildstage
|
||||||
LABEL maintainer="Websoft9<help@websoft9.com>"
|
LABEL maintainer="Websoft9<help@websoft9.com>"
|
||||||
LABEL version="0.8.17"
|
LABEL version="0.0.1"
|
||||||
|
|
||||||
|
|
||||||
ENV LIBRARY_VERSION=v0.5.4
|
ENV LIBRARY_VERSION=v0.5.4
|
||||||
|
@ -1,10 +1,31 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# check
|
# 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
|
# start by supervisord
|
||||||
|
|
||||||
/usr/local/bin/supervisord
|
/usr/local/bin/supervisord
|
||||||
supervisorctl start all
|
supervisorctl start all
|
||||||
tail -f /dev/null
|
tail -f /dev/null
|
@ -1,12 +1,9 @@
|
|||||||
[supervisord]
|
[supervisord]
|
||||||
|
|
||||||
nodaemon=false
|
nodaemon=false
|
||||||
|
|
||||||
[supervisorctl]
|
[supervisorctl]
|
||||||
|
|
||||||
|
|
||||||
[program:apphub]
|
[program:apphub]
|
||||||
|
command=uvicorn main:app --reload --port 8080
|
||||||
command=uvicorn app.main:app --reload --host 0.0.0.0 --port 8080 --log-level info
|
|
||||||
autostart=true
|
autostart=true
|
||||||
directory=/websoft9/apphub/src
|
directory=/websoft9/apphub/src
|
Loading…
Reference in New Issue
Block a user