Commit
·
ecf3c7c
1
Parent(s):
5eed863
adding the backend to the render server
Browse files- backend/Dockerfile +4 -5
backend/Dockerfile
CHANGED
@@ -35,7 +35,6 @@
|
|
35 |
|
36 |
|
37 |
|
38 |
-
|
39 |
FROM python:3.11-slim
|
40 |
|
41 |
WORKDIR /code
|
@@ -49,9 +48,9 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
49 |
|
50 |
COPY ./ml_models /code/sentiment_model
|
51 |
|
52 |
-
# Copy the application code last
|
53 |
COPY ./backend .
|
54 |
|
55 |
-
#
|
56 |
-
#
|
57 |
-
CMD ["gunicorn", "-w", "2", "-k", "uvicorn.workers.UvicornWorker", "main:app", "--bind", "0.0.0.0
|
|
|
35 |
|
36 |
|
37 |
|
|
|
38 |
FROM python:3.11-slim
|
39 |
|
40 |
WORKDIR /code
|
|
|
48 |
|
49 |
COPY ./ml_models /code/sentiment_model
|
50 |
|
51 |
+
# Copy the application code last. All code will live in /code now.
|
52 |
COPY ./backend .
|
53 |
|
54 |
+
# The default command is to start the web server.
|
55 |
+
# Render's free web services require port 10000.
|
56 |
+
CMD ["gunicorn", "-w", "2", "-k", "uvicorn.workers.UvicornWorker", "main:app", "--bind", "0.0.0.0:10000"]
|