mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-01-18 17:13:00 +08:00
Update Dockerfile and scripts
This commit is contained in:
parent
5bc170f519
commit
6a8f81c954
3 changed files with 4 additions and 1 deletions
|
@ -10,7 +10,7 @@ COPY scripts/ /app/scripts/
|
|||
RUN chmod +x /app/scripts/start.sh
|
||||
|
||||
# Install packages
|
||||
RUN apt update && apt install -y graphviz libgraphviz-dev graphviz-dev tesseract-ocr
|
||||
RUN apt update && apt install -y graphviz libgraphviz-dev graphviz-dev tesseract-ocr tmux
|
||||
RUN pip3 install --upgrade pip && pip3 install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Expose port 8000 for the web server
|
||||
|
|
|
@ -57,5 +57,6 @@ typing_extensions==4.12.2
|
|||
tzdata==2024.2
|
||||
uritemplate==4.1.1
|
||||
urllib3==2.2.3
|
||||
watchdog==6.0.0
|
||||
whitenoise==6.8.2
|
||||
pygraphviz==1.14; platform_system == 'Linux'
|
|
@ -9,7 +9,9 @@ if [ ! -d "static" ]; then
|
|||
python manage.py collectstatic --noinput
|
||||
fi
|
||||
if [ "$DEBUG" = 'True' ]; then
|
||||
tmux new-session -d -s "API File Watcher" "cd /app/docmanager_backend && python manage.py start_watcher"
|
||||
python manage.py runserver "0.0.0.0:8000"
|
||||
else
|
||||
tmux new-session -d -s "API File Watcher" "cd docmanager_backend && python manage.py start_watcher"
|
||||
gunicorn --workers 8 --bind 0.0.0.0:8000 config.wsgi:application
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue