Newer
Older
create_link()
{
ln -s $1 $2 2> /dev/null
if [ $? -eq 0 ]; then
echo "[ OK ] Link created: ${1}->${2}"
else
echo "[FAILED] No such file or directory: ${1}"
exit 1
fi
}
cd $APP_PATH/
marker_file="marker_file_step_01"
if [ -f $marker_file ]; then
echo "$marker_file already exists"
else
echo "$marker_file does not exist"
django-admin startproject config .
create_link src/onegeo_suite/ .
# Handle Django config files
if [ -f "config/routers.py" ]; then
rm config/routers.py
if [ -f "config/settings.py" ]; then
rm config/settings.py
fi
if [ -f "config/triggers.py" ]; then
rm config/triggers.py
fi
if [ -f "config/urls.py" ]; then
rm config/urls.py
fi
cp src/docker/auth.py config/auth.py
i=1
while true
do
if $(nc -z ${DB_HOST} 5432) ; then
echo "[${DB_HOST}] The database server is ready."
break
fi
echo "[Retry: $i] The database server is not ready. Next attempt in ${TIME_SLEEP:-1}s"
sleep ${TIME_SLEEP:-1}

m431m
committed
python manage.py collectstatic --no-input

m431m
committed

m431m
committed
python manage.py compilemessages --locale=fr