mirror of https://github.com/buster-so/buster.git
Trigger a build with example wrangler
This commit is contained in:
parent
d3861d930a
commit
52223a8cfd
|
@ -17,4 +17,5 @@ storybook-static
|
|||
.env.production
|
||||
.env.staging
|
||||
.env.dev
|
||||
.env.local
|
||||
.env.local
|
||||
wrangler.jsonc
|
|
@ -4,7 +4,7 @@
|
|||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"prebuild": "[ \"$SKIP_ENV_CHECK\" = \"true\" ] || tsx scripts/validate-env.ts",
|
||||
"prebuild": "tsx scripts/validate-env.ts",
|
||||
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build -- --typecheck",
|
||||
"build:staging": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build --mode staging",
|
||||
"build:production": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build --mode production -- --typecheck",
|
||||
|
|
|
@ -13,6 +13,8 @@ const requiredEnv = {
|
|||
VITE_PUBLIC_URL: process.env.VITE_PUBLIC_URL,
|
||||
};
|
||||
|
||||
console.log('🐓 The app will use this API URL:', process.env.VITE_PUBLIC_API_URL);
|
||||
|
||||
// Validate environment variables
|
||||
const { hasErrors } = validateEnv(requiredEnv);
|
||||
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"$schema": "node_modules/wrangler/config-schema.json",
|
||||
"name": "web",
|
||||
"main": "./.output/server/index.mjs",
|
||||
"compatibility_date": "2025-09-02", //Happy birthday to Nate 🎉
|
||||
"compatibility_flags": ["nodejs_compat", "no_nodejs_compat_v2"],
|
||||
|
||||
"assets": {
|
||||
"directory": ".output/public"
|
||||
},
|
||||
|
||||
"observability": {
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
"env": {
|
||||
// Development Environment
|
||||
"dev": {
|
||||
"name": "web-dev",
|
||||
"vars": {
|
||||
// Development-specific variables can be set here
|
||||
// Or loaded from .env.dev file
|
||||
}
|
||||
},
|
||||
|
||||
// Staging Environment
|
||||
"staging": {
|
||||
"name": "web-staging",
|
||||
"routes": [
|
||||
{
|
||||
"pattern": "staging.buster.so",
|
||||
"custom_domain": true
|
||||
}
|
||||
],
|
||||
"vars": {
|
||||
// Staging-specific variables can be set here
|
||||
// Or loaded from .env.staging file
|
||||
}
|
||||
},
|
||||
|
||||
// Production Environment
|
||||
"production": {
|
||||
"name": "web-production",
|
||||
"routes": [
|
||||
// {
|
||||
// "pattern": "app.buster.so",
|
||||
// "custom_domain": true
|
||||
// }
|
||||
],
|
||||
"vars": {
|
||||
// Production-specific variables can be set here
|
||||
// Or loaded from .env.production file
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue