Start working on containerization
This commit is contained in:
2
docker/crontab
Normal file
2
docker/crontab
Normal file
@@ -0,0 +1,2 @@
|
||||
*/1 * * * * python3 /app/backend/get_notifications.py
|
||||
*/5 * * * * python3 /app/backend/run_scripts.py
|
||||
21
docker/entry.sh
Normal file
21
docker/entry.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Navigate to the frontend directory and start the Svelte app
|
||||
cd frontend
|
||||
npm run build
|
||||
npm run dev &
|
||||
|
||||
# Navigate back to the root directory
|
||||
cd ..
|
||||
|
||||
# Setup exec venv
|
||||
cd backend/exec_folder
|
||||
python3 -m venv venv
|
||||
cd ../..
|
||||
|
||||
# Start the backend using uvicorn
|
||||
uvicorn backend.backend:app --host 0.0.0.0 --port 8000 &
|
||||
|
||||
# Start the cron daemon
|
||||
crontab docker/cronfile
|
||||
cron -f
|
||||
Reference in New Issue
Block a user