Files
peikarband/docker/docker-compose.yml
Ehsan.Asadi b9217fe81e refactor: complete project restructure - clean and professional
🎯 New Structure:
- landing/ (root) - Only Makefile, .gitignore, .woodpecker.yml
- helm/ - Kubernetes deployment (with argocd inside chart)
- docker/ - Docker build configs
- peikarband/ - All source code (src, tests, assets, config, tools, docs)

 Changes:
- Moved Docker files: build/docker/ → docker/
- Moved Helm charts: deploy/helm/ → helm/
- Moved ArgoCD: deploy/argocd/ → helm/peikarband/argocd/
- Moved all source code to peikarband/
- Removed duplicate files (7 files)
- Removed old empty directories

🐳 Docker Fixes:
- Added npm retry configuration (fetch-retry-mintimeout, etc.)
- Added 3-attempt retry mechanism for reflex export
- Fixed ECONNREFUSED errors
- Updated paths for new structure

📦 Config Updates:
- Makefile: Updated all paths (docker/, helm/, peikarband/)
- .woodpecker.yml: Updated dockerfile and context paths
- .gitignore: Updated data/ path

🧪 Tests:
- ✓ Helm lint passes
- ✓ All paths validated
- ✓ Structure verified

📊 Result:
- Before: 20+ files in root, scattered structure
- After: 3 files + 3 directories, clean and organized
- Production-ready 
2025-12-30 21:33:32 +03:30

93 lines
2.2 KiB
YAML

version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:14-alpine
container_name: peikarband-db
environment:
POSTGRES_USER: ${DB_USER:-peikarband}
POSTGRES_PASSWORD: ${DB_PASSWORD:-peikarband}
POSTGRES_DB: ${DB_NAME:-peikarband}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U peikarband"]
interval: 10s
timeout: 5s
retries: 5
# Redis Cache
redis:
image: redis:7-alpine
container_name: peikarband-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Peikarband Application
app:
build: .
container_name: peikarband-app
depends_on:
- postgres
- redis
ports:
- "3000:3000"
- "8000:8000"
environment:
- DATABASE_URL=postgresql://peikarband:peikarband@postgres:5432/peikarband
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/1
- CELERY_RESULT_BACKEND=redis://redis:6379/2
- SECRET_KEY=${SECRET_KEY}
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
- ENVIRONMENT=production
volumes:
- ./:/app
restart: unless-stopped
# Celery Worker
celery:
build: .
container_name: peikarband-celery
command: celery -A src.infrastructure.tasks.celery_app worker -l info
depends_on:
- postgres
- redis
environment:
- DATABASE_URL=postgresql://peikarband:peikarband@postgres:5432/peikarband
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/1
- CELERY_RESULT_BACKEND=redis://redis:6379/2
volumes:
- ./:/app
restart: unless-stopped
# Flower (Celery Monitoring)
flower:
build: .
container_name: peikarband-flower
command: celery -A src.infrastructure.tasks.celery_app flower
depends_on:
- redis
- celery
ports:
- "5555:5555"
environment:
- CELERY_BROKER_URL=redis://redis:6379/1
restart: unless-stopped
volumes:
postgres_data:
redis_data: