-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(studio): fix Docker build #1160
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@asyncapi/studio": patch | ||
--- | ||
|
||
Fix Docker build for AsyncAPI Studio |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As suggested in https://pnpm.io/installation#using-npm |
||
|
||
# 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not needed anymore. |
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use static HTML export so that it works with the nginx-based setup. This has some limitations, but none of them seem to apply here at the moment. A potential future improvement would be to re-engineer the docker setup, but I'd like to get it working again first. |
||
|
||
|
||
FROM docker.io/library/nginx:1.25.5-alpine as runtime | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,8 @@ | |
"./src/*", | ||
"./public/*" | ||
] | ||
} | ||
}, | ||
"types": ["cypress"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Required so that the Next.js type checker is happy, see https://docs.cypress.io/app/tooling/typescript-support#Configure-tsconfigjson. |
||
}, | ||
"include": [ | ||
"next-env.d.ts", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to pin the version because the config files here are not compatible with Turbo v2.