Files
k-boris-website/entrypoint.sh
Boris c84600ae3e
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix hltb worker
2026-04-02 21:23:00 +03:00

23 lines
583 B
Bash
Executable File

#!/bin/sh
set -e
python manage.py migrate --noinput
# Load mineral data if the table is empty
python manage.py shell -c "
from dailystone.models import Mineral
if Mineral.objects.count() == 0:
from django.core.management import call_command
call_command('loaddata', 'minerals')
print(f'Loaded {Mineral.objects.count()} minerals')
else:
print(f'{Mineral.objects.count()} minerals already loaded')
"
python manage.py run_hltb_worker &
exec gunicorn kboris.wsgi:application \
--bind 0.0.0.0:8080 \
--workers 2 \
--access-logfile - \
--error-logfile -