You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User selects file → POST /upload (web app)
→ 1. POST /upload (file_service) → saves to /app/storage/<uuid>.ext
→ 2. POST /videos (mysql_service) → saves {title, filename, path, size, user_id}
→ redirect to /dashboard
Stream Flow
User clicks Watch → GET /watch/<id> (web app)
→ GET /videos/<id> (mysql_service) → get filename
→ <video src="/stream/<filename>">
→ GET /stream/<filename> (web app proxy)
→ GET /stream/<filename> (file_service) → reads file, streams bytes
Extending to AWS S3
To replace local disk storage with S3, modify file_service/app.py:
importboto3s3=boto3.client('s3')
# In upload():s3.upload_fileobj(file, BUCKET_NAME, unique_filename)
# return the S3 URL as file_path# In stream():obj=s3.get_object(Bucket=BUCKET_NAME, Key=filename)
returnResponse(obj['Body'].read(), content_type='video/mp4')
Security Notes
Change SECRET_KEY in docker-compose.yml before any production use
Change MYSQL_ROOT_PASSWORD and MYSQL_PASSWORD
Add HTTPS termination (nginx with certbot) in front of the web app
Consider rate-limiting the auth endpoints
The /delete endpoint currently requires ownership check in web_app only