Skip to content

Commit d743050

Browse files
authored
fix: load the .env in the Docker dev compose (#2149)
Signed-off-by: tdruez <tdruez@aboutcode.org>
1 parent cf76025 commit d743050

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ regen-fixtures:
7171
@echo "-> Regenerate test fixtures from the running Docker stack"
7272
${COMPOSE} exec -e SCANCODEIO_TEST_FIXTURES_REGEN=1 web ./manage.py test
7373

74+
fix:
75+
@echo "-> Run Ruff format"
76+
uvx ruff format
77+
@echo "-> Run Ruff linter"
78+
uvx ruff check --fix
79+
7480
########################################################################################
7581
# Local venv commands (legacy)
7682
########################################################################################
@@ -198,4 +204,4 @@ offline-package: docker-images
198204
@mkdir -p dist/
199205
@tar -cf dist/scancodeio-offline-package-`git describe --tags`.tar build/
200206

201-
.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
207+
.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

docker-compose.dev.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
name: scancodeio
66

77
x-dev-env: &dev-env
8-
SCANCODEIO_DEBUG: "True"
98
DJANGO_RUNSERVER_HIDE_WARNING: "true"
109

1110
x-dev-build: &dev-build
@@ -15,6 +14,8 @@ x-dev-build: &dev-build
1514
services:
1615
web:
1716
build: *dev-build
17+
env_file:
18+
- .env
1819
environment:
1920
<<: *dev-env
2021
command: ./manage.py runserver --skip-checks 0.0.0.0:8001
@@ -26,6 +27,8 @@ services:
2627
# Volume mount keeps code in sync. Restart manually with: make restart-worker
2728
worker:
2829
build: *dev-build
30+
env_file:
31+
- .env
2932
environment:
3033
<<: *dev-env
3134
command: ./manage.py rqworker --worker-class scancodeio.worker.ScanCodeIOWorker

0 commit comments

Comments
 (0)