Redefine base structure

This commit is contained in:
Roman Krček
2024-10-23 21:16:49 +02:00
parent c9a7535ef8
commit 7d345224c3
18 changed files with 228 additions and 3 deletions

20
docker/entrypoint.sh Normal file
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" ]
uwsgi --ini /app/uwsgi.ini
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