Merge remote-tracking branch 'origin/main'

This commit is contained in:
Oleg Proskurin 2025-12-27 22:59:08 +07:00
commit 3a2622e9a3
1 changed files with 109 additions and 0 deletions

109
CLAUDE.local.md Normal file
View File

@ -0,0 +1,109 @@
# Banatie Service - VPS Environment
## Environment Context
This Claude Code instance runs on the **VPS server** with direct access to production services.
Your main folder is `/home/usul/workspace/projects/banatie-service`. Use it for git operations, code review, and documentation.
## Directory Structure
| Path | Purpose |
|------|---------|
| `/home/usul/workspace/projects/banatie-service` | Git repository (source code, docs) |
| `/opt/banatie/` | Production deployment (docker-compose, configs) |
| `/opt/banatie/data/` | Persistent data (minio, postgres) |
## Deployment Workflow
### Update from Git
```bash
cd /home/usul/workspace/projects/banatie-service
git pull origin main
```
### Deploy API
```bash
./scripts/deploy-api.sh
# or with rebuild:
./scripts/deploy-api.sh --no-cache
```
### Deploy Landing
```bash
./scripts/deploy-landing.sh
```
### Manual Docker Operations
```bash
cd /opt/banatie
docker compose ps
docker compose logs -f api
docker compose logs -f landing
docker compose restart api
```
## Common Operations
### Check Service Status
```bash
docker compose -f /opt/banatie/docker-compose.yml ps
curl -s http://localhost:3000/health | jq
```
### View Logs
```bash
docker compose -f /opt/banatie/docker-compose.yml logs -f api --tail=100
docker compose -f /opt/banatie/docker-compose.yml logs -f landing --tail=100
```
### Database Access
```bash
docker exec -it banatie-postgres psql -U banatie_user -d banatie_db
```
### MinIO Access
```bash
docker exec -it banatie-minio mc ls storage/banatie
```
### Reset Database (DESTRUCTIVE)
```bash
cd /opt/banatie
docker compose down
sudo rm -rf data/postgres/*
docker compose up -d
```
## Production URLs
| Service | URL |
|---------|-----|
| Landing | https://banatie.app |
| API | https://api.banatie.app |
| CDN | https://cdn.banatie.app |
| MinIO Console | https://storage.banatie.app |
## Key Files
| Location | Purpose |
|----------|---------|
| `/opt/banatie/docker-compose.yml` | Production compose (copy from `infrastructure/docker-compose.vps.yml`) |
| `/opt/banatie/.env` | Environment variables |
| `/opt/banatie/secrets.env` | Secrets (GEMINI_API_KEY, etc.) |
| `infrastructure/docker-compose.vps.yml` | Source template for production compose |
| `docs/url-fix-vps-site.md` | CDN deployment instructions |
## Operational Responsibilities
- Execute deployment procedures using scripts in `scripts/`
- Monitor service health via Docker logs
- Update configurations and restart services as needed
- Document encountered issues and their resolutions
- Commit operational changes and lessons learned to the repository
## Important Notes
- Always `git pull` before deploying
- Check logs after deployment for errors
- Secrets are in `/opt/banatie/secrets.env` (not in git)
- Database and MinIO data persist in `/opt/banatie/data/`