feat: Consolidate client and server into a single Docker image and update Docker Compose configuration.

This commit is contained in:
2026-01-06 17:03:38 +00:00
parent f587ab6053
commit 80c936a43b
3 changed files with 45 additions and 21 deletions

View File

@@ -19,7 +19,11 @@ initDb();
app.use('/api', routes);
// Serve static files from the React app build directory
app.use(express.static(path.join(__dirname, '../client/dist')));
// In Docker container, this is at /app/client/dist
const staticPath = process.env.NODE_ENV === 'production'
? path.join(__dirname, '../client/dist')
: path.join(__dirname, '../client/dist');
app.use(express.static(staticPath));
// Handle social previews for shared event links
app.get('/event/:id', (req, res) => {