feat(brand): add custom Aura AI Studio SVG logo & /favicon.ico route for Coolify Canvas

This commit is contained in:
Amirul Islam Redwan71
2026-11-23 20:44:36 +06:00
parent 54091f4578
commit 7c5bcd9ac7
4 changed files with 22 additions and 4 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ RUN rm -rf /usr/share/nginx/html/*
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Publish web assets only. Backend source, tests and local configuration are not static downloads.
COPY index.html app.js workspace.js style.css sw.js manifest.json gt_full_catalog.json /usr/share/nginx/html/
COPY index.html app.js workspace.js style.css sw.js manifest.json favicon.svg gt_full_catalog.json /usr/share/nginx/html/
COPY assets/ /usr/share/nginx/html/assets/
COPY data/ /usr/share/nginx/html/data/
+1 -1
View File
@@ -5,7 +5,7 @@ ENV NODE_ENV=production PORT=3000 STUDIO_DATA_DIR=/data/studio
COPY package.json package-lock.json ./
RUN npm ci --omit=dev --ignore-scripts --no-fund --no-audit
COPY server/ ./server/
COPY index.html app.js workspace.js style.css sw.js manifest.json ./public/
COPY index.html app.js workspace.js style.css sw.js manifest.json favicon.svg ./public/
COPY assets/ ./public/assets/
RUN mkdir -p /data/studio && chown -R node:node /app /data/studio
USER node
+18
View File
@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" fill="none">
<defs>
<linearGradient id="bgStudio" x1="0" y1="0" x2="128" y2="128" gradientUnits="userSpaceOnUse">
<stop offset="0%" stop-color="#1d0d38"/>
<stop offset="100%" stop-color="#0b0718"/>
</linearGradient>
<linearGradient id="prismGrad" x1="22" y1="22" x2="106" y2="106" gradientUnits="userSpaceOnUse">
<stop offset="0%" stop-color="#c084fc"/>
<stop offset="50%" stop-color="#ec4899"/>
<stop offset="100%" stop-color="#fbbf24"/>
</linearGradient>
</defs>
<rect width="128" height="128" rx="28" fill="url(#bgStudio)"/>
<rect x="4" y="4" width="120" height="120" rx="24" stroke="#c084fc" stroke-opacity="0.4" stroke-width="2.5"/>
<path d="M64 24L98 64L64 104L30 64L64 24Z" fill="url(#prismGrad)" fill-opacity="0.16" stroke="url(#prismGrad)" stroke-width="5" stroke-linejoin="round"/>
<path d="M64 40L70.5 57.5L88 64L70.5 70.5L64 88L57.5 70.5L40 64L57.5 57.5L64 40Z" fill="url(#prismGrad)"/>
<circle cx="96" cy="32" r="5.5" fill="#fbbf24"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

+2 -2
View File
@@ -4,7 +4,7 @@ const { createHash } = require('node:crypto');
const { gzipSync } = require('node:zlib');
const MIME = { '.html': 'text/html; charset=utf-8', '.js': 'application/javascript; charset=utf-8', '.css': 'text/css; charset=utf-8', '.json': 'application/json; charset=utf-8', '.png': 'image/png', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg', '.webp': 'image/webp', '.svg': 'image/svg+xml', '.ico': 'image/x-icon', '.woff': 'font/woff', '.woff2': 'font/woff2' };
const ROOT_FILES = new Set(['index.html', 'app.js', 'workspace.js', 'style.css', 'sw.js', 'manifest.json']);
const ROOT_FILES = new Set(['index.html', 'app.js', 'workspace.js', 'style.css', 'sw.js', 'manifest.json', 'favicon.svg']);
function createStaticHandler(publicDirectory, { maxCacheBytes = 16 * 1024 * 1024 } = {}) {
const root = path.resolve(publicDirectory), cache = new Map();
@@ -18,7 +18,7 @@ function createStaticHandler(publicDirectory, { maxCacheBytes = 16 * 1024 * 1024
let pathname;
try { pathname = decodeURIComponent(request.url.split('?')[0]); } catch { return missing(response); }
if (pathname.includes('\\') || pathname.includes('\0') || pathname.split('/').some(p => p.startsWith('.'))) return missing(response);
let relative = pathname === '/' ? 'index.html' : pathname.replace(/^\/+/, '');
let relative = pathname === '/' ? 'index.html' : (pathname === '/favicon.ico' ? 'favicon.svg' : pathname.replace(/^\/+/, ''));
const asset = relative.startsWith('assets/') && MIME[path.extname(relative).toLowerCase()];
if (!ROOT_FILES.has(relative) && !asset) {
if (!path.extname(relative) && !/^(?:server|docs|test|data|node_modules)(?:\/|$)/.test(relative) && String(request.headers.accept || '').includes('text/html')) relative = 'index.html';