This application generates personalized videos with text-to-speech capabilities using ElevenLabs and other services.
- Docker
- Docker Compose
Create a .env file in the root directory with the following variables:
# API Keys
ELEVENLABS_API_KEY=your_elevenlabs_api_key
HEDRA_API_KEY=your_hedra_api_key
# This static text will be used in the greeting and must include the {name} placeholder to replace the name entered in the first html page
STATIC_TEXT="Hello {name} - Add your personal greeting text here..."
# Voice and model to be used from eleven labs
ELEVENLABS_VOICE_NAME=your_voice_name
ELEVENLABS_MODEL=your_model_name
# email settings
SMTP_SERVER=your_smtp_server
SMTP_PORT=your_smtp_port
SMTP_USERNAME=your_smtp_username
SMTP_PASSWORD=your_smtp_password
FROM_EMAIL=your_from_email
CC_EMAIL=maya.oberholzer@sanlam.co.za- Build and start the container:
docker-compose up --build-
Access the application at
http://localhost:8000 -
To stop the container:
docker-compose downFor cloud deployment:
- Build the Docker image:
docker build -t text-to-video-app .- Tag the image for your cloud provider's registry:
docker tag text-to-video-app [registry-url]/text-to-video-app:latest- Push the image to your registry:
docker push [registry-url]/text-to-video-app:latest- Deploy using your cloud provider's container service (e.g., AWS ECS, Google Cloud Run, Azure Container Instances)
Remember to:
- Set up environment variables in your cloud provider's configuration
- Configure appropriate security groups/firewall rules
- Set up a domain name and SSL certificate if needed
- Create an ECR repository
- Use AWS CLI to authenticate Docker to ECR:
aws ecr get-login-password --region [region] | docker login --username AWS --password-stdin [aws-account-id].dkr.ecr.[region].amazonaws.com- Tag and push the image:
docker tag text-to-video-app [aws-account-id].dkr.ecr.[region].amazonaws.com/text-to-video-app:latest
docker push [aws-account-id].dkr.ecr.[region].amazonaws.com/text-to-video-app:latest- Create an ECS cluster and service or use AWS App Runner for simpler deployment
- Enable Container Registry API
- Configure Docker authentication:
gcloud auth configure-docker- Tag and push the image:
docker tag text-to-video-app gcr.io/[project-id]/text-to-video-app:latest
docker push gcr.io/[project-id]/text-to-video-app:latest- Deploy to Cloud Run or GKE
- Create an Azure Container Registry (ACR)
- Login to ACR:
az acr login --name [registry-name]- Tag and push the image:
docker tag text-to-video-app [registry-name].azurecr.io/text-to-video-app:latest
docker push [registry-name].azurecr.io/text-to-video-app:latest- Deploy to Azure Container Instances or AKS