Déploiement du FRONT
Provider
Cloudflare Workers
Informations
| Caractéristique | Environnement "staging" | Environnement "production" |
|---|---|---|
| Commande | npm run deploy:staging | npm run deploy:prod |
| Nom du Worker | beezyup-front-staging | beezyup-front-prod |
Variable NUXT_PUBLIC_API_URL | api-stg.beezyup.com | api.beezyup.com |
| Domaine | staging.beezyup.com | beezyup.com |
Environnement
PROD
warning
Environnement Production
- BETA : https://beta.beezyup.com
Déploiement automatique
Le déploiement automatique est en place sur la branch main
Repo Git : https://gitlab.com/skup2/beezyup/beezyup-frontend/-/tree/main
Déploiement manuel
A la racine du code
npm run deploy:prod
# Lance la commande yarn run build && npx wrangler deploy
Création des secrets
npx wrangler secret put NUXT_PUBLIC_VAPID_PUBLIC_KEY --name beezyup-front-prod
Lister les secrets
npx wrangler secret list
STAGING
Déploiement automatique
Le déploiement automatique est en place sur la branch dev
Repo Git : https://gitlab.com/skup2/beezyup/beezyup-frontend/-/tree/main
Déploiement manuel
A la racine du code
npm run deploy:staging
# Lance la commande cross-env BUILD_ENV=staging yarn run build && npx wrangler deploy
Création des secrets
npx wrangler secret put NUXT_PUBLIC_VAPID_PUBLIC_KEY --name beezyup-front-staging
Lister les secrets
npx wrangler secret list --name beezyup-front-staging
Configuration
Il y a deux configurations un pour chaque environnement.
Dans le fichier /nuxt.config.ts
/nuxt.config.ts
// Configuration de base pour la production
const productionConfig = {
name: "beezyup-front-prod",
routes: [
{
"pattern": "beta.beezyup.com",
"custom_domain": true
}
],
workers_dev: false,
vars: {
NUXT_PUBLIC_SUPABASE_URL: "https://xxxxxx.supabase.co",
NUXT_PUBLIC_BASE_URL: "https://beta.beezyup.com",
NUXT_PUBLIC_API_URL: "https://bo-beezyup.lombardandco.fr",
PORT: "3000"
}
};
// Configuration spécifique pour le staging
const stagingConfig = {
name: "beezyup-front-staging", // Nom distinct pour le worker de staging
routes: [
{
"pattern": "staging.beezyup.com",
"custom_domain": true
}
],
vars: {
NUXT_PUBLIC_SUPABASE_URL: "https://stagingxxx.supabase.co",
NUXT_PUBLIC_BASE_URL: "https://staging.beezyup.com",
NUXT_PUBLIC_API_URL: "https://api-stg.beezyup.com",
PORT: "3000"
}
};