-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
38 lines (28 loc) · 1.04 KB
/
entrypoint.sh
File metadata and controls
38 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
set -e
# Check which process group we're running
if [ "$FLY_PROCESS_GROUP" = "celery" ]; then
echo "Starting Celery Worker..."
exec celery -A paycore worker --loglevel=info --concurrency=2 --max-tasks-per-child=100 --prefetch-multiplier=4
else
echo "Running migrations..."
python manage.py migrate --noinput
echo "Collecting static files..."
python manage.py collectstatic --noinput --clear
echo "Seeding users..."
python manage.py seed_users
echo "Upserting countries..."
python manage.py upsert_countries
echo "Seeding currencies..."
python manage.py seed_currencies
echo "Seeding bill providers..."
python manage.py seed_bill_providers
echo "Seeding loan products..."
python manage.py seed_loan_products
echo "Seeding investment products..."
python manage.py seed_investment_products
echo "Seeding FAQs..."
python manage.py seed_faqs
echo "Starting Uvicorn with WebSocket support..."
exec uvicorn paycore.asgi:application --host 0.0.0.0 --port 8000 --workers 2 --ws wsproto --timeout-keep-alive 120
fi