From e0c17f0fdea88b952a53356b25c7526f57f6dbc6 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Wed, 21 Apr 2021 04:37:26 -0500 Subject: [PATCH] Temporarily disable frontend building. Update dockerfile --- services/torrent-webui/Dockerfile | 17 +++++++++++++++++ services/torrent-webui/package.json | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/services/torrent-webui/Dockerfile b/services/torrent-webui/Dockerfile index 4f303c6..eb2b428 100644 --- a/services/torrent-webui/Dockerfile +++ b/services/torrent-webui/Dockerfile @@ -1,2 +1,19 @@ FROM node:14-alpine AS base WORKDIR /app + +# An image containing necessary components for building +FROM base AS builder +COPY package.json yarn.lock index.html postcss.config.js tailwind.config.js vite.config.ts tsconfig.* ./ +RUN rm -rf node_modules && yarn install --frozen-lockfile +COPY src src + +# An image to build the app +FROM builder AS build +RUN yarn run build + +# An image containing the built app and production dependencies +FROM base AS prod +COPY --from=build /app/build ./build +COPY package.json yarn.lock ./ +RUN rm -rf node_modules && yarn install --production --frozen-lockfile +CMD [ "yarn", "run", "start" ] diff --git a/services/torrent-webui/package.json b/services/torrent-webui/package.json index 129ddc0..c6b3cc7 100644 --- a/services/torrent-webui/package.json +++ b/services/torrent-webui/package.json @@ -8,7 +8,7 @@ "scripts": { "clean": "rimraf ./build", "dev": "vite", - "build": "yarn run build:backend && yarn run build:frontend", + "build": "yarn run build:backend", "build:backend": "tsc -p ./tsconfig.server.json", "build:frontend": "vue-tsc --noEmit -p ./tsconfig.vite.json && vite build", "start": "NODE_ENV=production node .",