feat: api endpoint parameter on build docker image

This commit is contained in:
Methapon2001 2023-11-30 17:00:52 +07:00
parent 957ee1110f
commit 3be4dead24
No known key found for this signature in database
GPG key ID: 849924FEF46BD132

View file

@ -6,6 +6,8 @@ ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
ARG API_ENDPOINT="/api/"
WORKDIR /app
FROM base as server
@ -20,6 +22,7 @@ RUN pnpm run build
FROM base as client
COPY ./client .
ENV VITE_API_ENDPOINT="$API_ENDPOINT"
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build