[SOMA][BOT-3][INFRA] skeleton: project folder structure and all package manifests

This commit is contained in:
Ramakrishna Mamidi
2026-03-23 01:13:11 +05:30
parent 00e314eb89
commit f857845dd2
18 changed files with 1024 additions and 0 deletions

70
soma/Makefile Normal file
View File

@@ -0,0 +1,70 @@
.PHONY: up down logs restart build migrate seed ssl backup ollama-pull shell-backend shell-db
# Default: start all containers
up:
docker compose up -d
# Start and rebuild images
build:
docker compose up -d --build
# Stop all containers
down:
docker compose down
# Stop and remove all data volumes (DESTRUCTIVE — prompts for confirmation)
destroy:
@echo "WARNING: This will delete ALL data including the database. Type YES to confirm:"
@read confirm && [ "$$confirm" = "YES" ] || (echo "Aborted." && exit 1)
docker compose down -v
# View logs (all services, follow)
logs:
docker compose logs -f
# View logs for a specific service: make logs-backend
logs-%:
docker compose logs -f $*
# Restart a service: make restart-backend
restart-%:
docker compose restart $*
# Run database migrations
migrate:
docker compose exec backend alembic upgrade head
# Seed tasks from markdown file
# Usage: make seed FILE=/path/to/life_plan.md
seed:
docker compose exec backend python /app/scripts/seed_from_markdown.py --file $(FILE)
# Obtain/renew SSL certificate
# Usage: make ssl DOMAIN=rk.singularraritylabs.com EMAIL=your@email.com
ssl:
docker compose stop nginx
certbot certonly --standalone -d $(DOMAIN) --email $(EMAIL) --agree-tos --non-interactive
docker compose start nginx
# Manual database backup to S3
backup:
docker compose exec backend bash /app/scripts/backup_db.sh
# Pull Ollama model (run once after first deploy)
ollama-pull:
docker compose exec ollama ollama pull phi3:mini
# Shell access
shell-backend:
docker compose exec backend bash
shell-db:
docker compose exec postgres psql -U soma -d somadb
# Health check
health:
curl -s http://localhost/health | python3 -m json.tool
# Show container status
status:
docker compose ps