This directory contains the production deployment files for the GoodVibes application.
Dockerfile- Multi-stage Docker build for production deploymentnginx.conf- Nginx configuration for serving the frontend and proxying API requestsentrypoint.sh- Container entrypoint script that starts both the backend and frontend
Before deploying, ensure you have:
- Set up your API keys in the
config/api_keys.jsonfile in the project root - Validated the API keys by running
python config/load_api_keys.py
This centralized configuration will be automatically used by the deployment scripts.
docker build -t goodvibes:latest -f deployment/Dockerfile .docker run -p 8080:8080 -e "ENV_VAR1=value1" -e "ENV_VAR2=value2" goodvibes:latestFor production deployment, you'll need to configure:
- API keys: Already handled through the centralized
config/api_keys.jsonconfiguration
You can override these with environment variables if needed:
- Database connection
- Application settings
- Other configuration parameters
Example:
docker run -p 8080:8080 \
-e "DATABASE_URL=postgresql://user:password@host:port/dbname" \
-e "SECRET_KEY=your_secret_key" \
goodvibes:latestThe easiest way to deploy is using the provided script:
bash deployment/deploy.shThis script will:
- Validate that API keys are properly configured
- Build and run Docker containers for both backend and frontend
- Configure the containers with appropriate environment variables
If you need different API keys for production, you can:
- Update the
config/api_keys.jsonfile before deployment - OR provide override environment variables during container launch
The production deployment uses:
- Nginx as the web server and reverse proxy
- Python FastAPI backend running on Uvicorn
- React frontend served as static files
The Nginx server listens on port 8080 and routes:
- API requests to the backend running on localhost:8000
- All other requests to the static frontend files