fix: deployment — resolve dependency conflicts, add initial migration, CI/CD webhook

- Fix httpx/pydantic/redis version conflicts for litellm/aiogram/celery compatibility
- Add PYTHONPATH=/app to Dockerfile for alembic module resolution
- Skip Telegram webhook setup when URL is not HTTPS
- Fix FileUpload prop type mismatch in RecordingsPage
- Add alembic script.py.mako template and initial migration
- Configure docker-compose: port 8081, built frontend, no exposed internal ports
- Add deploy.sh and webhook-server.js for Gitea CI/CD auto-deploy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Admin
2026-04-07 13:49:12 +05:00
parent d2ef7785a4
commit 3e15f643d6
9 changed files with 216 additions and 16 deletions
+46
View File
@@ -0,0 +1,46 @@
const http = require('http');
const { execFile } = require('child_process');
const crypto = require('crypto');
const PORT = 9000;
const SECRET = 'meeting-proto-deploy-secret';
const server = http.createServer((req, res) => {
if (req.method !== 'POST' || req.url !== '/deploy') {
res.writeHead(404);
res.end('Not found');
return;
}
let body = '';
req.on('data', chunk => { body += chunk; });
req.on('end', () => {
// Verify Gitea signature
const sig = req.headers['x-gitea-signature'];
if (sig) {
const hmac = crypto.createHmac('sha256', SECRET).update(body).digest('hex');
if (sig !== hmac) {
console.log(`${new Date().toISOString()} - Invalid signature, rejecting`);
res.writeHead(403);
res.end('Invalid signature');
return;
}
}
console.log(`${new Date().toISOString()} - Deploy triggered`);
res.writeHead(200);
res.end('Deploy started');
execFile('bash', ['D:/meeting-protocol-service/deploy.sh'], (err, stdout, stderr) => {
if (err) {
console.error(`Deploy error: ${err.message}`);
return;
}
console.log(`Deploy output: ${stdout}`);
});
});
});
server.listen(PORT, () => {
console.log(`Webhook server listening on port ${PORT}`);
});