Simple, single-user event aggregation platform, for use in personal websites and other related places.
event-streaming single-user events event-aggregation
at develop 31 lines 981 B view raw
1FROM oven/bun:1 AS base 2WORKDIR /usr/src/app 3 4# install dependencies into temp directory 5# this will cache them and speed up future builds 6FROM base AS install 7RUN mkdir -p /temp/dev 8COPY package.json bun.lock /temp/dev/ 9RUN cd /temp/dev && bun install --frozen-lockfile 10 11# install with --production (exclude devDependencies) 12RUN mkdir -p /temp/prod 13COPY package.json bun.lock /temp/prod/ 14RUN cd /temp/prod && bun install --frozen-lockfile --production 15 16# copy node_modules from temp directory 17# then copy all (non-ignored) project files into the image 18FROM base AS prerelease 19COPY --from=install /temp/dev/node_modules node_modules 20COPY . . 21 22# copy production dependencies and source code into final image 23FROM base AS release 24COPY --from=install /temp/prod/node_modules node_modules 25COPY --from=prerelease /usr/src/app/package.json . 26COPY --from=prerelease /usr/src/app . 27 28# run the app 29USER bun 30EXPOSE 4300/tcp 31ENTRYPOINT [ "bun", "run", "prod" ]