Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +6 -3
Dockerfile
CHANGED
@@ -17,16 +17,16 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt || echo "No require
|
|
17 |
COPY --chown=user . /app
|
18 |
|
19 |
# Install Node.js separately
|
20 |
-
FROM node:20
|
21 |
WORKDIR /app
|
22 |
COPY . /app
|
|
|
23 |
|
24 |
# Final container merging Python and Node.js
|
25 |
FROM python:3.11-slim-bullseye
|
26 |
|
27 |
# Install Node.js manually
|
28 |
RUN apt-get update && apt-get install -y nodejs npm && rm -rf /var/lib/apt/lists/*
|
29 |
-
RUN npm install --production
|
30 |
|
31 |
# Copy application files
|
32 |
COPY --from=nodebuilder /app /app
|
@@ -38,5 +38,8 @@ RUN pip install --no-cache-dir uvicorn
|
|
38 |
# Expose necessary ports
|
39 |
EXPOSE 3000 7860
|
40 |
|
|
|
|
|
|
|
41 |
# Run both services
|
42 |
-
CMD ["/bin/bash", "-c", "node server.js & uvicorn app:app --host 0.0.0.0 --port 7860"]
|
|
|
17 |
COPY --chown=user . /app
|
18 |
|
19 |
# Install Node.js separately
|
20 |
+
FROM node:20 AS nodebuilder # Switched to full Node.js image
|
21 |
WORKDIR /app
|
22 |
COPY . /app
|
23 |
+
RUN npm install --production
|
24 |
|
25 |
# Final container merging Python and Node.js
|
26 |
FROM python:3.11-slim-bullseye
|
27 |
|
28 |
# Install Node.js manually
|
29 |
RUN apt-get update && apt-get install -y nodejs npm && rm -rf /var/lib/apt/lists/*
|
|
|
30 |
|
31 |
# Copy application files
|
32 |
COPY --from=nodebuilder /app /app
|
|
|
38 |
# Expose necessary ports
|
39 |
EXPOSE 3000 7860
|
40 |
|
41 |
+
# Verify files before starting
|
42 |
+
RUN ls -l /app
|
43 |
+
|
44 |
# Run both services
|
45 |
+
CMD ["/bin/bash", "-c", "node --version && ls -l /app && node server.js & uvicorn app:app --host 0.0.0.0 --port 7860"]
|