Add public endpoints and refactor deployments
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:
2025-12-09 15:53:39 +01:00
parent 4a103cf7d6
commit af4877300f
5 changed files with 64 additions and 27 deletions

View File

@ -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