Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +14 -1
Dockerfile
CHANGED
@@ -12,10 +12,18 @@ COPY frontend/ ./
|
|
12 |
|
13 |
RUN pnpm build
|
14 |
|
|
|
15 |
FROM python:3.10-slim AS final
|
16 |
|
17 |
WORKDIR /app
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
COPY requirements.txt ./
|
20 |
RUN pip install --no-cache-dir --upgrade pip && \
|
21 |
pip install --no-cache-dir -r requirements.txt
|
@@ -32,4 +40,9 @@ COPY --from=frontend-builder /app/frontend/dist/* ./static/
|
|
32 |
|
33 |
EXPOSE 5000
|
34 |
|
35 |
-
CMD
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
RUN pnpm build
|
14 |
|
15 |
+
# Final stage
|
16 |
FROM python:3.10-slim AS final
|
17 |
|
18 |
WORKDIR /app
|
19 |
|
20 |
+
# Install system dependencies including curl and openssl for diagnostics
|
21 |
+
# Also update CA certificates
|
22 |
+
RUN apt-get update && \
|
23 |
+
apt-get install -y --no-install-recommends curl openssl ca-certificates && \
|
24 |
+
update-ca-certificates && \
|
25 |
+
rm -rf /var/lib/apt/lists/*
|
26 |
+
|
27 |
COPY requirements.txt ./
|
28 |
RUN pip install --no-cache-dir --upgrade pip && \
|
29 |
pip install --no-cache-dir -r requirements.txt
|
|
|
40 |
|
41 |
EXPOSE 5000
|
42 |
|
43 |
+
# You can temporarily modify CMD for testing, then revert
|
44 |
+
# For example, to run curl and then start the app:
|
45 |
+
# CMD sh -c "echo '--- Testing msoauth2api.233285.xyz ---'; curl -v https://msoauth2api.233285.xyz/api/mail-new; echo '--- Starting Python app ---'; python run.py"
|
46 |
+
|
47 |
+
# Original CMD
|
48 |
+
CMD ["python", "run.py"]
|