Adapt application to serve static files directly in production

Remove Vite dependency in production Dockerfile and server configuration, and serve static assets and SPA fallback from the built distribution directory.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d396e5bd-e32d-4a20-9e7d-71e7102ddc6c
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/d396e5bd-e32d-4a20-9e7d-71e7102ddc6c/CrwFq15
This commit is contained in:
michaelschal committed 2025-08-11 15:07:28 +00:00
1 parent c764fe6c15
commit 2aecaa2672
3 files changed
+211 -5

No files matched your search

+3
View File
@@ -81,6 +81,9 @@ RUN npm ci --only=production && npm cache clean --force
COPY --from=build --chown=nextjs:nodejs /app/dist ./dist
COPY --from=build --chown=nextjs:nodejs /app/shared ./shared
# Create symlink for public files to be accessible from dist
RUN ln -sf /app/dist/public /app/dist/public
# Create uploads directory with proper permissions
RUN mkdir -p /app/uploads && chown -R nextjs:nodejs /app/uploads