Skip to content

bengeos/spirit_voice_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spirit Voice

A FastAPI-based voice API application.

Docker Setup

Prerequisites

  • Docker
  • Docker Compose

Environment Variables

Create a .env file in the root directory with the following variables:

APP_NAME=Spirit Voice API
HOST=0.0.0.0
PORT=8000
DEBUG=false

Running with Docker Compose

  1. Build and start the application:
docker-compose up --build
  1. Run in detached mode:
docker-compose up -d
  1. View logs:
docker-compose logs -f
  1. Stop the application:
docker-compose down

Building the Docker Image Manually

docker build -t spirit_voice_api .

Running the Container Manually

docker run -p 8000:8000 \
  -e APP_NAME="Spirit Voice API" \
  -e HOST=0.0.0.0 \
  -e PORT=8000 \
  -e DEBUG=false \
  spirit_voice_api

Development

The docker-compose.yml includes a volume mount for hot-reloading during development. To enable auto-reload, update the CMD in the Dockerfile or docker-compose command to:

uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload

Production Deployment

For production:

  1. Remove the volume mount in docker-compose.yml
  2. Set appropriate environment variables
  3. Consider using a production-grade WSGI server configuration

Local Development (without Docker)

  1. Install dependencies:
pip install -r requirements.txt
  1. Set environment variables: Create a .env file with the required variables.

  2. Run the application:

python -m uvicorn app.main:app --reload

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors