mirror of
https://github.com/decompme/decomp.me.git
synced 2026-02-05 13:18:55 -06:00
* Trying to set up poetry * oops * mypy python 3.9 * mark * blah * attempt to fix stuff * . * fixies * try winders again * doqqer * tomorrow for sure! * attempt to install poetry as user * help * docker fix? * ? * try thing * oh god * the path to victory * meowp * srob * try to do it manually on windows, install on docker * try to do it manually on windows, install on docker: the sequel * winders * drf extensions * winders 2 * use pip to install poetry on winders * execute 'poetry install' at runtime, same as yarn install (#377) Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
23 lines
515 B
Bash
Executable File
23 lines
515 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}
|
|
|
|
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 config virtualenvs.path /backend/virtualenvs
|
|
|
|
poetry install
|
|
|
|
poetry run /backend/manage.py migrate
|
|
|
|
poetry run /backend/manage.py loaddata /backend/db.json
|
|
|
|
poetry run /backend/manage.py runserver ${BE_HOST}:${BE_PORT}
|