21 lines
469 B
Docker
21 lines
469 B
Docker
FROM oven/bun:1 AS base
|
|
WORKDIR /usr/src/app
|
|
|
|
FROM base AS install
|
|
RUN mkdir -p /temp/build
|
|
COPY ./chat-app/package.json ./chat-app/bun.lockb /temp/build/
|
|
RUN cd /temp/build && bun install --frozen-lockfile
|
|
|
|
FROM base AS release
|
|
COPY --from=install /temp/build/node_modules node_modules
|
|
COPY ./chat-app .
|
|
|
|
ENV NODE_ENV=production
|
|
ENV APP_URL=chat.freedoom.party
|
|
ENV APP_PORT=5000
|
|
RUN bun run build
|
|
|
|
USER bun
|
|
EXPOSE 3000/tcp
|
|
ENTRYPOINT [ "bun", "run", "src/index.ts" ]
|