install pip req with txt
This commit is contained in:
parent
b76adec077
commit
63e359b87d
|
|
@ -2,7 +2,7 @@
|
|||
FROM python:latest
|
||||
|
||||
# Install Supervisord
|
||||
RUN pip install supervisor flask
|
||||
RUN pip install supervisor
|
||||
|
||||
# Copy your Supervisord configuration file into the container
|
||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Check if the REPO_URL environment variable is set
|
||||
if [ -z "$GIT_REPO" ]; then
|
||||
echo "Error: REPO_URL environment variable is not set."
|
||||
echo "Error: GIT_REPO environment variable is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -19,6 +19,9 @@ else
|
|||
git pull origin master
|
||||
fi
|
||||
|
||||
cd "$TARGET_DIR" || exit 1
|
||||
pip install -r requirements.txt
|
||||
|
||||
mkdir -p /var/run/supervisor
|
||||
|
||||
# Run your application or desired command
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ def githook():
|
|||
try:
|
||||
subprocess.run(['supervisorctl', 'stop', 'app'], check=True)
|
||||
subprocess.run(['git', 'pull'], check=True, cwd=path)
|
||||
subprocess.run(['pip', 'install', '-r', 'requirements.txt'], check=True, cwd=path)
|
||||
subprocess.run(['supervisorctl', 'start', 'app'], check=True)
|
||||
return "", 200
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Reference in New Issue