fix: switch from compiled bun binary to bun run to fix Fastify plugin name crash
All checks were successful
Build & Release / build (push) Successful in 1m11s
All checks were successful
Build & Release / build (push) Successful in 1m11s
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -6,8 +6,9 @@ COPY packages/backend/package.json packages/backend/
|
||||
COPY packages/admin/package.json packages/admin/
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
FROM oven/bun:1.3.11-alpine AS build
|
||||
FROM oven/bun:1.3.11-alpine
|
||||
ARG APP_VERSION=dev
|
||||
ENV APP_VERSION=${APP_VERSION}
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY --from=deps /app/packages/shared/node_modules ./packages/shared/node_modules
|
||||
@@ -16,18 +17,11 @@ COPY packages/shared ./packages/shared
|
||||
COPY packages/backend ./packages/backend
|
||||
COPY package.json ./
|
||||
COPY tsconfig.base.json ./
|
||||
WORKDIR /app/packages/backend
|
||||
RUN bun build src/main.ts --compile --outfile /app/server \
|
||||
--define "process.env.APP_VERSION='${APP_VERSION}'"
|
||||
|
||||
FROM alpine:3.21
|
||||
RUN apk add --no-cache libstdc++ && addgroup -S app && adduser -S app -G app
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/server ./server
|
||||
COPY --from=build /app/packages/backend/src/db/migrations ./migrations
|
||||
RUN addgroup -S app && adduser -S app -G app
|
||||
COPY packages/backend/src/db/migrations ./migrations
|
||||
ENV MIGRATIONS_DIR=/app/migrations
|
||||
EXPOSE 8000
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
||||
CMD wget -qO- http://localhost:8000/v1/health || exit 1
|
||||
USER app
|
||||
CMD ["./server"]
|
||||
CMD ["bun", "run", "packages/backend/src/main.ts"]
|
||||
|
||||
Reference in New Issue
Block a user