Spaces:
Sleeping
Sleeping
Download docker-compose.yml from baljot07/studiq-backend: direct link, hf CLI and curl.
- Browser
- Download file 1.84 kB
-
https://huggingface.co/spaces/baljot07/studiq-backend/resolve/main/docker-compose.yml
- Command line
-
hf download hf://spaces/baljot07/studiq-backend/docker-compose.yml
-
curl -L -o docker-compose.yml https://huggingface.co/spaces/baljot07/studiq-backend/resolve/main/docker-compose.yml
1.84 kB
| # ============================================================ | |
| # StudIQ Backend β Local Development Stack | |
| # ============================================================ | |
| # Starts PostgreSQL, Redis, and the API server. | |
| # Usage: docker compose up --build | |
| # ============================================================ | |
| services: | |
| # ββ PostgreSQL Database ββββββββββββββββββββββββββββββββββ | |
| postgres: | |
| image: postgres:16-alpine | |
| environment: | |
| POSTGRES_USER: studiq | |
| POSTGRES_PASSWORD: studiq | |
| POSTGRES_DB: studiq | |
| ports: | |
| - "5432:5432" | |
| volumes: | |
| - pgdata:/var/lib/postgresql/data | |
| healthcheck: | |
| test: ["CMD-SHELL", "pg_isready -U studiq"] | |
| interval: 5s | |
| timeout: 3s | |
| retries: 5 | |
| # ββ Redis Cache ββββββββββββββββββββββββββββββββββββββββββ | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - "6379:6379" | |
| healthcheck: | |
| test: ["CMD", "redis-cli", "ping"] | |
| interval: 5s | |
| timeout: 3s | |
| retries: 5 | |
| # ββ FastAPI Backend ββββββββββββββββββββββββββββββββββββββ | |
| api: | |
| build: . | |
| ports: | |
| - "8000:8000" | |
| env_file: | |
| - .env | |
| environment: | |
| # Override database URLs to point to Docker service names | |
| DATABASE_URL: postgresql+asyncpg://studiq:studiq@postgres:5432/studiq | |
| REDIS_URL: redis://redis:6379 | |
| depends_on: | |
| postgres: | |
| condition: service_healthy | |
| redis: | |
| condition: service_healthy | |
| volumes: | |
| - .:/app | |
| command: > | |
| sh -c "alembic upgrade head && | |
| uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload" | |
| volumes: | |
| pgdata: | |