2024-10-24 02:48:00 +00:00
|
|
|
FROM oven/bun:1 AS base
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
FROM base AS install
|
|
|
|
RUN mkdir -p /temp/build
|
2024-10-27 01:29:56 +00:00
|
|
|
COPY ./chat-app/package.json ./chat-app/bun.lockb /temp/build/
|
2024-10-24 02:48:00 +00:00
|
|
|
RUN cd /temp/build && bun install --frozen-lockfile
|
|
|
|
|
|
|
|
FROM base AS release
|
|
|
|
COPY --from=install /temp/build/node_modules node_modules
|
2024-10-27 01:29:56 +00:00
|
|
|
COPY ./chat-app .
|
2024-10-24 02:48:00 +00:00
|
|
|
|
|
|
|
ENV NODE_ENV=production
|
2024-10-27 02:25:34 +00:00
|
|
|
ENV APP_URL="chat.freedoom.party"
|
2024-10-27 02:02:21 +00:00
|
|
|
ENV APP_PORT=5000
|
2024-10-24 02:48:00 +00:00
|
|
|
RUN bun run build
|
|
|
|
|
|
|
|
USER bun
|
2024-10-27 02:05:43 +00:00
|
|
|
ENTRYPOINT [ "bun", "src/index.ts" ]
|