Add favicon and other assets to the deployed application
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
Copy attached assets (logo, favicon) from the build stage to the server's public directory and configure express.static to serve them. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ceced2fc-aa46-458d-ba87-ddd4b7bb1518 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/659922a9-0087-461c-90dd-6d9a58b81d4d/ceced2fc-aa46-458d-ba87-ddd4b7bb1518/LNMKOrA
This commit is contained in:
@@ -18,6 +18,10 @@ externalPort = 80
|
|||||||
localPort = 35345
|
localPort = 35345
|
||||||
externalPort = 3002
|
externalPort = 3002
|
||||||
|
|
||||||
|
[[ports]]
|
||||||
|
localPort = 36697
|
||||||
|
externalPort = 4200
|
||||||
|
|
||||||
[[ports]]
|
[[ports]]
|
||||||
localPort = 39063
|
localPort = 39063
|
||||||
externalPort = 3001
|
externalPort = 3001
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ COPY --from=build /app/tsconfig.json ./
|
|||||||
# Copy built frontend to the location static.ts expects
|
# Copy built frontend to the location static.ts expects
|
||||||
COPY --from=build /app/dist/public ./server/public
|
COPY --from=build /app/dist/public ./server/public
|
||||||
|
|
||||||
|
# Copy attached assets (logo, favicon, etc.)
|
||||||
|
COPY --from=build /app/attached_assets ./server/public/attached_assets
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV PORT=5000
|
ENV PORT=5000
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export function serveStatic(app: Express) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Serve static files from the public directory (includes attached_assets)
|
||||||
app.use(express.static(distPath));
|
app.use(express.static(distPath));
|
||||||
|
|
||||||
// fall through to index.html if the file doesn't exist
|
// fall through to index.html if the file doesn't exist
|
||||||
|
|||||||
Reference in New Issue
Block a user