this fixed the docker container for some reason
All checks were successful
Docker / build (push) Successful in 20s
All checks were successful
Docker / build (push) Successful in 20s
This commit is contained in:
parent
42c2dc7e97
commit
1c65788cc2
@ -6,9 +6,6 @@ WORKDIR /usr/src/app
|
|||||||
# install dependencies into temp directory
|
# install dependencies into temp directory
|
||||||
# this will cache them and speed up future builds
|
# this will cache them and speed up future builds
|
||||||
FROM base AS install
|
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)
|
# install with --production (exclude devDependencies)
|
||||||
RUN mkdir -p /temp/prod
|
RUN mkdir -p /temp/prod
|
||||||
@ -18,7 +15,7 @@ RUN cd /temp/prod && bun install --frozen-lockfile --production
|
|||||||
# copy node_modules from temp directory
|
# copy node_modules from temp directory
|
||||||
# then copy all (non-ignored) project files into the image
|
# then copy all (non-ignored) project files into the image
|
||||||
FROM base AS prerelease
|
FROM base AS prerelease
|
||||||
COPY --from=install /temp/dev/node_modules node_modules
|
COPY --from=install /temp/prod/node_modules node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
@ -29,10 +26,10 @@ FROM base AS release
|
|||||||
# COPY --from=install /temp/prod/node_modules node_modules
|
# COPY --from=install /temp/prod/node_modules node_modules
|
||||||
# COPY --from=prerelease /usr/src/app/index.ts .
|
# COPY --from=prerelease /usr/src/app/index.ts .
|
||||||
COPY --from=prerelease /usr/src/app/package.json .
|
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
|
COPY --from=prerelease /usr/src/app/static/ ./static
|
||||||
|
|
||||||
# run the app
|
# run the app
|
||||||
USER bun
|
USER bun
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
ENTRYPOINT [ "bun", "run", "index.js" ]
|
ENTRYPOINT [ "bun", "run", "build/index.js" ]
|
||||||
|
@ -26,4 +26,7 @@ app.get("/accounts", c => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
export default app;
|
export default {
|
||||||
|
port: 3000,
|
||||||
|
fetch: app.fetch,
|
||||||
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user