@echo off
REM winose evolution startup/init batch file
SET PY=python\python.exe
SET DJANGO_SETTINGS_MODULE=wnsq.settings_prod
SET PGSQL=pgsql\bin
rem startup db server
echo launching db server...
%PGSQL%\pg_ctl start -w -s -D database -o "-p 5987" -l database_log
REM run any pending migrations
%PY% winose\manage.py migrate
REM start the actual web system
%PY% winose\runner.py
echo halting database server...
%PGSQL%\pg_ctl stop -w -s -m s -D database -o "-p 5987"
exit /B
