Skip to content

Commit 34c27d6

Browse files
committed
fix: make targets on fresh environment
1 parent 53cc810 commit 34c27d6

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ test:
2424

2525
test-unit:
2626
@echo "Running unit tests..."
27-
docker run --rm --tty -v $(PWD):/app python-fastapi-example-oms:dev python -m pytest tests/unit/ -v
27+
docker build -t python-fastapi-example-oms-app:latest .
28+
docker run --rm --tty python-fastapi-example-oms-app:latest python -m pytest tests/unit/ -v
2829

2930
test-integration:
3031
$(MAKE) clean

docker-compose.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ services:
1818
retries: 5
1919

2020
postgres-migrations:
21-
image: python-fastapi-example-oms:dev
21+
build:
22+
context: .
23+
dockerfile: Dockerfile
2224
environment:
2325
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/app
2426
DEBUG: "true"
@@ -30,7 +32,9 @@ services:
3032
- app_network
3133

3234
app:
33-
image: python-fastapi-example-oms:dev
35+
build:
36+
context: .
37+
dockerfile: Dockerfile
3438
ports:
3539
- "8000:8000"
3640
environment:

0 commit comments

Comments
 (0)