forked from funnyzak/ffmpeg-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
79 lines (65 loc) · 3.24 KB
/
env.example
File metadata and controls
79 lines (65 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# FFmpeg Service Environment Configuration Example
# Copy this file to .env and modify as needed
# System settings
TZ=Asia/Shanghai
# Application configuration
TEMP_DIR=/tmp/videos
MAX_FILE_SIZE=524288000 # 500MB in bytes
FILE_RETENTION_HOURS=2 # Keep output files for 2 hours
CLEANUP_INTERVAL_MINUTES=30 # Run cleanup every 30 minutes
# Logging configuration
LOG_DIR=./logs # Log directory path
LOG_LEVEL=INFO # Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
# Supported formats (comma-separated, no spaces around commas)
ALLOWED_VIDEO_EXTENSIONS=mp4,avi,mov,mkv,flv,wmv,webm,m4v
SUPPORTED_VIDEO_OUTPUT_FORMATS=mp4,avi,mov,mkv,webm
SUPPORTED_AUDIO_OUTPUT_FORMATS=mp3,wav,flac,aac,ogg,m4a,opus
# Flask server settings
FLASK_HOST=0.0.0.0
FLASK_PORT=8080
FLASK_DEBUG=false
# Base URL for full path URLs (optional)
# If set, returned file URLs will be full URLs instead of relative paths
# Example: BASE_URL=http://10.0.0.8:8080
# BASE_URL=
# Gunicorn WSGI server settings
GUNICORN_WORKERS=4 # Number of worker processes
GUNICORN_WORKER_CLASS=sync # Worker class (sync, gevent, eventlet)
GUNICORN_TIMEOUT=120 # Worker timeout in seconds
GUNICORN_MAX_REQUESTS=1000 # Restart workers after N requests
GUNICORN_MAX_REQUESTS_JITTER=100 # Add randomness to max requests
# Docker Compose specific variables
HOST_PORT=8080 # Host port to expose the service
TEMP_VOLUME=./temp # Host directory for temp files
# API Key authentication (optional)
# Leave empty to disable authentication
# Multiple keys can be separated by commas: API_KEYS=key1,key2,key3
# API_KEYS=your_secret_key_here
# Example configurations for different environments:
# Production (high capacity)
# MAX_FILE_SIZE=2147483648 # 2GB
# FILE_RETENTION_HOURS=24 # Keep files for 24 hours
# CLEANUP_INTERVAL_MINUTES=60 # Cleanup every hour
# GUNICORN_WORKERS=8 # More workers for high throughput
# GUNICORN_TIMEOUT=300 # Longer timeout for large files
# LOG_LEVEL=WARNING # Less verbose logging in production
# Development
# FLASK_DEBUG=true
# FILE_RETENTION_HOURS=1 # Keep files for 1 hour for quick testing
# CLEANUP_INTERVAL_MINUTES=10 # More frequent cleanup
# GUNICORN_WORKERS=2 # Fewer workers for development
# LOG_LEVEL=DEBUG # Verbose logging for development
# Testing
# MAX_FILE_SIZE=104857600 # 100MB for testing
# FILE_RETENTION_HOURS=0.5 # Keep files for 30 minutes only
# CLEANUP_INTERVAL_MINUTES=5 # Very frequent cleanup
# SUPPORTED_VIDEO_OUTPUT_FORMATS=mp4 # Only MP4 output
# SUPPORTED_AUDIO_OUTPUT_FORMATS=mp3 # Only MP3 output
# GUNICORN_WORKERS=1 # Single worker for testing
# LOG_LEVEL=DEBUG # Detailed logging for testing
# Memory-constrained environment
# GUNICORN_WORKERS=2 # Fewer workers
# GUNICORN_TIMEOUT=60 # Shorter timeout
# GUNICORN_MAX_REQUESTS=500 # Restart workers more frequently
# MAX_FILE_SIZE=262144000 # 250MB limit
# LOG_LEVEL=WARNING # Reduce log verbosity to save memory