Skip to content

Commit

Permalink
fix(studio): fix Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
fgreinacher committed Jan 8, 2025
1 parent b696d79 commit 3664fde
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-waves-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@asyncapi/studio": patch
---

Fix Docker build for AsyncAPI Studio
12 changes: 6 additions & 6 deletions apps/studio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apps/studio/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
3 changes: 2 additions & 1 deletion apps/studio/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"./src/*",
"./public/*"
]
}
},
"types": ["cypress"]
},
"include": [
"next-env.d.ts",
Expand Down

0 comments on commit 3664fde

Please sign in to comment.