mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-15 11:21:57 +00:00
feat: add canvas runtime dependencies to frontend Docker image for Trianglify support
This commit is contained in:
@@ -39,6 +39,9 @@ RUN npm run build
|
|||||||
# Production stage
|
# Production stage
|
||||||
FROM nginxinc/nginx-unprivileged:alpine
|
FROM nginxinc/nginx-unprivileged:alpine
|
||||||
|
|
||||||
|
# Install runtime dependencies for canvas
|
||||||
|
RUN apk add --no-cache cairo pango jpeg libpng giflib
|
||||||
|
|
||||||
ENV BACKEND_HOST=backend \
|
ENV BACKEND_HOST=backend \
|
||||||
BACKEND_PORT=3001
|
BACKEND_PORT=3001
|
||||||
|
|
||||||
|
|||||||
@@ -265,12 +265,9 @@ const Layout = ({ children }) => {
|
|||||||
pattern.toCanvas(bgCanvasRef.current);
|
pattern.toCanvas(bgCanvasRef.current);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Canvas/trianglify not available, skip background generation silently
|
// Canvas/trianglify not available, skip background generation
|
||||||
// Only log in development for debugging
|
|
||||||
if (import.meta.env.DEV) {
|
|
||||||
console.warn("Could not generate Trianglify background:", error);
|
console.warn("Could not generate Trianglify background:", error);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
generateBackground();
|
generateBackground();
|
||||||
|
|||||||
@@ -81,12 +81,9 @@ const Login = () => {
|
|||||||
pattern.toCanvas(canvasRef.current);
|
pattern.toCanvas(canvasRef.current);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Canvas/trianglify not available, skip background generation silently
|
// Canvas/trianglify not available, skip background generation
|
||||||
// Only log in development for debugging
|
|
||||||
if (import.meta.env.DEV) {
|
|
||||||
console.warn("Could not generate Trianglify background:", error);
|
console.warn("Could not generate Trianglify background:", error);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
generateBackground();
|
generateBackground();
|
||||||
|
|||||||
Reference in New Issue
Block a user