Attempt fix monorepo build (#404)

* add latest changes and fix launcher

* add optional tag specify

* fix client release

* empty commit
This commit is contained in:
DecDuck
2026-04-27 13:06:36 +10:00
parent ff1144e016
commit bf7ce5927f
9 changed files with 187 additions and 22 deletions
-75
View File
@@ -1,75 +0,0 @@
# syntax=docker/dockerfile:1
FROM node:lts-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
WORKDIR /app
## so corepack knows pnpm's version
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
## prevent prompt to download
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
## setup for offline
RUN corepack pack
## don't call out to network anymore
ENV COREPACK_ENABLE_NETWORK=0
### INSTALL DEPS ONCE
FROM base AS deps
RUN pnpm install --frozen-lockfile --ignore-scripts
### BUILD TORRENTIAL
FROM rustlang/rust:nightly-alpine AS torrential-build
RUN apk add musl-dev
WORKDIR /build
COPY torrential .
RUN apk add protoc
RUN cargo build --release
### BUILD APP
FROM base AS build-system
ENV NODE_ENV=production
ENV NUXT_TELEMETRY_DISABLED=1
## add git so drop can determine its git ref at build
RUN apk add --no-cache git
## copy deps and rest of project files
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ARG BUILD_DROP_VERSION
ARG BUILD_GIT_REF
## build
RUN pnpm run postinstall && pnpm run build
# create run environment for Drop
FROM base AS run-system
ENV NODE_ENV=production
ENV NUXT_TELEMETRY_DISABLED=1
# RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn add --network-timeout 1000000 --no-lockfile --ignore-scripts prisma@6.11.1
RUN apk add --no-cache pnpm 7zip nginx
RUN pnpm install prisma@7.3.0
# init prisma to download all required files
RUN pnpm prisma init
COPY --from=build-system /app/prisma.config.ts ./
COPY --from=build-system /app/.output ./app
COPY --from=build-system /app/prisma ./prisma
COPY --from=build-system /app/build ./startup
COPY --from=build-system /app/build/nginx.conf /nginx.conf
COPY --from=torrential-build /build/target/release/torrential /usr/bin/
ENV LIBRARY="/library"
ENV DATA="/data"
ENV NGINX_CONFIG="/nginx.conf"
# Nuxt's port
ENV PORT=4000
CMD ["sh", "/app/startup/launch.sh"]
+6 -1
View File
@@ -11,7 +11,9 @@ export default withNuxt([
eslintConfigPrettier,
// vue-i18n plugin
// @ts-expect-error
...vueI18n.configs.recommended,
// @ts-expect-error
{
rules: {
// Optional.
@@ -34,8 +36,11 @@ export default withNuxt([
messageSyntaxVersion: "^11.0.0",
},
},
},
// @ts-expect-error
{
plugins: {
drop: { rules: { "no-prisma-delete": noPrismaDelete } },
},
},
}
]);
+2 -3
View File
@@ -56,7 +56,7 @@
"nuxt-security": "2.2.0",
"otp-io": "^1.2.7",
"parse-cosekey": "^1.0.2",
"pino": "^9.7.0",
"pino": "9.7.0",
"pino-pretty": "^13.0.0",
"prisma": "7.3.0",
"sanitize-filename": "^1.6.3",
@@ -103,6 +103,5 @@
"vue3-carousel-nuxt": {
"vue3-carousel": "^0.16.0"
}
},
"packageManager": "pnpm@10.29.1+sha512.48dae233635a645768a3028d19545cacc1688639eeb1f3734e42d6d6b971afbf22aa1ac9af52a173d9c3a20c15857cfa400f19994d79a2f626fcc73fccda9bbc"
}
}