Fix Dockerfile casing and update server path
Browse files- dockerfile +6 -9
- src/.gitignore +1 -2
dockerfile
CHANGED
|
@@ -4,17 +4,14 @@ FROM python:3.11-slim
|
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy
|
| 8 |
-
COPY requirements.txt .
|
| 9 |
-
|
| 10 |
-
# Install dependencies
|
| 11 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
-
|
| 13 |
-
# Copy the rest of your code
|
| 14 |
COPY . .
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
# Expose the port Uvicorn uses
|
| 17 |
EXPOSE 8000
|
| 18 |
|
| 19 |
-
# Start the server
|
| 20 |
-
CMD ["
|
|
|
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy all your project files into the container
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
+
# Install dependencies directly from the new pyproject.toml
|
| 11 |
+
RUN pip install --no-cache-dir .
|
| 12 |
+
|
| 13 |
# Expose the port Uvicorn uses
|
| 14 |
EXPOSE 8000
|
| 15 |
|
| 16 |
+
# Start the server, pointing it to the new folder structure!
|
| 17 |
+
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"]
|
src/.gitignore
CHANGED
|
@@ -1,3 +1,2 @@
|
|
| 1 |
__pycache__/
|
| 2 |
-
*.pyc
|
| 3 |
-
.env
|
|
|
|
| 1 |
__pycache__/
|
| 2 |
+
*.pyc
|
|
|