Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
|
@@ -10,16 +10,16 @@ RUN npm ci --no-audit --no-fund || npm install --no-audit --no-fund
|
|
| 10 |
RUN npm run build
|
| 11 |
|
| 12 |
RUN mkdir -p /build_output \
|
| 13 |
-
&& FILE=$(find . -type f -name "eruda-
|
| 14 |
&& if [ -z "$FILE" ]; then echo "ビルド成果物が見つかりません"; exit 1; fi \
|
| 15 |
-
&& cp "$FILE" /build_output/eruda-
|
| 16 |
|
| 17 |
# 2. Python + Flask のランタイム
|
| 18 |
FROM python:3.11-slim
|
| 19 |
RUN pip install --no-cache-dir flask
|
| 20 |
WORKDIR /app
|
| 21 |
|
| 22 |
-
COPY --from=builder /build_output/eruda-
|
| 23 |
COPY app.py /app/app.py
|
| 24 |
|
| 25 |
EXPOSE 7860
|
|
|
|
| 10 |
RUN npm run build
|
| 11 |
|
| 12 |
RUN mkdir -p /build_output \
|
| 13 |
+
&& FILE=$(find . -type f -name "eruda-code*.js" | grep -E "dist|build|lib|^\./eruda-code" | head -n1) \
|
| 14 |
&& if [ -z "$FILE" ]; then echo "ビルド成果物が見つかりません"; exit 1; fi \
|
| 15 |
+
&& cp "$FILE" /build_output/eruda-code.js
|
| 16 |
|
| 17 |
# 2. Python + Flask のランタイム
|
| 18 |
FROM python:3.11-slim
|
| 19 |
RUN pip install --no-cache-dir flask
|
| 20 |
WORKDIR /app
|
| 21 |
|
| 22 |
+
COPY --from=builder /build_output/eruda-code.js /app/static/eruda-code.js
|
| 23 |
COPY app.py /app/app.py
|
| 24 |
|
| 25 |
EXPOSE 7860
|