# Docker Compose deployment guide

## Prerequisites

- Docker Engine 26 or newer
- Docker Compose v2
- A PostgreSQL 15 database
- A Redis 7 instance for queues and cache

## Compose file

services:
  web:
    image: afriyontech/platform:2026.11
    ports: ["3000:3000"]
    env_file: .env
    depends_on: [db, redis]
  db:
    image: postgres:15
    environment:
      POSTGRES_DB: afriyon
      POSTGRES_USER: afriyon
      POSTGRES_PASSWORD: change-me
    volumes: ["pgdata:/var/lib/postgresql/data"]
  redis:
    image: redis:7-alpine
volumes:
  pgdata:

## First boot

1. Copy .env.example to .env and set DATABASE_URL, REDIS_URL and SESSION_SECRET.
2. Run docker compose up -d.
3. Confirm GET /api/health returns status ok. The platform seeds its own
   records on the first request, so there is no separate migration step.
4. Confirm /api/health still reports ok after the first sign-in.

## Upgrade

Pull the new image tag, run migrations, then recreate the web service. Keep the
previous image tag available until smoke tests pass so a rollback is one command.
