mirror of
https://codeberg.org/Ewen/rudibridge.git
synced 2024-12-22 03:02:32 +00:00
28 lines
536 B
Docker
28 lines
536 B
Docker
FROM node:21-alpine as frontend-requirements
|
|
|
|
RUN npm install -g pnpm
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN pnpm install
|
|
|
|
|
|
FROM frontend-requirements as frontend-dev
|
|
CMD ["pnpm", "run", "dev", "--host", "0.0.0.0"]
|
|
|
|
|
|
FROM frontend-requirements as build
|
|
|
|
ARG VITE_API_ENDPOINT
|
|
ENV VITE_API_ENDPOINT=${VITE_API_ENDPOINT}
|
|
WORKDIR /app
|
|
COPY . ./
|
|
RUN pnpm run build
|
|
|
|
FROM nginx:1.23 as final
|
|
COPY --from=build /app/dist /app/dist
|
|
|
|
ARG nginx_uid=33
|
|
ARG nginx_gid=33
|
|
|
|
RUN usermod -u ${nginx_uid} -o nginx && groupmod -g ${nginx_gid} -o nginx
|