chore: add pipeline
dev / deploy (push) Successful in 2m18s

This commit is contained in:
Daniil
2026-04-30 00:29:12 +03:00
parent 20928e9a60
commit 64b0d277af
6 changed files with 131 additions and 2 deletions
+55
View File
@@ -0,0 +1,55 @@
# syntax=docker/dockerfile:1
FROM oven/bun:1.3.5-alpine AS base
WORKDIR /app
ENV NEXT_TELEMETRY_DISABLED=1
# --------------------------
# Stage 1: Dependencies
# --------------------------
FROM base AS dependencies
COPY package.json bun.lock ./
RUN --mount=type=cache,target=/root/.bun/install/cache \
bun install --frozen-lockfile
# --------------------------
# Stage 2: Build
# --------------------------
FROM base AS builder
ENV NODE_ENV=production
ARG NEXT_PUBLIC_API_URL
ARG NEXT_PUBLIC_WS_URL
ARG NEXT_PUBLIC_MOCK_WS=false
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
ENV NEXT_PUBLIC_WS_URL=${NEXT_PUBLIC_WS_URL}
ENV NEXT_PUBLIC_MOCK_WS=${NEXT_PUBLIC_MOCK_WS}
COPY --from=dependencies /app/node_modules ./node_modules
COPY . .
RUN bun run build
# --------------------------
# Stage 3: Start
# --------------------------
FROM node:22-alpine AS runner
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV PORT=3000
ENV HOSTNAME=0.0.0.0
RUN addgroup --system --gid 1001 nodejs \
&& adduser --system --uid 1001 nextjs \
&& apk add --no-cache dumb-init
WORKDIR /app
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
CMD ["dumb-init", "node", "server.js"]