mirror of
https://forgejo.merr.is/annika/isl-vue3.git
synced 2025-12-11 12:26:36 -05:00
I Don't Know Why This Would Fix It
This commit is contained in:
parent
0b62980340
commit
a2be864314
1 changed files with 8 additions and 10 deletions
18
Dockerfile
18
Dockerfile
|
|
@ -9,22 +9,20 @@ WORKDIR /app
|
|||
# install dependencies into temp directory
|
||||
# this will cache them and speed up future builds
|
||||
FROM base as install
|
||||
# install with --production (exclude devDependencies)
|
||||
RUN mkdir -p /temp/prod
|
||||
COPY package.json bun.lockb /temp/prod/
|
||||
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
||||
|
||||
RUN mkdir -p /temp/dev
|
||||
COPY package.json bun.lockb /temp/dev/
|
||||
RUN cd /temp/dev && bun install --frozen-lockfile
|
||||
|
||||
# copy node_modules from temp directory
|
||||
# then copy all (non-ignored) project files into the image
|
||||
FROM node:21-bookworm AS prerelease
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=install /temp/prod/node_modules node_modules
|
||||
FROM base AS prerelease
|
||||
COPY --from=install /temp/dev/node_modules node_modules
|
||||
COPY . .
|
||||
|
||||
# I don't have any tests, I am bad.
|
||||
# [optional] tests & build
|
||||
ENV NODE_ENV=production
|
||||
RUN npx vite build
|
||||
RUN bunx --bun vite build
|
||||
|
||||
# Copy the distribution folder into the final image.
|
||||
FROM nginx:stable-alpine as release
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue