One more image
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user