mirror of
https://github.com/decompme/decomp.me.git
synced 2025-12-20 12:29:32 -06:00
* Migrate from poetry/black to uv/ruff * fixes * path change * path pt 2 * ah * mkst tweaks (#1674) * mkst tweaks * tweaks++ * doh * tweak harder --------- Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
34 lines
766 B
Bash
Executable File
34 lines
766 B
Bash
Executable File
#!/bin/bash
|
|
|
|
DB_HOST=${DATABASE_HOST:-postgres}
|
|
DB_PORT=${DATABASE_PORT:-5432}
|
|
|
|
BE_HOST=${BACKEND_HOST:-0.0.0.0}
|
|
BE_PORT=${BACKEND_PORT:-8000}
|
|
|
|
WORKERS=${BACKEND_WORKERS:-4}
|
|
|
|
until nc -z ${DB_HOST} ${DB_PORT} > /dev/null; do
|
|
echo "Waiting for database to become available on ${DB_HOST}:${DB_PORT}..."
|
|
sleep 1
|
|
done
|
|
|
|
if [ -z "$CI" ]; then
|
|
uv run /backend/housekeeping.py
|
|
else
|
|
echo "Skipping housekeeping: running in CI environment"
|
|
fi
|
|
|
|
uv run /backend/manage.py migrate
|
|
|
|
if command -v regedit &> /dev/null; then
|
|
for reg in /backend/wine/*.reg; do
|
|
echo "Importing registry file $reg..."
|
|
regedit $reg
|
|
done
|
|
else
|
|
echo "regedit command not found. Skipping registry import."
|
|
fi
|
|
|
|
uv run gunicorn -w ${WORKERS} decompme.wsgi --bind ${BE_HOST}:${BE_PORT}
|