knight 4dbb0b9180 Initial commit: 23 docker stacks for GitOps deployment
Stacks included:
- Infrastructure: traefik, authentik, gitea, registry, watchtower, dockge
- Monitoring: smokeping, changedetection
- Apps: ghost, gollum, wallabag, radicale, invidious, xbackbone, filebrowser, syncthing, zerotier
- Custom: obsidian-tools, memento, perilous, ramz, bookclub, brain

🤖 Generated with Claude Code
2025-12-31 13:29:43 -05:00

25 lines
680 B
JavaScript

const express = require('express');
const path = require('path');
const fs = require('fs');
const app = express();
const PORT = process.env.PORT || 3000;
const CONTENT_DIR = '/usr/src/app/content';
app.use(express.static(CONTENT_DIR));
app.get('*', (req, res) => {
const filePath = path.join(CONTENT_DIR, req.path);
if (fs.existsSync(filePath) && fs.statSync(filePath).isDirectory()) {
const indexPath = path.join(filePath, 'index.html');
if (fs.existsSync(indexPath)) {
return res.sendFile(indexPath);
}
}
res.sendFile(path.join(CONTENT_DIR, 'index.html'));
});
app.listen(PORT, () => {
console.log(`Perilous server running on port ${PORT}`);
});