mobile v0.1 with deployment for ios (#191)
* stage 1: project init * stage 2: skeleton with navigation * step 2.5: streams list * step 4: stream playback experience * step 5-6: compose experience * fix: broken record * transcode media particles to mp4 * build: reproducible go generate * build: rename skaffold module for particle processor worker * infra: increase particle processor worker resources Was dealing with OOM errors * tweaks to mobile * log transcode work * view on desktop placeholder * tweak padding * cap video resolution to save on memory * infra: bump memory limits as insurance * ux improvements * update bundle id for mobile * config for mobile
This commit was merged in pull request #191.
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
import Constants from "expo-constants";
|
||||
|
||||
// Expo-side equivalent of desktop's __APP_ENV__ build-time replacement
|
||||
// (see js/desktop/src/config/env.ts). On mobile we read from app.config.ts
|
||||
// `extra.appEnv`, which itself reads `process.env.EXPO_PUBLIC_APP_ENV` at
|
||||
// build time. Defaults to "dev".
|
||||
//
|
||||
// Firebase web config is public by design (security is enforced via
|
||||
// Firestore rules + App Check), so both configs live in source. To refresh,
|
||||
// run: cd infra/gcp/{dev,prod} && terraform output -json firebase_config
|
||||
|
||||
type FirebaseConfig = {
|
||||
apiKey: string;
|
||||
appId: string;
|
||||
authDomain: string;
|
||||
messagingSenderId: string;
|
||||
projectId: string;
|
||||
storageBucket: string;
|
||||
};
|
||||
|
||||
type AppConfig = {
|
||||
orionUrl: string;
|
||||
pusherUrl: string;
|
||||
firebase: FirebaseConfig;
|
||||
/** Empty string disables Sentry. Same DSN across envs; events are split by `environment` tag. */
|
||||
sentryDsn: string;
|
||||
};
|
||||
|
||||
const configs: Record<"dev" | "prod", AppConfig> = {
|
||||
dev: {
|
||||
orionUrl: "https://orion.dev.flowy.live",
|
||||
pusherUrl: "wss://pusher.dev.flowy.live/ws",
|
||||
firebase: {
|
||||
apiKey: "AIzaSyDF_fbk7tDY9tNxUiOwwi--2nYZWZygMGk",
|
||||
appId: "1:1006580076785:web:e2a0736d60a78e02b15950",
|
||||
authDomain: "flowy-dev-440017.firebaseapp.com",
|
||||
messagingSenderId: "1006580076785",
|
||||
projectId: "flowy-dev-440017",
|
||||
storageBucket: "flowy-dev-440017.firebasestorage.app",
|
||||
},
|
||||
sentryDsn:
|
||||
"https://4bb3af832825929eeec8ab4edd56930f@o4511282312118272.ingest.us.sentry.io/4511282313494528",
|
||||
},
|
||||
prod: {
|
||||
orionUrl: "https://orion.flowy.live",
|
||||
pusherUrl: "wss://pusher.flowy.live/ws",
|
||||
firebase: {
|
||||
apiKey: "AIzaSyB8it3SKr9DHScHGlpu4uwWicvt8wzjdBg",
|
||||
appId: "1:68063426854:web:5054f16f50898f5706e9e7",
|
||||
authDomain: "flowy-prod-440017.firebaseapp.com",
|
||||
messagingSenderId: "68063426854",
|
||||
projectId: "flowy-prod-440017",
|
||||
storageBucket: "flowy-prod-440017.firebasestorage.app",
|
||||
},
|
||||
sentryDsn:
|
||||
"https://4bb3af832825929eeec8ab4edd56930f@o4511282312118272.ingest.us.sentry.io/4511282313494528",
|
||||
},
|
||||
};
|
||||
|
||||
const rawEnv = (Constants.expoConfig?.extra as { appEnv?: string } | undefined)
|
||||
?.appEnv;
|
||||
export const appEnv: "dev" | "prod" = rawEnv === "prod" ? "prod" : "dev";
|
||||
export const appConfig: AppConfig = configs[appEnv];
|
||||
Reference in New Issue
Block a user