Dockerfile no longer builds client

This proved to be extremely slow on emulated hardware to build e.g. the linux/arm/v7 image.
Since the built client is architecture agnostic, it's instead now built on the native hardware and inserted into the docker image.
This commit is contained in:
Donkie
2023-12-17 22:53:17 +01:00
parent fe6422597f
commit 60b67ee758
2 changed files with 63 additions and 13 deletions

View File

@@ -1,12 +1,3 @@
FROM node:20-alpine as client-builder
COPY ./client /client
WORKDIR /client
RUN npm ci
RUN rm -f .env && echo "VITE_APIURL=/api/v1" > .env.production
RUN npm run build
FROM python:3.11-alpine as python-builder
RUN apk add --no-cache g++ python3-dev libpq-dev libstdc++
@@ -49,7 +40,7 @@ RUN adduser -D app \
USER app
# Copy built client
COPY --chown=app:app --from=client-builder /client/dist /home/app/spoolman/client/dist
COPY --chown=app:app ./client/dist /home/app/spoolman/client/dist
# Copy built app
COPY --chown=app:app --from=python-builder /home/app/spoolman /home/app/spoolman