mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-01-18 17:13:00 +08:00
Update scripts
This commit is contained in:
parent
52d74de4fc
commit
463e33d219
3 changed files with 4 additions and 3 deletions
|
@ -10,6 +10,8 @@ services:
|
|||
environment:
|
||||
- PYTHONBUFFERED=1
|
||||
volumes:
|
||||
# File Watcher is broken in Windows Docker since Docker does not notify container about any file changes you make from Windows
|
||||
# If running on Windows, use a shared volume instead of bind mount
|
||||
- .:/app
|
||||
|
||||
# SMTP Server
|
||||
|
|
|
@ -94,7 +94,7 @@ class PDFWatcher:
|
|||
|
||||
def run(self):
|
||||
event_handler = PDFHandler()
|
||||
watch_directory = f"{MEDIA_ROOT}/uploads"
|
||||
watch_directory = os.path.join(MEDIA_ROOT, "uploads")
|
||||
|
||||
self.observer.schedule(
|
||||
event_handler, watch_directory, recursive=True)
|
||||
|
|
|
@ -8,10 +8,9 @@ if [ ! -d "static" ]; then
|
|||
echo "Generating static files"
|
||||
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"
|
||||
if [ "$DEBUG" = 'True' ]; then
|
||||
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