- Executado npm audit: 2 vulnerabilidades moderate (esbuild) - Vulnerabilidade afeta APENAS ambiente dev (não produção) - esbuild <0.24.2 permite requests ao dev server - Fix disponível com vite@7 (breaking change) - Build de produção não afetado (306KB gzipped) - Deploy Appwrite funcionou 100% (Edge 6/6 distribuído) Nota: Vulnerabilidade não crítica, monitorar futuras atualizações Vite
102 lines
4.9 KiB
Bash
102 lines
4.9 KiB
Bash
# ==============================================================================
|
|
# APPWRITE CONFIGURATION - Backend as a Service (BaaS)
|
|
# ==============================================================================
|
|
# Appwrite Cloud provides authentication, database, storage, and serverless functions
|
|
# Documentation: https://appwrite.io/docs
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# SERVER-SIDE VARIABLES (for Node.js scripts and Appwrite Functions)
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# APPWRITE_ENDPOINT
|
|
# The API endpoint for your Appwrite instance
|
|
# For Appwrite Cloud: https://cloud.appwrite.io/v1
|
|
# For self-hosted: http://localhost/v1 or your custom domain
|
|
APPWRITE_ENDPOINT=https://nyc.cloud.appwrite.io/v1
|
|
|
|
# APPWRITE_PROJECT_ID
|
|
# Your Appwrite project identifier
|
|
# How to get: Go to https://cloud.appwrite.io → Select/Create Project → Copy Project ID
|
|
# Example: 6789abcdef123456
|
|
APPWRITE_PROJECT_ID=68be03580005c05fb11f
|
|
|
|
# APPWRITE_API_KEY
|
|
# Secret API key with Admin permissions for server-side operations
|
|
# How to get: Project Settings → API Keys → Create API Key → Select all scopes
|
|
# WARNING: Keep this secret! Never commit to version control or expose client-side
|
|
# Example: a1b2c3d4e5f6...
|
|
APPWRITE_API_KEY=standard_7001daac229944c8386fdd31be6bf58d571e1293dbb78db1e091da15deabaf59810e33635a5c6526fe3acddcb05253f67283adfd079fea2ea5795d9302af1667b56b7a9ae8d427e082c3b762a86a627adfcbcdf8898d8ea0bb6c445af50a60b45aae65787458c22bbcb0a7e3a0f79a041660a854c898994236de7438859ed8a6
|
|
|
|
# APPWRITE_FUNCTIONS_ENDPOINT (Optional)
|
|
# Custom endpoint for Appwrite Functions if using a dedicated domain
|
|
# Leave empty to use the same as APPWRITE_ENDPOINT
|
|
APPWRITE_FUNCTIONS_ENDPOINT=
|
|
|
|
# APPWRITE_FUNCTIONS_API_KEY (Optional)
|
|
# Separate API key for Functions if you want isolated permissions
|
|
# Leave empty to use the same as APPWRITE_API_KEY
|
|
APPWRITE_FUNCTIONS_API_KEY=
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# CLIENT-SIDE VARIABLES (for React Dashboard - Vite requires VITE_ prefix)
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# VITE_APPWRITE_ENDPOINT
|
|
# Same as APPWRITE_ENDPOINT, but accessible in browser via import.meta.env
|
|
# Must start with VITE_ to be exposed by Vite build system
|
|
VITE_APPWRITE_ENDPOINT=https://nyc.cloud.appwrite.io/v1
|
|
|
|
# VITE_APPWRITE_PROJECT_ID
|
|
# Your Appwrite project identifier (same value as APPWRITE_PROJECT_ID)
|
|
# Exposed to browser for client SDK initialization
|
|
VITE_APPWRITE_PROJECT_ID=68be03580005c05fb11f
|
|
|
|
# VITE_APPWRITE_DATABASE_ID
|
|
# The database ID where all collections are stored
|
|
# How to get: Appwrite Console → Databases → Create/Select Database → Copy Database ID
|
|
# Suggested name: "DevOpsPlatform"
|
|
# Example: main_db_123
|
|
VITE_APPWRITE_DATABASE_ID=693b54a8000dcf488143
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# COLLECTION IDs (created inside the database)
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# VITE_APPWRITE_COLLECTION_SERVERS_ID
|
|
# Collection for storing server information
|
|
# Schema: name (string), ip (string), status (enum: online/offline), region (string)
|
|
# Suggested ID: "servers"
|
|
VITE_APPWRITE_COLLECTION_SERVERS_ID=servers
|
|
|
|
# VITE_APPWRITE_COLLECTION_GITHUB_REPOS_ID
|
|
# Collection for GitHub repository data
|
|
# Schema: repo_name (string), url (url), last_commit (string), status (string)
|
|
# Suggested ID: "github_repos"
|
|
VITE_APPWRITE_COLLECTION_GITHUB_REPOS_ID=github_repos
|
|
|
|
# VITE_APPWRITE_COLLECTION_AUDIT_LOGS_ID
|
|
# Collection for audit log entries (used by Realtime terminal widget)
|
|
# Schema: event (string), user_id (string), timestamp (datetime)
|
|
# Suggested ID: "audit_logs"
|
|
VITE_APPWRITE_COLLECTION_AUDIT_LOGS_ID=audit_logs
|
|
|
|
# VITE_APPWRITE_COLLECTION_CLOUDFLARE_ACCOUNTS_ID
|
|
# Collection for Cloudflare account integrations
|
|
# Schema: provider (string), apiKey (string), label (string)
|
|
# Suggested ID: "cloud_accounts" or "cloudflare_accounts"
|
|
VITE_APPWRITE_COLLECTION_CLOUDFLARE_ACCOUNTS_ID=cloud_accounts
|
|
|
|
# ==============================================================================
|
|
# SETUP CHECKLIST
|
|
# ==============================================================================
|
|
# 1. Create Appwrite Cloud account at https://cloud.appwrite.io
|
|
# 2. Create a new project and copy the Project ID
|
|
# 3. Create API Key with all permissions (for server-side operations)
|
|
# 4. Create a Database named "DevOpsPlatform" and copy its ID
|
|
# 5. Create collections inside the database with the schemas described above
|
|
# 6. Enable Email/Password authentication provider
|
|
# 7. Create a test user in Authentication → Users
|
|
# 8. Deploy the three Appwrite Functions from appwrite-functions/ directory
|
|
# 9. Fill in all the IDs above
|
|
# 10. Run: npm install → npm run dev:web
|
|
# ==============================================================================
|