Update dockerfile
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
*/1 * * * * python3 /app/backend/get_notifications.py
|
||||
*/5 * * * * python3 /app/backend/run_scripts.py
|
||||
@@ -1,9 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Navigate to the frontend directory and start the Svelte app
|
||||
source /app/backend/venv/bin/activate
|
||||
|
||||
# Navigate to the frontend directory, install dependencies, and start the Svelte app
|
||||
cd frontend
|
||||
npm install
|
||||
npm run build
|
||||
npm run dev &
|
||||
npm run dev -- --host 0.0.0.0 --port 8080 &
|
||||
|
||||
# Navigate back to the root directory
|
||||
cd ..
|
||||
@@ -14,8 +17,9 @@ python3 -m venv venv
|
||||
cd ../..
|
||||
|
||||
# Start the backend using uvicorn
|
||||
uvicorn backend.backend:app --host 0.0.0.0 --port 8000 &
|
||||
cd backend
|
||||
uvicorn backend:app --host 0.0.0.0 --port 8000 &
|
||||
cd ..
|
||||
|
||||
# Start the cron daemon
|
||||
crontab docker/cronfile
|
||||
cron -f
|
||||
|
||||
2
docker/services.cron
Normal file
2
docker/services.cron
Normal file
@@ -0,0 +1,2 @@
|
||||
*/1 * * * * . /app/backend/venv/bin/activate && python3 /app/backend/get_notifications.py >> /var/log/cron.log 2>&1
|
||||
*/5 * * * * cd /app/backend && . /app/backend/venv/bin/activate && python3 /app/backend/run_scripts.py >> /var/log/cron.log 2>&1
|
||||
Reference in New Issue
Block a user