Spaces:
Runtime error
Runtime error
Commit
·
7ef9e24
1
Parent(s):
e41d6e0
Change port
Browse files- Dockerfile +9 -1
- app/main.py +2 -2
Dockerfile
CHANGED
|
@@ -27,4 +27,12 @@ RUN ls -l /code/output_frames
|
|
| 27 |
|
| 28 |
ENV PATH="/code/venv/bin:$PATH"
|
| 29 |
# Run app.py when the container launches using the virtual environment's Python interpreter
|
| 30 |
-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
ENV PATH="/code/venv/bin:$PATH"
|
| 29 |
# Run app.py when the container launches using the virtual environment's Python interpreter
|
| 30 |
+
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]
|
| 31 |
+
# Make port 8000 available to the world outside this container
|
| 32 |
+
EXPOSE 8000
|
| 33 |
+
|
| 34 |
+
# Define environment variable
|
| 35 |
+
ENV PYTHONUNBUFFERED=1
|
| 36 |
+
|
| 37 |
+
# Run Hypercorn when the container launches
|
| 38 |
+
CMD ["hypercorn", "app.main:app", "--bind", "0.0.0.0:8000"]
|
app/main.py
CHANGED
|
@@ -101,5 +101,5 @@ async def get_destinations():
|
|
| 101 |
destinations = list(db.find())
|
| 102 |
return destinations
|
| 103 |
|
| 104 |
-
if __name__ == "__main__":
|
| 105 |
-
|
|
|
|
| 101 |
destinations = list(db.find())
|
| 102 |
return destinations
|
| 103 |
|
| 104 |
+
# if __name__ == "__main__":
|
| 105 |
+
# uvicorn.run("app.main:app", host="0.0.0.0", port=port, log_level="info")
|