this fixed the docker container for some reason
All checks were successful
Docker / build (push) Successful in 20s

This commit is contained in:
Robin Bärtschi 2025-02-23 11:44:21 +01:00
parent 42c2dc7e97
commit 1c65788cc2
2 changed files with 7 additions and 7 deletions

View File

@ -6,9 +6,6 @@ WORKDIR /usr/src/app
# install dependencies into temp directory
# this will cache them and speed up future builds
FROM base AS install
RUN mkdir -p /temp/dev
COPY package.json bun.lock /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile
# install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod
@ -18,7 +15,7 @@ RUN cd /temp/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 /temp/dev/node_modules node_modules
COPY --from=install /temp/prod/node_modules node_modules
COPY . .
ENV NODE_ENV=production
@ -29,10 +26,10 @@ FROM base AS release
# COPY --from=install /temp/prod/node_modules node_modules
# COPY --from=prerelease /usr/src/app/index.ts .
COPY --from=prerelease /usr/src/app/package.json .
COPY --from=prerelease /usr/src/app/build/ .
COPY --from=prerelease /usr/src/app/build/ ./build
COPY --from=prerelease /usr/src/app/static/ ./static
# run the app
USER bun
EXPOSE 3000
ENTRYPOINT [ "bun", "run", "index.js" ]
ENTRYPOINT [ "bun", "run", "build/index.js" ]

View File

@ -26,4 +26,7 @@ app.get("/accounts", c => {
);
});
export default app;
export default {
port: 3000,
fetch: app.fetch,
};