diff --git a/.changeset/sour-waves-visit.md b/.changeset/sour-waves-visit.md new file mode 100644 index 000000000..50701f1d5 --- /dev/null +++ b/.changeset/sour-waves-visit.md @@ -0,0 +1,5 @@ +--- +"@asyncapi/studio": patch +--- + +Fix Docker build for AsyncAPI Studio diff --git a/apps/studio/Dockerfile b/apps/studio/Dockerfile index 47d00ae09..fa9aa1a50 100644 --- a/apps/studio/Dockerfile +++ b/apps/studio/Dockerfile @@ -9,7 +9,7 @@ RUN apk add --no-cache libc6-compat RUN apk update # Set working directory WORKDIR /app -RUN npm install --global turbo +RUN npm install --global turbo@1 COPY . . RUN turbo prune --scope=@asyncapi/studio --docker @@ -21,17 +21,17 @@ ARG BASE_URL_PLACEHOLDER RUN apk add --no-cache libc6-compat RUN apk update WORKDIR /app - +RUN npm install --global pnpm@latest-10 + # First install the dependencies (as they change less often) COPY .gitignore .gitignore COPY --from=builder /app/out/json/ . -COPY --from=builder /app/out/package-lock.json ./package-lock.json -RUN PUPPETEER_SKIP_DOWNLOAD=true npm ci - +RUN PUPPETEER_SKIP_DOWNLOAD=true pnpm install + # Build the project COPY --from=builder /app/out/full/ . -RUN PUBLIC_URL=${BASE_URL_PLACEHOLDER} npm run build:studio +RUN PUBLIC_URL=${BASE_URL_PLACEHOLDER} NEXT_CONFIG_OUTPUT=export pnpm run build:studio FROM docker.io/library/nginx:1.25.5-alpine as runtime diff --git a/apps/studio/next.config.js b/apps/studio/next.config.js index 65c72902f..7cd29a337 100644 --- a/apps/studio/next.config.js +++ b/apps/studio/next.config.js @@ -36,8 +36,8 @@ const nextConfig = { return config; }, - output: 'standalone', + output: process.env.NEXT_CONFIG_OUTPUT ?? 'standalone', distDir: 'build' }; -module.exports = nextConfig; +module.exports = nextConfig; \ No newline at end of file diff --git a/apps/studio/tsconfig.json b/apps/studio/tsconfig.json index 119082b0b..47e8861dc 100644 --- a/apps/studio/tsconfig.json +++ b/apps/studio/tsconfig.json @@ -28,7 +28,8 @@ "./src/*", "./public/*" ] - } + }, + "types": ["cypress"] }, "include": [ "next-env.d.ts",