Skip to content

Commit 6e344fb

Browse files
committed
Major Stable Fix
1 parent 0d0ed90 commit 6e344fb

27 files changed

+5254
-1074
lines changed

.env.example

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,51 @@
11
# Copy this file to .env and update with your values
22

3-
# Database
3+
# Database Configuration
44
POSTGRES_PASSWORD=your_secure_password_here
55
POSTGRES_USER=ffmpeg_user
66
POSTGRES_DB=ffmpeg_api
7+
DATABASE_URL=postgresql://ffmpeg_user:your_secure_password_here@postgres:5432/ffmpeg_api
78

8-
# Monitoring
9-
GRAFANA_PASSWORD=your_grafana_password_here
10-
11-
# Storage
12-
STORAGE_PATH=./storage
9+
# Redis/Queue Configuration
10+
REDIS_URL=redis://redis:6379/0
1311

1412
# API Configuration
15-
LOG_LEVEL=info
13+
API_HOST=0.0.0.0
14+
API_PORT=8000
1615
API_WORKERS=4
16+
LOG_LEVEL=info
17+
DEBUG=false
1718

1819
# Worker Configuration
1920
WORKER_CONCURRENCY=4
21+
CPU_WORKERS=2
22+
GPU_WORKERS=0
23+
24+
# Storage Configuration
25+
STORAGE_PATH=./storage
26+
STORAGE_CONFIG=/app/config/storage.yml
27+
28+
# Security Configuration
29+
ADMIN_API_KEYS=your_admin_key_1,your_admin_key_2
30+
RENDIFF_API_KEYS=your_client_key_1,your_client_key_2,your_client_key_3
31+
ENABLE_API_KEYS=true
32+
CORS_ORIGINS=*
33+
34+
# SSL/HTTPS Configuration (for production)
35+
DOMAIN_NAME=localhost
36+
CERTBOT_EMAIL=[email protected]
37+
CERT_RESOLVER=letsencrypt
38+
LETSENCRYPT_STAGING=false
39+
40+
# Monitoring Configuration
41+
GRAFANA_PASSWORD=your_grafana_password_here
42+
PROMETHEUS_AUTH=admin:your_prometheus_password_here
43+
TRAEFIK_AUTH=admin:your_traefik_password_here
44+
45+
# Resource Limits
46+
MAX_UPLOAD_SIZE=10737418240
47+
MAX_CONCURRENT_JOBS_PER_KEY=10
48+
MAX_JOB_DURATION=21600
2049

21-
# Security - Admin Access
22-
# Generate secure admin keys and add them here (comma-separated)
23-
ADMIN_API_KEYS=your_admin_key_1,your_admin_key_2
50+
# External URLs
51+
EXTERNAL_URL=http://localhost:8080

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,48 @@ __pycache__/
33
.env
44
.DS_Store
55
/tmp
6+
7+
# Database files
68
*.db
9+
*.db-shm
10+
*.db-wal
711
/data/
12+
13+
# Backup files
14+
*.backup*
15+
*.bak
16+
*~
17+
.env_backups/
18+
19+
# Log files
20+
*.log
21+
/logs/
22+
23+
# Temporary files
24+
.tmp/
25+
temp/
26+
27+
# IDE files
28+
.vscode/
29+
.idea/
30+
*.swp
31+
*.swo
32+
33+
# OS files
34+
Thumbs.db
35+
.DS_Store
36+
37+
# Generated documentation and reports
38+
CLEANUP_SUMMARY.md
39+
*REPORT*.md
40+
*AUDIT*.md
41+
*STATUS*.md
42+
*SUMMARY*.md
43+
*ANALYSIS*.md
44+
*_REPORT.md
45+
*_AUDIT.md
46+
*_STATUS.md
47+
48+
# Storage and uploads
49+
/storage/
50+
/uploads/

AUDIT_SUMMARY.md

Lines changed: 0 additions & 142 deletions
This file was deleted.

Dockerfile.genai

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,18 @@ RUN pip3 install --no-cache-dir torch torchvision torchaudio --index-url https:/
4444
# Copy application code
4545
COPY . .
4646

47+
# Create user for security
48+
RUN groupadd -r rendiff && useradd -r -g rendiff -u 1000 rendiff
49+
4750
# Create necessary directories
4851
RUN mkdir -p /app/storage /app/models/genai /tmp/ffmpeg
4952

50-
# Set permissions
51-
RUN chmod +x /app/entrypoint.sh
53+
# Set permissions and ownership
54+
RUN chmod +x /app/entrypoint.sh && \
55+
chown -R rendiff:rendiff /app /tmp/ffmpeg
56+
57+
# Switch to non-root user
58+
USER rendiff
5259

5360
# Expose ports
5461
EXPOSE 8000 9000

0 commit comments

Comments
 (0)