name: scriptshare region: nyc # Static site for the frontend static_sites: - name: scriptshare-frontend github: repo: your-username/scriptshare-cursor branch: main build_command: npm install && npm run build output_dir: dist environment_slug: node-js source_dir: / routes: - path: / envs: - key: VITE_APP_NAME value: ScriptShare - key: VITE_APP_URL value: ${APP_URL} - key: VITE_API_URL value: ${scriptshare-api.PUBLIC_URL} - key: VITE_ANALYTICS_ENABLED value: "true" # Backend API service services: - name: scriptshare-api github: repo: your-username/scriptshare-cursor branch: main source_dir: / dockerfile_path: Dockerfile.api environment_slug: node-js instance_count: 1 instance_size_slug: basic-xxs http_port: 3000 routes: - path: /api health_check: http_path: /api/health envs: - key: NODE_ENV value: production - key: PORT value: "3000" - key: DATABASE_URL value: ${scriptshare-db.DATABASE_URL} - key: JWT_SECRET value: ${JWT_SECRET} - key: CORS_ORIGIN value: ${scriptshare-frontend.PUBLIC_URL} # Managed MySQL database databases: - name: scriptshare-db engine: MYSQL version: "8" size: db-s-1vcpu-1gb num_nodes: 1 # Environment variables (these will be set in DigitalOcean dashboard) envs: - key: JWT_SECRET scope: RUN_AND_BUILD_TIME type: SECRET - key: APP_URL scope: RUN_AND_BUILD_TIME value: https://scriptshare-frontend-${APP_DOMAIN}