Update Dockerfile
Browse files- Dockerfile +8 -1
Dockerfile
CHANGED
@@ -24,6 +24,7 @@ COPY . .
|
|
24 |
RUN mkdir -p /app/logs && \
|
25 |
touch /app/log.txt && \
|
26 |
chmod 666 /app/log.txt
|
|
|
27 |
|
28 |
# Expose port
|
29 |
EXPOSE 8080
|
@@ -32,9 +33,15 @@ EXPOSE 8080
|
|
32 |
ENV PYTHONPATH=/app
|
33 |
ENV PORT=8080
|
34 |
|
|
|
|
|
|
|
35 |
# Health check
|
36 |
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
|
37 |
CMD curl -f http://localhost:8080/ || exit 1
|
38 |
|
39 |
# Run the application
|
40 |
-
|
|
|
|
|
|
|
|
24 |
RUN mkdir -p /app/logs && \
|
25 |
touch /app/log.txt && \
|
26 |
chmod 666 /app/log.txt
|
27 |
+
RUN pip3 install uvicorn fastapi
|
28 |
|
29 |
# Expose port
|
30 |
EXPOSE 8080
|
|
|
33 |
ENV PYTHONPATH=/app
|
34 |
ENV PORT=8080
|
35 |
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
# Health check
|
40 |
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
|
41 |
CMD curl -f http://localhost:8080/ || exit 1
|
42 |
|
43 |
# Run the application
|
44 |
+
COPY start.sh /app/start.sh
|
45 |
+
RUN chmod +x /app/start.sh
|
46 |
+
|
47 |
+
CMD ["/app/start.sh"]
|