chore: import upstream snapshot with attribution
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:38:58 +08:00
commit bb5c75ce05
8824 changed files with 1946442 additions and 0 deletions
@@ -0,0 +1,62 @@
# Docker-based Service
# Deploy any application using a Dockerfile
services:
- type: web
name: docker-app
runtime: docker
plan: free
region: oregon
branch: main
autoDeploy: true
dockerfilePath: ./Dockerfile # Path to your Dockerfile
dockerContext: . # Build context directory
healthCheckPath: /health
envVars:
- key: PORT
value: 10000
- key: ENVIRONMENT
value: production
- key: DATABASE_URL
fromDatabase:
name: postgres
property: connectionString
- key: REDIS_URL
fromDatabase:
name: redis
property: connectionString
- key: SECRET_KEY
sync: false # User provides in Dashboard
databases:
- name: postgres
databaseName: app_production
user: app_user
plan: free
postgresMajorVersion: "15"
ipAllowList: []
- name: redis
plan: free
maxmemoryPolicy: allkeys-lru
ipAllowList: []
# Example multi-stage Dockerfile:
#
# # Build stage
# FROM node:20-alpine AS builder
# WORKDIR /app
# COPY package*.json ./
# RUN npm ci
# COPY . .
# RUN npm run build
#
# # Production stage
# FROM node:20-alpine
# WORKDIR /app
# COPY --from=builder /app/dist ./dist
# COPY --from=builder /app/node_modules ./node_modules
# COPY package*.json ./
# ENV NODE_ENV=production
# EXPOSE 10000
# CMD ["node", "dist/main.js"]
@@ -0,0 +1,35 @@
# Go API Service
# High-performance Go web service with PostgreSQL
services:
- type: web
name: go-api
runtime: go
plan: free
region: oregon
branch: main
autoDeploy: true
buildCommand: go build -o bin/app -ldflags="-s -w" .
startCommand: ./bin/app
healthCheckPath: /health
envVars:
- key: PORT
value: 10000
- key: ENVIRONMENT
value: production
- key: DATABASE_URL
fromDatabase:
name: postgres
property: connectionString
- key: JWT_SECRET
sync: false # User provides in Dashboard
- key: API_KEY
sync: false # User provides in Dashboard
databases:
- name: postgres
databaseName: go_api_production
user: go_api_user
plan: free
postgresMajorVersion: "15"
ipAllowList: [] # Internal access only
@@ -0,0 +1,35 @@
# Next.js Application with PostgreSQL
# Full-stack Next.js app with database
services:
- type: web
name: nextjs-app
runtime: node
plan: free
region: oregon
branch: main
autoDeploy: true
buildCommand: npm ci && npm run build
startCommand: npm start
healthCheckPath: /api/health
envVars:
- key: NODE_ENV
value: production
- key: DATABASE_URL
fromDatabase:
name: postgres
property: connectionString
- key: NEXTAUTH_URL
value: https://nextjs-app.onrender.com
- key: NEXTAUTH_SECRET
sync: false # User provides in Dashboard
- key: JWT_SECRET
generateValue: true
databases:
- name: postgres
databaseName: nextjs_production
user: nextjs_user
plan: free
postgresMajorVersion: "15"
ipAllowList: [] # Internal access only
@@ -0,0 +1,25 @@
# Node.js Express API
# Basic web service with Express.js framework
services:
- type: web
name: express-api
runtime: node
plan: free
region: oregon
branch: main
autoDeploy: true
buildCommand: npm ci
startCommand: npm start
healthCheckPath: /health
envVars:
- key: NODE_ENV
value: production
# PORT is automatically provided by Render (default: 10000)
# Only uncomment if you need to override:
# - key: PORT
# value: 10000
- key: LOG_LEVEL
value: info
- key: API_KEY
sync: false # User provides in Dashboard
@@ -0,0 +1,89 @@
# Django Application with Worker and Databases
# Full Django stack with Celery worker, PostgreSQL, and Redis
services:
# Django web service
- type: web
name: django-web
runtime: python
plan: free
region: oregon
branch: main
autoDeploy: true
buildCommand: pip install -r requirements.txt && python manage.py collectstatic --no-input && python manage.py migrate
startCommand: gunicorn config.wsgi:application --bind 0.0.0.0:$PORT --workers 2
healthCheckPath: /health/
envVars:
- key: PYTHON_VERSION
value: 3.11.5
- key: DJANGO_SETTINGS_MODULE
value: config.settings.production
- key: DJANGO_SECRET_KEY
sync: false # User provides in Dashboard
- key: DJANGO_ALLOWED_HOSTS
value: django-web.onrender.com
- key: DATABASE_URL
fromDatabase:
name: postgres
property: connectionString
- key: REDIS_URL
fromDatabase:
name: redis
property: connectionString
# Celery worker for background tasks
- type: worker
name: celery-worker
runtime: python
plan: free
region: oregon
branch: main
autoDeploy: true
buildCommand: pip install -r requirements.txt
startCommand: celery -A config.celery_app worker --loglevel=info --concurrency=2
envVars:
- key: DJANGO_SETTINGS_MODULE
value: config.settings.production
- key: DJANGO_SECRET_KEY
sync: false # Same as web service
- key: DATABASE_URL
fromDatabase:
name: postgres
property: connectionString
- key: REDIS_URL
fromDatabase:
name: redis
property: connectionString
# Celery beat for periodic tasks (optional)
- type: worker
name: celery-beat
runtime: python
plan: free
region: oregon
branch: main
autoDeploy: true
buildCommand: pip install -r requirements.txt
startCommand: celery -A config.celery_app beat --loglevel=info
envVars:
- key: DJANGO_SETTINGS_MODULE
value: config.settings.production
- key: REDIS_URL
fromDatabase:
name: redis
property: connectionString
databases:
# PostgreSQL database
- name: postgres
databaseName: django_production
user: django_user
plan: free
postgresMajorVersion: "15"
ipAllowList: [] # Internal access only
# Redis for Celery and caching
- name: redis
plan: free
maxmemoryPolicy: allkeys-lru
ipAllowList: [] # Internal access only
@@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M11.2365 1.4021C9.55118 1.32277 8.13398 2.54148 7.89217 4.14718C7.8826 4.22169 7.86824 4.2938 7.85627 4.36592C7.48042 6.36584 5.73048 7.8802 3.62863 7.8802C2.87933 7.8802 2.17553 7.68789 1.56269 7.35137C1.48848 7.31051 1.3999 7.36339 1.3999 7.44752V7.87779V14.3607H7.85387V9.50036C7.85387 8.60612 8.57686 7.8802 9.46734 7.8802H11.0809C12.9074 7.8802 14.3773 6.35862 14.3054 4.50774C14.2408 2.84194 12.8954 1.48142 11.2365 1.4021Z"/>
</svg>

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

@@ -0,0 +1,54 @@
# Static Site (React/Vue/Gatsby)
# SPA with client-side routing
services:
- type: web
name: react-app
runtime: static
plan: free
branch: main
autoDeploy: true
buildCommand: npm ci && npm run build
staticPublishPath: ./build # Change to ./dist for Vue/Vite, ./public for Gatsby
# SPA routing - rewrite all routes to index.html
routes:
- type: rewrite
source: /*
destination: /index.html
# Cache control headers
headers:
# Cache static assets aggressively
- path: /static/*
name: Cache-Control
value: public, max-age=31536000, immutable
# Cache other assets for 1 hour
- path: /assets/*
name: Cache-Control
value: public, max-age=3600
# Don't cache index.html
- path: /index.html
name: Cache-Control
value: no-cache, no-store, must-revalidate
# Security headers
- path: /*
name: X-Frame-Options
value: DENY
- path: /*
name: X-Content-Type-Options
value: nosniff
- path: /*
name: Referrer-Policy
value: strict-origin-when-cross-origin
# Environment variables for build (if needed)
envVars:
- key: REACT_APP_API_URL
value: https://api.example.com
# Add other REACT_APP_ or VITE_ variables here