mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-28 05:46:36 +08:00
63cd906cfc
- Merge all files inside openflare-server to the repository root directory. - Relocate agent, relay, and flared subprojects from internal/ to internal/apps/. - Combine docker-compose files and update build context paths to root. - Update GitHub workflows and Dockerfiles to refer to new directories and package names. - Rewrite Go package imports across all files. - Resolve database renew test race condition and clean up docs.
54 lines
1.1 KiB
Docker
54 lines
1.1 KiB
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
ARG NODE_VERSION=22
|
|
|
|
FROM node:${NODE_VERSION}-alpine AS base
|
|
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
|
|
RUN corepack enable && corepack prepare pnpm@10.10.0 --activate
|
|
|
|
FROM base AS builder
|
|
|
|
ENV NODE_ENV=production
|
|
ENV NEXT_PUBLIC_WAVELET_BACKEND_URL=https://build-placeholder.invalid
|
|
ENV WAVELET_SESSION_COOKIE_NAME=__WAVELET_SESSION_COOKIE_NAME__
|
|
ENV WAVELET_RATE_LIMIT_ENABLED=__WAVELET_RATE_LIMIT_ENABLED__
|
|
ENV WAVELET_BACKEND_URL=https://build-placeholder-2.invalid
|
|
|
|
ARG VERSION=""
|
|
ARG BUILD_DATE=""
|
|
|
|
ENV NEXT_PUBLIC_APP_VERSION=${VERSION}
|
|
ENV NEXT_PUBLIC_APP_BUILD_DATE=${BUILD_DATE}
|
|
|
|
WORKDIR /app
|
|
|
|
COPY frontend/package.json frontend/pnpm-lock.yaml ./
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
COPY frontend/ ./
|
|
|
|
RUN pnpm build
|
|
|
|
RUN grep -rl \
|
|
-e "https://build-placeholder.invalid" \
|
|
-e "https://build-placeholder-2.invalid" \
|
|
-e "__WAVELET_SESSION_COOKIE_NAME__" \
|
|
-e "__WAVELET_RATE_LIMIT_ENABLED__" \
|
|
/app/.next > /app/.replace.files
|
|
|
|
FROM base AS runner
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app ./
|
|
|
|
EXPOSE 3010
|
|
|
|
ENTRYPOINT ["./entrypoint.sh"]
|
|
CMD ["pnpm", "start"]
|