mirror of
https://forgejo.merr.is/annika/isl-vue3.git
synced 2025-12-13 15:58:58 -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
|
# 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
|
||||||
# install with --production (exclude devDependencies)
|
|
||||||
RUN mkdir -p /temp/prod
|
RUN mkdir -p /temp/dev
|
||||||
COPY package.json bun.lockb /temp/prod/
|
COPY package.json bun.lockb /temp/dev/
|
||||||
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
RUN cd /temp/dev && bun install --frozen-lockfile
|
||||||
|
|
||||||
# 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 node:21-bookworm AS prerelease
|
FROM base AS prerelease
|
||||||
WORKDIR /app
|
COPY --from=install /temp/dev/node_modules node_modules
|
||||||
|
|
||||||
COPY --from=install /temp/prod/node_modules node_modules
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# I don't have any tests, I am bad.
|
# [optional] tests & build
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
RUN npx vite build
|
RUN bunx --bun vite build
|
||||||
|
|
||||||
# Copy the distribution folder into the final image.
|
# Copy the distribution folder into the final image.
|
||||||
FROM nginx:stable-alpine as release
|
FROM nginx:stable-alpine as release
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue