copilot-api / Dockerfile
imseldrith's picture
Update Dockerfile
ec61b9c verified
raw
history blame contribute delete
583 Bytes
FROM oven/bun:1.2.19-alpine AS builder
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run build
FROM oven/bun:1.2.19-alpine AS runner
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile --production --ignore-scripts --no-cache
COPY --from=builder /app/dist ./dist
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=5 \
CMD wget -qO- http://127.0.0.1:7860/ >/dev/null || exit 1
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]