diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 71710c0..0000000 --- a/.dockerignore +++ /dev/null @@ -1,16 +0,0 @@ -node_modules -Dockerfile* -docker-compose* -.dockerignore -.git -.gitignore -README.md -LICENSE -.vscode -Makefile -helm-charts -.env -.dev.vars -.editorconfig -.idea -coverage* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 0a3057e..0000000 --- a/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -# use the official Bun image -# see all versions at https://hub.docker.com/r/oven/bun/tags -FROM oven/bun:1 as base -WORKDIR /usr/app - -# install dependencies into temp directory -# this will cache them and speed up future builds -FROM base AS install -RUN mkdir -p /tmp/dev -COPY package.json bun.lockb /tmp/dev/ -RUN cd /tmp/dev && bun install --frozen-lockfile - -# install with --production (exclude devDependencies) -RUN mkdir -p /tmp/prod -COPY package.json bun.lockb /tmp/prod/ -RUN cd /tmp/prod && bun install --frozen-lockfile --production - -# copy node_modules from temp directory -# then copy all (non-ignored) project files into the image -FROM base AS prerelease -COPY --from=install /tmp/dev/node_modules node_modules -COPY . . - -# [optional] tests & build -ENV NODE_ENV=production -RUN bun test -RUN bun build --compile src/index.ts --outfile=aniplay - -# copy production dependencies and source code into final image -FROM base AS release -COPY --from=install /tmp/prod/node_modules node_modules -COPY --from=prerelease /usr/app/src ./src -COPY --from=prerelease /usr/app/package.json . -COPY --from=prerelease /usr/app/tsconfig.json . -# TODO: uncomment once v2 is ready -# COPY --from=prerelease /usr/app/drizzle.config.ts . - -# run the app -USER bun -EXPOSE 3000 -ENTRYPOINT [ "bun", "run", "prod:server" ] \ No newline at end of file