Complete rewrite of Django REST API to Go with: - Gin web framework for HTTP routing - GORM for database operations - GoAdmin for admin panel - Gorush integration for push notifications - Redis for caching and job queues Features implemented: - User authentication (login, register, logout, password reset) - Residence management (CRUD, sharing, share codes) - Task management (CRUD, kanban board, completions) - Contractor management (CRUD, specialties) - Document management (CRUD, warranties) - Notifications (preferences, push notifications) - Subscription management (tiers, limits) Infrastructure: - Docker Compose for local development - Database migrations and seed data - Admin panel for data management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
97 lines
2.3 KiB
YAML
97 lines
2.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
api:
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- PORT=8000
|
|
- DEBUG=true
|
|
- SECRET_KEY=${SECRET_KEY:-development-secret-key}
|
|
- POSTGRES_DB=${POSTGRES_DB:-mycrib}
|
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
|
|
- DB_HOST=db
|
|
- DB_PORT=5432
|
|
- REDIS_URL=redis://redis:6379/0
|
|
- EMAIL_HOST=${EMAIL_HOST:-smtp.gmail.com}
|
|
- EMAIL_PORT=${EMAIL_PORT:-587}
|
|
- EMAIL_HOST_USER=${EMAIL_HOST_USER:-}
|
|
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD:-}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
networks:
|
|
- mycrib-network
|
|
|
|
worker:
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile
|
|
command: ["./mycrib-worker"]
|
|
environment:
|
|
- DEBUG=true
|
|
- SECRET_KEY=${SECRET_KEY:-development-secret-key}
|
|
- POSTGRES_DB=${POSTGRES_DB:-mycrib}
|
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
|
|
- DB_HOST=db
|
|
- DB_PORT=5432
|
|
- REDIS_URL=redis://redis:6379/0
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
networks:
|
|
- mycrib-network
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
environment:
|
|
- POSTGRES_DB=${POSTGRES_DB:-mycrib}
|
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-mycrib}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
networks:
|
|
- mycrib-network
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
networks:
|
|
- mycrib-network
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
|
|
networks:
|
|
mycrib-network:
|
|
driver: bridge
|