fix: Fix Dockerfile build context and ensure normalizeAssetUrl is used everywhere
- Fix Dockerfile to use correct paths (context is already apps/web) - Ensure normalizeAssetUrl is used when setting preview URLs after upload - This ensures all asset URLs go through the proxy
This commit is contained in:
@@ -6,8 +6,8 @@ FROM node:20-alpine AS deps
|
||||
RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only apps/web package files
|
||||
COPY apps/web/package.json apps/web/package-lock.json* ./
|
||||
# Copy only package files (context is already apps/web)
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm ci --legacy-peer-deps
|
||||
|
||||
# Stage 2: Builder
|
||||
|
||||
@@ -68,11 +68,12 @@ export function MicrodaoBrandingCard({
|
||||
throw new Error('Failed to update branding');
|
||||
}
|
||||
|
||||
// Update preview
|
||||
// Update preview - normalize URL to ensure proxy is used
|
||||
const normalizedUrl = normalizeAssetUrl(imageUrl);
|
||||
if (isLogo) {
|
||||
setPreviewLogo(imageUrl);
|
||||
setPreviewLogo(normalizedUrl);
|
||||
} else {
|
||||
setPreviewBanner(imageUrl);
|
||||
setPreviewBanner(normalizedUrl);
|
||||
}
|
||||
|
||||
onUpdated?.();
|
||||
|
||||
Reference in New Issue
Block a user