Docker
You use Elysia with Docker with the following Dockerfile below:
typescript
FROM debian:11.6-slim as builder
WORKDIR /app
RUN apt update
RUN apt install curl unzip -y
RUN curl https://bun.sh/install | bash
COPY package.json .
COPY bun.lockb .
RUN /root/.bun/bin/bun install --production
# ? -------------------------
FROM gcr.io/distroless/base
WORKDIR /app
COPY --from=builder /root/.bun/bin/bun bun
COPY --from=builder /app/node_modules node_modules
COPY src src
# COPY public public
# COPY tsconfig.json .
ENV ENV production
CMD ["./bun", "src/index.ts"]
EXPOSE 3000
FROM debian:11.6-slim as builder
WORKDIR /app
RUN apt update
RUN apt install curl unzip -y
RUN curl https://bun.sh/install | bash
COPY package.json .
COPY bun.lockb .
RUN /root/.bun/bin/bun install --production
# ? -------------------------
FROM gcr.io/distroless/base
WORKDIR /app
COPY --from=builder /root/.bun/bin/bun bun
COPY --from=builder /app/node_modules node_modules
COPY src src
# COPY public public
# COPY tsconfig.json .
ENV ENV production
CMD ["./bun", "src/index.ts"]
EXPOSE 3000