Add public endpoints and refactor deployments
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- Implemented public `/gallery/public` and `/events/public` endpoints for fetching published data without authentication. - Updated persistent volume configuration for Fly.io across backend and static file serving. - Adjusted frontend to dynamically fetch events and gallery images from backend API. - Refined Woodpecker pipeline for clearer separation of backend and frontend deployments.
This commit is contained in:
@ -60,10 +60,12 @@ fastify.register(multipart, {
|
||||
},
|
||||
});
|
||||
|
||||
// Serve static files (uploaded images, etc.)
|
||||
// Serve static files (uploaded images, etc.) from persistent volume
|
||||
const dataDir = env.GIT_WORKSPACE_DIR || path.join(process.cwd(), 'data');
|
||||
fastify.register(fastifyStatic, {
|
||||
root: path.join(process.cwd(), 'public'),
|
||||
root: dataDir,
|
||||
prefix: '/static/',
|
||||
decorateReply: false
|
||||
});
|
||||
|
||||
// Decorate fastify with authenticate method
|
||||
|
||||
Reference in New Issue
Block a user