Skip to content

Commit 6849abe

Browse files
authored
Merge pull request #31 from rendiffdev/CriticalFixes
Critical fixes and project rename to Rendiff
2 parents 506a4d8 + bf5f9f7 commit 6849abe

17 files changed

+87
-87
lines changed

compose.override.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ services:
6666
environment:
6767
# Development database settings
6868
POSTGRES_PASSWORD: dev_password_123
69-
POSTGRES_DB: ffmpeg_api_dev
69+
POSTGRES_DB: rendiff_dev
7070

7171
ports:
7272
# Expose postgres for local development tools
@@ -96,19 +96,19 @@ services:
9696
# Development Tools
9797
mailhog:
9898
image: mailhog/mailhog:v1.0.1
99-
container_name: ffmpeg_dev_mailhog
99+
container_name: rendiff_dev_mailhog
100100
ports:
101101
- "1025:1025" # SMTP
102102
- "8025:8025" # Web UI
103103
networks:
104-
- ffmpeg-net
104+
- rendiff-net
105105
profiles:
106106
- dev-tools
107107

108108
# Database Admin Tool
109109
pgadmin:
110110
image: dpage/pgadmin4:latest
111-
container_name: ffmpeg_dev_pgadmin
111+
container_name: rendiff_dev_pgadmin
112112
environment:
113113
PGADMIN_DEFAULT_EMAIL: admin@localhost
114114
PGADMIN_DEFAULT_PASSWORD: admin
@@ -120,7 +120,7 @@ services:
120120
depends_on:
121121
- postgres
122122
networks:
123-
- ffmpeg-net
123+
- rendiff-net
124124
profiles:
125125
- dev-tools
126126

docs/PERFORMANCE_OPTIMIZATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
This FFmpeg API has been optimized for high-performance production workloads with comprehensive performance improvements implemented across all layers.
5+
Rendiff has been optimized for high-performance production workloads with comprehensive performance improvements implemented across all layers.
66

77
## 🚀 Performance Features Implemented
88

@@ -291,7 +291,7 @@ ORDER BY idx_scan DESC;
291291
# GPU workloads: Limit to GPU capacity
292292

293293
# Monitor worker memory usage
294-
docker stats ffmpeg-api-worker-1
294+
docker stats rendiff-worker-1
295295

296296
# Adjust prefetch multiplier
297297
# Higher = better throughput, more memory usage

docs/RUNBOOKS.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# FFmpeg API Operational Runbooks
1+
# Rendiff Operational Runbooks
22

33
## Table of Contents
44

@@ -34,8 +34,8 @@ docker compose exec redis redis-cli ping
3434
curl -w "@curl-format.txt" -o /dev/null -s https://api.domain.com/api/v1/health
3535

3636
# Database connections
37-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c \
38-
"SELECT count(*) FROM pg_stat_activity WHERE datname = 'ffmpeg_api';"
37+
docker compose exec postgres psql -U rendiff_user -d rendiff -c \
38+
"SELECT count(*) FROM pg_stat_activity WHERE datname = 'rendiff';"
3939

4040
# Queue depth
4141
docker compose exec redis redis-cli llen celery
@@ -61,7 +61,7 @@ docker compose exec worker-cpu celery -A worker.main inspect active
6161
docker stats --no-stream
6262

6363
# Check database slow queries
64-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c \
64+
docker compose exec postgres psql -U rendiff_user -d rendiff -c \
6565
"SELECT query, mean_exec_time, calls FROM pg_stat_statements
6666
WHERE mean_exec_time > 1000 ORDER BY mean_exec_time DESC LIMIT 10;"
6767

@@ -78,7 +78,7 @@ docker compose exec redis redis-cli info memory
7878
2. **Clear slow queries:**
7979
```bash
8080
# Analyze and optimize slow queries
81-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c \
81+
docker compose exec postgres psql -U rendiff_user -d rendiff -c \
8282
"ANALYZE jobs; REINDEX TABLE jobs;"
8383
```
8484

@@ -340,7 +340,7 @@ find /storage -type f -mtime +7 -name "*.tmp" -ls
340340
**Check processing metrics:**
341341
```bash
342342
# Average processing time by operation
343-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c "
343+
docker compose exec postgres psql -U rendiff_user -d rendiff -c "
344344
SELECT
345345
operations->0->>'type' as operation,
346346
AVG(EXTRACT(EPOCH FROM (completed_at - started_at))) as avg_seconds,
@@ -367,10 +367,10 @@ docker compose restart worker-cpu
367367
**Check slow queries:**
368368
```bash
369369
# Enable query logging
370-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c \
370+
docker compose exec postgres psql -U rendiff_user -d rendiff -c \
371371
"ALTER SYSTEM SET log_min_duration_statement = 1000;"
372372

373-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c \
373+
docker compose exec postgres psql -U rendiff_user -d rendiff -c \
374374
"SELECT pg_reload_conf();"
375375

376376
# View slow query log
@@ -380,13 +380,13 @@ docker compose exec postgres tail -f /var/log/postgresql/postgresql.log | grep d
380380
**Optimize database:**
381381
```bash
382382
# Update statistics
383-
docker compose exec postgres vacuumdb -U ffmpeg_user -d ffmpeg_api -z
383+
docker compose exec postgres vacuumdb -U rendiff_user -d rendiff -z
384384

385385
# Reindex tables
386-
docker compose exec postgres reindexdb -U ffmpeg_user -d ffmpeg_api
386+
docker compose exec postgres reindexdb -U rendiff_user -d rendiff
387387

388388
# Check table sizes
389-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c "
389+
docker compose exec postgres psql -U rendiff_user -d rendiff -c "
390390
SELECT
391391
schemaname AS table_schema,
392392
tablename AS table_name,
@@ -425,7 +425,7 @@ LIMIT 10;"
425425
4. **Verify restoration:**
426426
```bash
427427
# Check data integrity
428-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c \
428+
docker compose exec postgres psql -U rendiff_user -d rendiff -c \
429429
"SELECT COUNT(*) FROM jobs;"
430430

431431
# Run application tests
@@ -489,8 +489,8 @@ pg_basebackup -h localhost -D /recovery -U postgres -Fp -Xs -P
489489
1. **Add worker nodes:**
490490
```bash
491491
# Deploy to new node
492-
scp -r . newnode:/opt/ffmpeg-api/
493-
ssh newnode "cd /opt/ffmpeg-api && docker compose up -d worker-cpu"
492+
scp -r . newnode:/opt/rendiff/
493+
ssh newnode "cd /opt/rendiff && docker compose up -d worker-cpu"
494494
```
495495

496496
2. **Scale services:**
@@ -520,7 +520,7 @@ pg_basebackup -h localhost -D /recovery -U postgres -Fp -Xs -P
520520
1. **Immediate response:**
521521
```bash
522522
# Identify compromised key
523-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c "
523+
docker compose exec postgres psql -U rendiff_user -d rendiff -c "
524524
SELECT api_key_hash, last_used_at, request_count
525525
FROM api_keys
526526
WHERE last_used_at > NOW() - INTERVAL '1 hour'
@@ -536,7 +536,7 @@ pg_basebackup -h localhost -D /recovery -U postgres -Fp -Xs -P
536536
docker compose logs api | grep <key-hash> > suspicious-activity.log
537537

538538
# Check for data exfiltration
539-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c "
539+
docker compose exec postgres psql -U rendiff_user -d rendiff -c "
540540
SELECT COUNT(*), SUM(output_size)
541541
FROM jobs
542542
WHERE api_key = '<key-hash>'

docs/SECURITY_HARDENING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
This FFmpeg API has been comprehensively hardened against all known security vulnerabilities. This document outlines the security features implemented and best practices for secure deployment.
5+
Rendiff has been comprehensively hardened against all known security vulnerabilities. This document outlines the security features implemented and best practices for secure deployment.
66

77
## 🛡️ Security Features Implemented
88

@@ -217,7 +217,7 @@ semgrep --config=auto api/ worker/
217217
218218
# Container scanning
219219
docker scout cves
220-
trivy image ffmpeg-api:latest
220+
trivy image rendiff:latest
221221
```
222222

223223
### **Penetration Testing Checklist**

docs/SETUP.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,13 +572,13 @@ docker compose up -d --scale worker-genai=2
572572
#### Database Optimization
573573
```bash
574574
# Monitor database performance
575-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c "
575+
docker compose exec postgres psql -U rendiff_user -d rendiff -c "
576576
SELECT query, mean_time, calls
577577
FROM pg_stat_statements
578578
ORDER BY mean_time DESC LIMIT 10;"
579579

580580
# Analyze table usage
581-
docker compose exec postgres psql -U ffmpeg_user -d ffmpeg_api -c "
581+
docker compose exec postgres psql -U rendiff_user -d rendiff -c "
582582
SELECT schemaname,tablename,attname,n_distinct,correlation
583583
FROM pg_stats WHERE tablename='jobs';"
584584
```
@@ -604,4 +604,4 @@ FROM pg_stats WHERE tablename='jobs';"
604604
| **[🏭 Production Setup](#production-setup)** | Production best practices | Production setup |
605605
| **[🛡️ HTTPS/SSL Configuration](#httpssl-configuration)** | Security configuration | Security hardening |
606606

607-
**Need help?** Check the [troubleshooting section](#troubleshooting) or [open an issue](https://github.com/rendiffdev/ffmpeg-api/issues).
607+
**Need help?** Check the [troubleshooting section](#troubleshooting) or [open an issue](https://github.com/rendiffdev/rendiff-dev/issues).

k8s/base/api-deployment.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: ffmpeg-api
5-
namespace: ffmpeg-api
4+
name: rendiff
5+
namespace: rendiff
66
labels:
7-
app: ffmpeg-api
7+
app: rendiff
88
component: api
99
spec:
1010
replicas: 3
1111
selector:
1212
matchLabels:
13-
app: ffmpeg-api
13+
app: rendiff
1414
component: api
1515
template:
1616
metadata:
1717
labels:
18-
app: ffmpeg-api
18+
app: rendiff
1919
component: api
2020
spec:
2121
containers:
2222
- name: api
23-
image: ffmpeg-api:latest
23+
image: rendiff:latest
2424
ports:
2525
- containerPort: 8000
2626
env:
2727
- name: DATABASE_URL
2828
valueFrom:
2929
secretKeyRef:
30-
name: ffmpeg-api-secrets
30+
name: rendiff-secrets
3131
key: database-url
3232
- name: REDIS_URL
3333
valueFrom:
3434
secretKeyRef:
35-
name: ffmpeg-api-secrets
35+
name: rendiff-secrets
3636
key: redis-url
3737
- name: SECRET_KEY
3838
valueFrom:
3939
secretKeyRef:
40-
name: ffmpeg-api-secrets
40+
name: rendiff-secrets
4141
key: secret-key
4242
resources:
4343
requests:
@@ -69,11 +69,11 @@ spec:
6969
apiVersion: v1
7070
kind: Service
7171
metadata:
72-
name: ffmpeg-api-service
73-
namespace: ffmpeg-api
72+
name: rendiff-service
73+
namespace: rendiff
7474
spec:
7575
selector:
76-
app: ffmpeg-api
76+
app: rendiff
7777
component: api
7878
ports:
7979
- port: 80

monitoring/alerts/production-alerts.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Prometheus Alerting Rules for FFmpeg API Production
1+
# Prometheus Alerting Rules for Rendiff Production
22
# SLO-based alerts with multi-window burn rate
33

44
groups:
5-
- name: ffmpeg_api_availability
5+
- name: rendiff_availability
66
interval: 30s
77
rules:
88
# High Priority Alerts
@@ -11,7 +11,7 @@ groups:
1111
for: 2m
1212
labels:
1313
severity: critical
14-
service: ffmpeg-api
14+
service: rendiff
1515
annotations:
1616
summary: "High API error rate detected"
1717
description: "API error rate is {{ $value }} errors/sec for the last 5 minutes"
@@ -22,7 +22,7 @@ groups:
2222
for: 3m
2323
labels:
2424
severity: warning
25-
service: ffmpeg-api
25+
service: rendiff
2626
annotations:
2727
summary: "API response time is high"
2828
description: "95th percentile response time is {{ $value }}s"
@@ -255,7 +255,7 @@ groups:
255255

256256
# Health Check Alerts
257257
- alert: HealthCheckFailing
258-
expr: up{job="ffmpeg-api"} == 0
258+
expr: up{job="rendiff"} == 0
259259
for: 2m
260260
labels:
261261
severity: critical

0 commit comments

Comments
 (0)