feat: add examples

This commit is contained in:
2026-08-30 00:23:53 +07:00 Unverified
parent d259b49b8a
commit 32ec172335
6 changed files with 354 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
# syntax=docker/dockerfile:1.7
FROM oven/bun:canary-alpine AS base
RUN addgroup -g 1001 app && adduser -D -u 1001 -G app app
WORKDIR /app
FROM base AS dependencies
USER app
COPY --chown=1001:1001 package.json bun.lock ./
RUN --mount=type=cache,target=/home/app/.bun,uid=1001,gid=1001 \
bun install --frozen-lockfile
FROM dependencies AS build
COPY --chown=1001:1001 . .
# Keep the public directory available even when the application does not use one.
RUN mkdir -p public && bun run build
FROM base AS runner
ENV NODE_ENV=production \
HOSTNAME=0.0.0.0 \
PORT=3000
USER app
COPY --from=build --chown=1001:1001 /app/.next/standalone ./
COPY --from=build --chown=1001:1001 /app/.next/static ./.next/static
COPY --from=build --chown=1001:1001 /app/public ./public
EXPOSE 3000
CMD ["bun", "server.js"]