Oloyid Docs
GitHub Back to site

Deployment

Deploy Oloyid using Docker Compose for MVP environments, or run services individually for local development without full containerization.

Docker Compose (recommended)

The default docker-compose.yml runs the full MVP stack:

cp .env.example .env
docker compose up --build -d

Environment variables

Key settings in .env:

VariableDescriptionDefault
DATABASE_URLPostgreSQL connection stringpostgresql+asyncpg://oloyid:oloyid@postgres:5432/oloyid
REDIS_URLRedis connection stringredis://redis:6379/0
JWT_SECRETSecret for JWT signingChange in production
OPENAI_API_KEYOpenAI provider key
ANTHROPIC_API_KEYAnthropic provider key
ENVIRONMENTdevelopment or productiondevelopment

Production: Always change JWT_SECRET to a strong random value. Set ENVIRONMENT=production and configure TLS termination at your load balancer or reverse proxy.

Local development (without Docker for API)

Run only infrastructure containers and develop the API locally:

1. Start infrastructure

docker compose up postgres redis -d

2. Install API dependencies

cd api
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

3. Run migrations

alembic upgrade head

4. Start the API

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

5. Start the admin portal

cd admin-portal
npm install
npm run dev

Health checks

curl http://localhost:8000/health

Expected response:

{"status": "healthy", "version": "0.1.0"}

Database migrations

# Inside API container or local venv
alembic upgrade head

# Create a new migration
alembic revision --autogenerate -m "description"

Production considerations

Stopping services

docker compose down

# Remove volumes (clears database)
docker compose down -v