diff --git a/Makefile b/Makefile index 2863a98c6f..7d4e9f2d07 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,12 @@ regen-fixtures: @echo "-> Regenerate test fixtures from the running Docker stack" ${COMPOSE} exec -e SCANCODEIO_TEST_FIXTURES_REGEN=1 web ./manage.py test +fix: + @echo "-> Run Ruff format" + uvx ruff format + @echo "-> Run Ruff linter" + uvx ruff check --fix + ######################################################################################## # Local venv commands (legacy) ######################################################################################## @@ -198,4 +204,4 @@ offline-package: docker-images @mkdir -p dist/ @tar -cf dist/scancodeio-offline-package-`git describe --tags`.tar build/ -.PHONY: virtualenv conf dev envfile install doc8 check valid check-deploy clean migrate makemigrations restart-worker postgresdb sqlitedb backupdb run test fasttest regen-fixtures docs build bash shell docker-images offline-package +.PHONY: virtualenv conf dev envfile install doc8 check valid check-deploy clean migrate makemigrations restart-worker postgresdb sqlitedb backupdb run test fasttest regen-fixtures fix docs build bash shell docker-images offline-package diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index b5f2fa3c55..f2ac0c853e 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -5,7 +5,6 @@ name: scancodeio x-dev-env: &dev-env - SCANCODEIO_DEBUG: "True" DJANGO_RUNSERVER_HIDE_WARNING: "true" x-dev-build: &dev-build @@ -15,6 +14,8 @@ x-dev-build: &dev-build services: web: build: *dev-build + env_file: + - .env environment: <<: *dev-env command: ./manage.py runserver --skip-checks 0.0.0.0:8001 @@ -26,6 +27,8 @@ services: # Volume mount keeps code in sync. Restart manually with: make restart-worker worker: build: *dev-build + env_file: + - .env environment: <<: *dev-env command: ./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker