DAISY loads configuration from .env.{ENVIRONMENT} files:
.env.development(default, works with Docker).env.local(for local development outside Docker).env.test(testing)
For local development:
cp .env.development .env.local
# Edit .env.local: set ENVIRONMENT=local, adjust DATABASE_URL/SOLR_URL for localhostSee administration.md for all settings.
pip install black==25.1.0 pre-commit install black --check . black .
./manage.py import_usersSingle file mode:
./manage.py import_projects -f path/to/json_file.jsonBatch mode:
./manage.py import_projects -d path/to/dir/with/json/files/Available commands: import_projects, import_datasets, import_partners.
In case of problems, add --verbose flag to the command, and take a look inside ./log/daisy.log.
cd web/static/vendor/
npm cicd web/static/vendor
npm run-script build./manage.py runserverInstall test dependencies:
pip install ".[test]"If tests dependencies are already installed, one can also run the tests just by executing:
pytestDAISY includes Docker Compose configurations for both production and development environments.
For development with live file mounting and automatic updates:
# Stop any running containers
docker compose down
# Start with development overrides
docker compose -f docker-compose.yaml -f docker-compose.dev.yml upThe development setup provides:
- Live static file mounting: Changes to CSS/JS files are immediately available
- Hot reload: Code changes are reflected without rebuilding containers
When you make changes to SCSS files, compile them using:
# Compile SCSS to CSS
docker compose -f docker-compose.yaml -f docker-compose.dev.yml exec web bash -c "cd /static/vendor && npm run build:css"
# Build all assets (CSS + JavaScript)
docker compose -f docker-compose.yaml -f docker-compose.dev.yml exec web bash -c "cd /static/vendor && npm run build"
# Watch for SCSS changes (auto-compile on file changes)
docker compose -f docker-compose.yaml -f docker-compose.dev.yml exec web bash -c "cd /static/vendor && npm run watch:css"# Install npm dependencies
docker compose -f docker-compose.yaml -f docker-compose.dev.yml exec web bash -c "cd /static/vendor && npm ci"
# Collect Django static files
docker compose -f docker-compose.yaml -f docker-compose.dev.yml exec web python manage.py collectstatic --noinputdocker compose exec --user root web pip install ".[test]"
docker compose exec web pytest