Initial project structure

This commit is contained in:
Roman Krček
2024-10-22 21:45:05 +02:00
commit c9a7535ef8
16 changed files with 268 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Based on env variable PREVOID_RUN_MODE decide which service to start
if [ "$PREVOID_RUN_MODE" == "DJANGO" ]
python3 /app/manage.py runserver 0.0.0.0:8000
elif ["$PREVOID_RUN_MODE" == "CELERY"]
celery -A /app/orebolt_prevoid worker --loglevel=info
elif [ -z "$PREVOID_RUN_MODE" ]; then
echo "PREVOID_RUN_MODE is not set"
echo "Please set the PREVOID_RUN_MODE environment variable to DJANGO or CELERY."
sleep 5
exit 1
else
echo "Invalid value for PREVOID_RUN_MODE: $PREVOID_RUN_MODE"
echo "PREVOID_RUN_MODE must be either DJANGO or CELERY."
sleep 5
exit 1