diff --git a/README.md b/README.md index ff20cafc..4f9a1701 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ just dev | `just check` | Run linting and type checks | | `just fix` | Auto-fix formatting and lint issues | | `just build` | Build all packages | -| `just deploy ` | Deploy API and app to Cloudflare | +| `just deploy` | Deploy the live API and app to Cloudflare | | `just native` | Run the native desktop app | ## MOQ (Media over QUIC) diff --git a/api/justfile b/api/justfile index 054a2e4d..8e1f099a 100644 --- a/api/justfile +++ b/api/justfile @@ -18,6 +18,6 @@ check: fix: bun wrangler types -deploy env="staging": build - bun wrangler d1 migrations apply DB --env "{{env}}" --remote - bun wrangler deploy --env "{{env}}" +deploy: build + bun wrangler d1 migrations apply DB --env live --remote + bun wrangler deploy --env live diff --git a/api/worker-configuration.d.ts b/api/worker-configuration.d.ts index 697d30da..ca996c13 100644 --- a/api/worker-configuration.d.ts +++ b/api/worker-configuration.d.ts @@ -1,18 +1,18 @@ /* eslint-disable */ -// Generated by Wrangler by running `wrangler types` (hash: be2048b211127b05f5ed3f0a7d1ef2eb) +// Wrangler runtime types with environment bindings updated for the live-only configuration. // Runtime types generated with workerd@1.20250906.0 2025-07-09 declare namespace Cloudflare { interface Env { - API_URL: "http://localhost:3000" | "https://api.hang.now" | "https://api.hang.live"; - APP_URL: "http://localhost:1420" | "https://hang.now" | "https://hang.live"; - GOOGLE_CLIENT_ID: "632186286103-6g3knqa8eof9p4bf1ndedgn9r6g68n73.apps.googleusercontent.com" | "1093943946174-915g0a9jpu7gih5emghmtabhge29qgg2.apps.googleusercontent.com" | "632186286103-p5k3rhlsq1bgkku7dluko4nlv4ca4hao.apps.googleusercontent.com"; - DISCORD_CLIENT_ID: "1392633766010294494" | "1392629623812259940" | "1389725440020840548"; - R2_PUBLIC_URL: "http://localhost:3000/public" | "https://public.hang.now" | "https://public.hang.live"; - RELAY_URL: "http://localhost:4443" | "https://relay.moq.dev"; - RELAY_PREFIX: "demo" | "staging" | "live"; - APPLE_CLIENT_ID: "now.hang.api" | "live.hang.api"; + API_URL: "http://localhost:3000" | "https://api.hang.live"; + APP_URL: "http://localhost:1420" | "https://hang.live"; + GOOGLE_CLIENT_ID: "632186286103-6g3knqa8eof9p4bf1ndedgn9r6g68n73.apps.googleusercontent.com" | "632186286103-p5k3rhlsq1bgkku7dluko4nlv4ca4hao.apps.googleusercontent.com"; + DISCORD_CLIENT_ID: "1392633766010294494" | "1389725440020840548"; + R2_PUBLIC_URL: "http://localhost:3000/public" | "https://public.hang.live"; + RELAY_URL: "http://localhost:4443" | "https://cdn.moq.dev"; + RELAY_PREFIX: "demo" | "hang"; + APPLE_CLIENT_ID: "live.hang.api"; APPLE_TEAM_ID: "D7D5SDDB5Z"; - APPLE_KEY_ID: "7BQ2ZQY943" | "Q7CN38JH2Z"; + APPLE_KEY_ID: "Q7CN38JH2Z"; AUTH_SECRET: string; GOOGLE_CLIENT_SECRET: string; DISCORD_CLIENT_SECRET: string; diff --git a/api/wrangler.jsonc b/api/wrangler.jsonc index 665c123d..3fdbc839 100644 --- a/api/wrangler.jsonc +++ b/api/wrangler.jsonc @@ -62,52 +62,7 @@ // "RELAY_SECRET": }, - // Staging environment overrides "env": { - "staging": { - "name": "api-hang-now", - "account_id": "dd618f5dbd5da77b8296f1613c301f5c", - "route": { - "pattern": "api.hang.now", - "custom_domain": true - }, - "d1_databases": [ - { - "binding": "DB", - "database_name": "db-hang-now", - "database_id": "6b0a56ab-3475-463d-8025-2e0e42779895" - } - ], - "r2_buckets": [ - { - "binding": "PUBLIC", - "bucket_name": "public-hang-now" - } - ], - "vars": { - "API_URL": "https://api.hang.now", - "APP_URL": "https://hang.now", - - // "AUTH_SECRET": npx wrangler secret put AUTH_SECRET --env staging - - "GOOGLE_CLIENT_ID": "1093943946174-915g0a9jpu7gih5emghmtabhge29qgg2.apps.googleusercontent.com", - // "GOOGLE_CLIENT_SECRET": npx wrangler secret put GOOGLE_CLIENT_SECRET --env staging - - "DISCORD_CLIENT_ID": "1392629623812259940", - // "DISCORD_CLIENT_SECRET": npx wrangler secret put DISCORD_CLIENT_SECRET --env staging - - "APPLE_CLIENT_ID": "now.hang.api", - "APPLE_TEAM_ID": "D7D5SDDB5Z", - "APPLE_KEY_ID": "7BQ2ZQY943", - // "APPLE_CLIENT_SECRET": npx wrangler secret put APPLE_CLIENT_SECRET --env staging - - "R2_PUBLIC_URL": "https://public.hang.now", - - "RELAY_URL": "https://cdn.moq.dev", - "RELAY_PREFIX": "staging" - // "RELAY_SECRET": npx wrangler secret put RELAY_SECRET --env staging - } - }, // Live/production environment overrides "live": { "name": "api-hang-live", diff --git a/app/justfile b/app/justfile index 71d50ad6..fed42dbc 100644 --- a/app/justfile +++ b/app/justfile @@ -11,10 +11,10 @@ upgrade: build env="development": bun vite build --mode "{{env}}" -# Deploy the site to Cloudflare Pages -deploy env="staging": - just build "{{env}}" - bun wrangler deploy --env "{{env}}" +# Deploy the site to Cloudflare Workers +deploy: + just build live + bun wrangler deploy --env live # Run the app in development mode dev: diff --git a/app/wrangler.jsonc b/app/wrangler.jsonc index f8f46a17..84f48c83 100644 --- a/app/wrangler.jsonc +++ b/app/wrangler.jsonc @@ -17,17 +17,7 @@ "port": 1420 }, - // Staging environment configuration "env": { - "staging": { - "name": "hang-now", - "account_id": "dd618f5dbd5da77b8296f1613c301f5c", - "route": { - "pattern": "hang.now", - "custom_domain": true - } - }, - // Production environment configuration "live": { "name": "hang-live", diff --git a/justfile b/justfile index 8f9ece95..f07c2773 100644 --- a/justfile +++ b/justfile @@ -42,9 +42,9 @@ build: prod: build bun run --filter='@hang/*' prod -deploy env="staging": - just api deploy "{{env}}" - just app deploy "{{env}}" +deploy: + just api deploy + just app deploy # Run the Android build, using --open to open Android Studio android *args: diff --git a/native/tauri.staging.json b/native/tauri.staging.json deleted file mode 100644 index 0fbece42..00000000 --- a/native/tauri.staging.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "https://schema.tauri.app/config/2", - "productName": "hang.now", - "identifier": "now.hang", - "build": { - "beforeBuildCommand": { - "cwd": "../app", - "script": "just build staging", - "wait": true - }, - "frontendDist": "../app/dist" - }, - "app": { - "windows": [ - { - "title": "hang.now", - "width": 1280, - "height": 720, - "resizable": true - } - ] - }, - "plugins": { - "updater": { - "endpoints": ["https://hang.now/version/{{target}}.json"] - } - } -}