feat: Added development server when the `DEVELOPMENT` env var is set

Development server will restart when extensions files are changed
This commit is contained in:
Maicol Battistini 2024-07-16 20:59:00 +02:00
parent d7ee7d66f3
commit 19b56d3750
No known key found for this signature in database
2 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,8 @@
# Information about how it works: https://github.com/okfn/ckanext-envvars
# Note that variables here take presedence over build/up time variables in .env
DEVELOPMENT=true
# Set to true to disable CKAN from starting and serve a maintenance page
MAINTENANCE_MODE=false

View File

@ -61,6 +61,13 @@ then
done
fi
# Enable development server if in development mode
echo "DEVELOPMENT MODE: $DEVELOPMENT"
if [ "$DEVELOPMENT" = true ]; then
echo "Starting development server"
ckan -c $APP_DIR/production.ini run -H 0.0.0.0
fi
# Check whether http basic auth password protection is enabled and enable basicauth routing on uwsgi respecfully
if [ $? -eq 0 ]
then