Deployment Guide
Development Setup
Set up your local development environment for the RokuChannel Platform. This guide covers prerequisites, installation, database creation, and running the app for the first time.
Figure 1: Dev Environment Architecture
Prerequisites
| Software | Version | Notes |
|---|---|---|
| Python | 3.11+ | Required for FastAPI and async features |
| PostgreSQL | 14+ | Runs on port 9433 (not default 5432) |
| Redis | 6+ | Uses database 10 (redis://localhost:6379/10) |
| Git | 2.x | For version control |
Non-Standard PostgreSQL Port
This project uses port 9433 for PostgreSQL, not the default 5432. Make sure your PostgreSQL instance is configured to listen on port 9433.
This project uses port 9433 for PostgreSQL, not the default 5432. Make sure your PostgreSQL instance is configured to listen on port 9433.
Cloning and Installing
-
Clone the repository
git clone <repo-url> C:\PROJECTS\ROKU -
Create a virtual environment
cd C:\PROJECTS\ROKU\backend python -m venv venv venv\Scripts\activate -
Install dependencies
pip install -r requirements.txt -
Configure environment
Copy or edit backend/.env with your database credentials and JWT secret.
Database Creation
-
Run the setup script
python setup_db.pyThis creates the rokuchannel database (if it does not exist), creates the roku schema, and runs all V*.sql migration files in order.
-
Verify tables
The script verifies that all 11 tables in the roku schema were created successfully by querying information_schema.tables.
First Run
-
Start the development server
uvicorn app.main:app --host 0.0.0.0 --port 8065 --reload -
Verify health check
curl http://localhost:8065/healthShould return JSON with {"status": "healthy"} and database connection details.
Debug Mode
With DEBUG=true in .env, the FastAPI docs are available at /docs (Swagger) and /redoc. Useful during development.
With DEBUG=true in .env, the FastAPI docs are available at /docs (Swagger) and /redoc. Useful during development.