Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
FROM oven/bun:1.2.19-alpine AS builder
|
| 2 |
WORKDIR /app
|
| 3 |
|
| 4 |
-
COPY
|
| 5 |
RUN bun install --frozen-lockfile
|
| 6 |
|
| 7 |
COPY . .
|
|
@@ -10,16 +10,17 @@ RUN bun run build
|
|
| 10 |
FROM oven/bun:1.2.19-alpine AS runner
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
-
COPY
|
| 14 |
RUN bun install --frozen-lockfile --production --ignore-scripts --no-cache
|
| 15 |
|
| 16 |
COPY --from=builder /app/dist ./dist
|
| 17 |
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
-
HEALTHCHECK --interval=30s --timeout=
|
| 21 |
-
CMD wget
|
| 22 |
|
| 23 |
COPY entrypoint.sh /entrypoint.sh
|
| 24 |
RUN chmod +x /entrypoint.sh
|
|
|
|
| 25 |
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
| 1 |
FROM oven/bun:1.2.19-alpine AS builder
|
| 2 |
WORKDIR /app
|
| 3 |
|
| 4 |
+
COPY package.json bun.lock ./
|
| 5 |
RUN bun install --frozen-lockfile
|
| 6 |
|
| 7 |
COPY . .
|
|
|
|
| 10 |
FROM oven/bun:1.2.19-alpine AS runner
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
+
COPY package.json bun.lock ./
|
| 14 |
RUN bun install --frozen-lockfile --production --ignore-scripts --no-cache
|
| 15 |
|
| 16 |
COPY --from=builder /app/dist ./dist
|
| 17 |
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=5 \
|
| 21 |
+
CMD wget -qO- http://127.0.0.1:7860/ >/dev/null || exit 1
|
| 22 |
|
| 23 |
COPY entrypoint.sh /entrypoint.sh
|
| 24 |
RUN chmod +x /entrypoint.sh
|
| 25 |
+
|
| 26 |
ENTRYPOINT ["/entrypoint.sh"]
|