Files
todo-app/docker-compose.yml
Hammer 98ea0427bb Initial todo app setup
- Backend: Bun + Elysia + Drizzle ORM + PostgreSQL
- Frontend: React + Vite + TailwindCSS + Zustand
- Auth: better-auth with invite-only system
- Features: Tasks, Projects, Sections, Labels, Comments
- Hammer API: Dedicated endpoints for AI assistant integration
- Unit tests: 24 passing tests
- Docker: Compose file for deployment
2026-01-28 14:02:15 +00:00

59 lines
1.4 KiB
YAML

version: '3.8'
services:
# PostgreSQL Database
db:
image: postgres:16-alpine
container_name: todo-db
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER:-todo}
POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD required}
POSTGRES_DB: ${DB_NAME:-todo_app}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5433:5432" # Using 5433 to avoid conflicts
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-todo}"]
interval: 5s
timeout: 5s
retries: 5
# API Server
api:
build:
context: ./apps/api
dockerfile: Dockerfile
container_name: todo-api
restart: unless-stopped
environment:
DATABASE_URL: postgresql://${DB_USER:-todo}:${DB_PASSWORD}@db:5432/${DB_NAME:-todo_app}
PORT: 3001
NODE_ENV: production
APP_URL: ${APP_URL:-https://todo.donovankelly.xyz}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-https://todo.donovankelly.xyz}
RESEND_API_KEY: ${RESEND_API_KEY}
FROM_EMAIL: ${FROM_EMAIL:-noreply@donovankelly.xyz}
HAMMER_API_KEY: ${HAMMER_API_KEY}
ports:
- "3001:3001"
depends_on:
db:
condition: service_healthy
# Web Frontend (built and served by nginx)
web:
build:
context: ./apps/web
dockerfile: Dockerfile
container_name: todo-web
restart: unless-stopped
ports:
- "3002:80"
depends_on:
- api
volumes:
postgres_data: