mirror of
https://github.com/encounter/decomp.me.git
synced 2026-03-30 11:06:27 -07:00
124c668acb
* compile `psycopg2` locally * build cffi locally * disable `USE_SANDBOX_JAIL` by default * ignore `regedit` block if it is not necessary * run `poetry lock` * remove unnecessary changes * revert unnecessary changes
33 lines
759 B
Bash
Executable File
33 lines
759 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}
|
|
|
|
poetry config virtualenvs.path /backend/virtualenvs
|
|
|
|
poetry install
|
|
|
|
poetry run /backend/compilers/download.py
|
|
poetry run /backend/libraries/download.py
|
|
|
|
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
|
|
|
|
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
|
|
|
|
poetry run /backend/manage.py migrate
|
|
|
|
poetry run /backend/manage.py runserver ${BE_HOST}:${BE_PORT}
|