2024-12-23 21:25:53 +01:00
|
|
|
ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base:3.21
|
2024-08-13 13:50:42 +02:00
|
|
|
|
2024-08-13 15:46:14 +02:00
|
|
|
FROM node:20 AS frontend-builder
|
2024-08-13 13:23:32 +02:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY frontend/package.json frontend/pnpm-lock.yaml ./
|
2024-08-13 16:49:18 +02:00
|
|
|
RUN corepack enable && pnpm install
|
2024-08-13 13:23:32 +02:00
|
|
|
|
|
|
|
COPY frontend/ .
|
|
|
|
|
|
|
|
RUN pnpm build
|
|
|
|
|
2024-08-13 15:46:14 +02:00
|
|
|
FROM node:20 AS backend-builder
|
2024-08-13 13:23:32 +02:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY backend/package.json backend/pnpm-lock.yaml ./
|
2024-08-13 16:49:18 +02:00
|
|
|
RUN corepack enable && pnpm install
|
2024-08-13 13:23:32 +02:00
|
|
|
|
|
|
|
COPY backend/ .
|
|
|
|
|
|
|
|
RUN pnpm build
|
|
|
|
|
2024-08-13 13:47:22 +02:00
|
|
|
FROM $BUILD_FROM
|
2019-12-19 15:08:47 +01:00
|
|
|
|
2021-02-10 16:38:34 +01:00
|
|
|
COPY rootfs/etc /etc/
|
|
|
|
COPY rootfs/usr /usr/
|
2019-12-19 15:08:47 +01:00
|
|
|
|
2024-08-13 16:49:18 +02:00
|
|
|
RUN apk add --no-cache nodejs-current && mkdir -p /usr/local/sbin/ && ln -s /usr/bin/node /usr/local/sbin/node
|
2021-02-10 16:38:34 +01:00
|
|
|
|
|
|
|
WORKDIR /opt/nextcloud_backup/
|
|
|
|
|
2024-08-13 13:23:32 +02:00
|
|
|
COPY backend/package.json backend/pnpm-lock.yaml ./
|
|
|
|
|
|
|
|
COPY --from=backend-builder /app/dist .
|
2024-08-13 15:53:02 +02:00
|
|
|
COPY --from=backend-builder /app/node_modules ./node_modules
|
2024-08-13 13:23:32 +02:00
|
|
|
COPY --from=frontend-builder /app/dist ./public
|