remove .env file, setting it in compose file
Some checks failed
CI / build-and-test (push) Failing after 4m11s
Some checks failed
CI / build-and-test (push) Failing after 4m11s
This commit is contained in:
@@ -7,12 +7,12 @@ WORKDIR /usr/src/app
|
|||||||
# 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
|
RUN mkdir -p /temp/dev
|
||||||
COPY .env package.json bun.lock /temp/dev/
|
COPY package.json bun.lock /temp/dev/
|
||||||
RUN cd /temp/dev && bun install --frozen-lockfile
|
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
|
||||||
COPY .env package.json bun.lock /temp/prod/
|
COPY package.json bun.lock /temp/prod/
|
||||||
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
||||||
|
|
||||||
# copy node_modules from temp directory
|
# copy node_modules from temp directory
|
||||||
@@ -28,7 +28,6 @@ RUN bun --bun run build
|
|||||||
# copy production dependencies and source code into final image
|
# copy production dependencies and source code into final image
|
||||||
FROM base AS release
|
FROM base AS release
|
||||||
COPY --from=install /temp/prod/node_modules node_modules
|
COPY --from=install /temp/prod/node_modules node_modules
|
||||||
COPY --from=install /temp/prod/.env .env
|
|
||||||
COPY --from=prerelease /usr/src/app/build .
|
COPY --from=prerelease /usr/src/app/build .
|
||||||
|
|
||||||
# run the app
|
# run the app
|
||||||
|
|||||||
Reference in New Issue
Block a user