Add the Dockerfile definition for the build and running of the application.
This commit is contained in:
parent
a83b2c3045
commit
ea357e1f98
@ -0,0 +1,18 @@
|
|||||||
|
FROM oven/bun:1 AS base
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
FROM base AS install
|
||||||
|
RUN mkdir -p /temp/build
|
||||||
|
COPY package.json 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 . .
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
RUN bun run build
|
||||||
|
|
||||||
|
USER bun
|
||||||
|
EXPOSE 3000/tcp
|
||||||
|
ENTRYPOINT [ "bun", "run", "src/index.ts" ]
|
Loading…
Reference in New Issue
Block a user