Skip to content

Commit bd9abd7

Browse files
feat(frontend): configure staging and production environments (FRO-61)
- Add .env.staging with Railway staging API URL - Add .env.production placeholder for future production environment - Add build:staging script to use staging configuration - Allow .env.staging and .env.production in git (no secrets, only public URLs) - Simplify api.ts to rely on environment files Environment configuration: - Development: localhost:5000/api (fallback) - Staging: https://fantasyrealm-api-staging.up.railway.app/api - Production: To be configured with Railway production URL Build: ✓ (staging mode verified)
1 parent f085363 commit bd9abd7

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ pids/
113113
.env
114114
.env.*
115115
!.env.example
116+
!.env.staging
117+
!.env.production
116118

117119
# =====================================================
118120
# IDEs and Editors

src/frontend/.env.production

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Production environment - Railway backend (à configurer quand l'environnement de production sera créé)
2+
# VITE_API_URL=https://fantasyrealm-api-production.up.railway.app/api

src/frontend/.env.staging

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Staging environment - Railway backend
2+
VITE_API_URL=https://fantasyrealm-api-staging.up.railway.app/api

src/frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc -b && vite build",
9+
"build:staging": "tsc -b && vite build --mode staging",
910
"lint": "eslint .",
1011
"lint:fix": "eslint . --fix",
1112
"format": "prettier --write \"src/**/*.{ts,tsx,css}\"",

0 commit comments

Comments
 (0)