File size: 2,831 Bytes
fee2f22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Render Blueprint for data-cleaning-openenv
# Deploy this via: https://dashboard.render.com/blueprint
#
# Prerequisites:
#   1. Create PostgreSQL database on Render (manually, then copy DATABASE_URL)
#   2. Create Redis service on Render (manually, then copy REDIS_URL)
#   3. Get HF_TOKEN from huggingface.co
#   4. Generate JWT_SECRET: python -c "import secrets; print(secrets.token_urlsafe(32))"
#
# This blueprint creates:
#   - Backend FastAPI service
#   - Celery worker
#
# You must create PostgreSQL and Redis manually (see DEPLOYMENT.md)
# Frontend is deployed separately (see DEPLOYMENT.md)

services:
  # Backend FastAPI Service
  - type: web
    name: data-cleaning-backend
    runtime: docker
    repo: https://github.com/AnubhavKiroula/data-cleaning-openenv
    branch: main
    dockerfilePath: ./backend/Dockerfile
    dockerContext: ./backend
    envVars:
      - key: DATABASE_URL
        value: postgresql://admin:password@postgres:5432/data_cleaning
        comment: "REQUIRED: Replace with your Render PostgreSQL URL"
      - key: REDIS_URL
        value: redis://redis:6379/0
        comment: "REQUIRED: Replace with your Render Redis URL"
      - key: JWT_SECRET
        sync: false
        comment: "REQUIRED: Generate with python -c 'import secrets; print(secrets.token_urlsafe(32))'"
      - key: ENVIRONMENT
        value: production
      - key: LOG_LEVEL
        value: INFO
      - key: API_BASE_URL
        value: https://api-inference.huggingface.co/v1
      - key: MODEL_NAME
        value: meta-llama/Llama-3.2-1B-Instruct
      - key: HF_TOKEN
        sync: false
        comment: "REQUIRED: Get from huggingface.co/settings/tokens"
    numInstances: 1
    healthCheckPath: /health

  # Celery Worker
  - type: worker
    name: data-cleaning-celery
    runtime: docker
    repo: https://github.com/AnubhavKiroula/data-cleaning-openenv
    branch: main
    dockerfilePath: ./backend/Dockerfile
    dockerContext: ./backend
    dockerCommand: celery -A backend.tasks worker --loglevel=info
    envVars:
      - key: DATABASE_URL
        value: postgresql://admin:password@postgres:5432/data_cleaning
        comment: "REQUIRED: Replace with your Render PostgreSQL URL"
      - key: REDIS_URL
        value: redis://redis:6379/0
        comment: "REQUIRED: Replace with your Render Redis URL"
      - key: JWT_SECRET
        sync: false
        comment: "REQUIRED: Generate with python -c 'import secrets; print(secrets.token_urlsafe(32))'"
      - key: ENVIRONMENT
        value: production
      - key: LOG_LEVEL
        value: INFO
      - key: API_BASE_URL
        value: https://api-inference.huggingface.co/v1
      - key: MODEL_NAME
        value: meta-llama/Llama-3.2-1B-Instruct
      - key: HF_TOKEN
        sync: false
        comment: "REQUIRED: Get from huggingface.co/settings/tokens"