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
|
RUN apk add --no-cache libc6-compat
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy only apps/web package files
|
# Copy only package files (context is already apps/web)
|
||||||
COPY apps/web/package.json apps/web/package-lock.json* ./
|
COPY package.json package-lock.json* ./
|
||||||
RUN npm ci --legacy-peer-deps
|
RUN npm ci --legacy-peer-deps
|
||||||
|
|
||||||
# Stage 2: Builder
|
# Stage 2: Builder
|
||||||
|
|||||||
@@ -68,11 +68,12 @@ export function MicrodaoBrandingCard({
|
|||||||
throw new Error('Failed to update branding');
|
throw new Error('Failed to update branding');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update preview
|
// Update preview - normalize URL to ensure proxy is used
|
||||||
|
const normalizedUrl = normalizeAssetUrl(imageUrl);
|
||||||
if (isLogo) {
|
if (isLogo) {
|
||||||
setPreviewLogo(imageUrl);
|
setPreviewLogo(normalizedUrl);
|
||||||
} else {
|
} else {
|
||||||
setPreviewBanner(imageUrl);
|
setPreviewBanner(normalizedUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
onUpdated?.();
|
onUpdated?.();
|
||||||
|
|||||||
Reference in New Issue
Block a user