Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fgreinacher
Copy link
Contributor

@fgreinacher fgreinacher commented Jan 8, 2025

Description

The Docker publish workflow has been broken since the migration to Next.js and/or PNPM, see https://github.com/asyncapi/studio/actions/workflows/publish-docker-image.yml.

This MR adapts the Dockerfile to be compatible with the new setup.

Related issue(s)

Discovered while trying to validate #1150

⚒️ with ❤️ by Siemens

Copy link

changeset-bot bot commented Jan 8, 2025

🦋 Changeset detected

Latest commit: b80cefd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/studio Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Jan 8, 2025

Deploy Preview for modest-rosalind-098b67 ready!

Name Link
🔨 Latest commit b80cefd
🔍 Latest deploy log https://app.netlify.com/sites/modest-rosalind-098b67/deploys/677e73952f98dd0008d279e3
😎 Deploy Preview https://deploy-preview-1160--modest-rosalind-098b67.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 8, 2025

Deploy Preview for asyncapi-studio-design-system ready!

Name Link
🔨 Latest commit b80cefd
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-studio-design-system/deploys/677e7395cd55470008a5bb88
😎 Deploy Preview https://deploy-preview-1160--asyncapi-studio-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -9,10 +9,10 @@ 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 link
Contributor Author

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.

@@ -21,32 +21,32 @@ ARG BASE_URL_PLACEHOLDER
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app

RUN npm install --global pnpm@latest-10
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# 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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed anymore.

@@ -28,7 +28,8 @@
"./src/*",
"./public/*"
]
}
},
"types": ["cypress"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

@fgreinacher fgreinacher force-pushed the ci/studio-docker branch 3 times, most recently from b95e196 to 3664fde Compare January 8, 2025 12:44
Copy link

sonarqubecloud bot commented Jan 8, 2025

# 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
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

@fgreinacher
Copy link
Contributor Author

/ptal

@asyncapi-bot
Copy link
Contributor

@Amzani @magicmatatjahu @KhudaDad414 @Shurtu-gal Please take a look at this PR. Thanks! 👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

2 participants