mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-02-02 17:08:38 +08:00
apphub
This commit is contained in:
parent
231d36c5ce
commit
b096dc9fa6
@ -29,7 +29,6 @@ RUN apt update && apt install git jq supervisor -y && \
|
|||||||
RUN pip install --upgrade pip && pip install -r apphub/requirements.txt
|
RUN pip install --upgrade pip && pip install -r apphub/requirements.txt
|
||||||
|
|
||||||
# supervisor
|
# supervisor
|
||||||
# RUN pip install supervisor
|
|
||||||
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
RUN chmod +r /etc/supervisor/conf.d/supervisord.conf
|
RUN chmod +r /etc/supervisor/conf.d/supervisord.conf
|
||||||
COPY config/entrypoint.sh /entrypoint.sh
|
COPY config/entrypoint.sh /entrypoint.sh
|
||||||
|
@ -13,7 +13,7 @@ check_file_exists() {
|
|||||||
else
|
else
|
||||||
echo "$file_path is not exists, wait a moment.."
|
echo "$file_path is not exists, wait a moment.."
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 1
|
||||||
if ((i==max_attempts)); then
|
if ((i==max_attempts)); then
|
||||||
echo "$file_path is not exists, app may be work normally."
|
echo "$file_path is not exists, app may be work normally."
|
||||||
break
|
break
|
||||||
@ -21,25 +21,9 @@ check_file_exists() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
check_file_exists "/websoft9/credentials/proxy" 10
|
check_file_exists "/websoft9/credentials/proxy" 1
|
||||||
check_file_exists "/websoft9/credentials/deployment" 10
|
check_file_exists "/websoft9/credentials/deployment" 1
|
||||||
check_file_exists "/websoft9/credentials/git" 10
|
check_file_exists "/websoft9/credentials/git" 1
|
||||||
|
|
||||||
if [ -f "/websoft9/credentials/git" ]; then
|
|
||||||
# init git
|
|
||||||
content=$(cat /websoft9/credentials/git)
|
|
||||||
username=$(echo "$content" | jq -r '.username')
|
|
||||||
password=$(echo "$content" | jq -r '.password')
|
|
||||||
email=$(echo "$content" | jq -r '.email')
|
|
||||||
echo "start to init git"
|
|
||||||
git config --global user.name $username
|
|
||||||
git config --global user.email $email
|
|
||||||
git config --global user.password $password
|
|
||||||
|
|
||||||
else
|
|
||||||
# git user not exist, output the error message
|
|
||||||
echo "can not init git"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# start by supervisord
|
# start by supervisord
|
||||||
/usr/bin/supervisord
|
/usr/bin/supervisord
|
||||||
|
Loading…
Reference in New Issue
Block a user