diff --git a/Dockerfile.python:3.9.9-slim-bullseye b/Dockerfile.python:3.9.9-slim-bullseye index b14f990..ddc599f 100755 --- a/Dockerfile.python:3.9.9-slim-bullseye +++ b/Dockerfile.python:3.9.9-slim-bullseye @@ -14,5 +14,7 @@ RUN pip install -r requirements.txt # Add the python app to the image COPY app.py . +RUN pytest1 app.py + # The next line says "app:api" and not "app:app" ! CMD ["uvicorn", "app:api", "--host", "0.0.0.0", "--port", "8000"] diff --git a/docker-compose.yml b/docker-compose.yml index 7440737..0537bc8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,3 +27,12 @@ services: - .:/usr/src/app/ ports: - 8039:8000 + app-3.9-full: + image: app:3.9.9-slim-bullseye + build: + context: . + dockerfile: Dockerfile.python:3.9.9-bullseye + volumes: + - .:/usr/src/app/ + ports: + - 8039:8000 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 24da44e..0979aaf 100755 --- a/requirements.txt +++ b/requirements.txt @@ -8,5 +8,6 @@ typing_extensions==4.7.1 uvicorn==0.22.0 # # Needed for PyTest, used in test_app.py +pytest # httpx==0.26.0 # requests==2.31.0