Fix some issues 2
This commit is contained in:
@@ -11,6 +11,7 @@ ENV NODE_ENV=production
|
|||||||
ENV VITE_API_URL=/api
|
ENV VITE_API_URL=/api
|
||||||
ENV VITE_APP_TITLE="BakeWise"
|
ENV VITE_APP_TITLE="BakeWise"
|
||||||
ENV VITE_APP_VERSION="1.0.0"
|
ENV VITE_APP_VERSION="1.0.0"
|
||||||
|
ENV VITE_STRIPE_PUBLISHABLE_KEY="pk_test_51QuxKyIzCdnBmAVTGM8fvXYkItrBUILz6lHYwhAva6ZAH1HRi0e8zDRgZ4X3faN0zEABp5RHjCVBmMJL3aKXbaC200fFrSNnPl"
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 2: Serve with nginx
|
# Stage 2: Serve with nginx
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ ENV VITE_APP_VERSION="1.0.0-debug"
|
|||||||
ENV VITE_PILOT_MODE_ENABLED="false"
|
ENV VITE_PILOT_MODE_ENABLED="false"
|
||||||
ENV VITE_PILOT_COUPON_CODE="PILOT2025"
|
ENV VITE_PILOT_COUPON_CODE="PILOT2025"
|
||||||
ENV VITE_PILOT_TRIAL_MONTHS="3"
|
ENV VITE_PILOT_TRIAL_MONTHS="3"
|
||||||
ENV VITE_STRIPE_PUBLISHABLE_KEY="pk_test_"
|
ENV VITE_STRIPE_PUBLISHABLE_KEY="pk_test_51QuxKyIzCdnBmAVTGM8fvXYkItrBUILz6lHYwhAva6ZAH1HRi0e8zDRgZ4X3faN0zEABp5RHjCVBmMJL3aKXbaC200fFrSNnPl"
|
||||||
|
|
||||||
# Set Node.js memory limit for the build process
|
# Set Node.js memory limit for the build process
|
||||||
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
||||||
|
|||||||
@@ -93,13 +93,11 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Main location block for SPA routing
|
# Main location block for SPA routing
|
||||||
|
# Note: JS/CSS files are handled by specific location blocks above with try_files $uri =404
|
||||||
|
# This ensures missing assets return 404 instead of index.html (which causes MIME type errors)
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ @fallback;
|
# Don't fallback to index.html for asset files - they should 404 if missing
|
||||||
}
|
try_files $uri $uri/ /index.html;
|
||||||
|
|
||||||
# Fallback for SPA routing - serve index.html
|
|
||||||
location @fallback {
|
|
||||||
rewrite ^.*$ /index.html last;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Health check endpoint
|
# Health check endpoint
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ class ApiClient {
|
|||||||
'/public/contact',
|
'/public/contact',
|
||||||
'/public/feedback',
|
'/public/feedback',
|
||||||
'/public/prelaunch-subscribe',
|
'/public/prelaunch-subscribe',
|
||||||
|
'/plans', // Subscription plans metadata - public for registration flow
|
||||||
];
|
];
|
||||||
|
|
||||||
// Endpoints that require authentication but not a tenant ID (user-level endpoints)
|
// Endpoints that require authentication but not a tenant ID (user-level endpoints)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const getStripeKey = (): string => {
|
|||||||
if (typeof window !== 'undefined' && window.__RUNTIME_CONFIG__?.VITE_STRIPE_PUBLISHABLE_KEY) {
|
if (typeof window !== 'undefined' && window.__RUNTIME_CONFIG__?.VITE_STRIPE_PUBLISHABLE_KEY) {
|
||||||
return window.__RUNTIME_CONFIG__.VITE_STRIPE_PUBLISHABLE_KEY;
|
return window.__RUNTIME_CONFIG__.VITE_STRIPE_PUBLISHABLE_KEY;
|
||||||
}
|
}
|
||||||
return import.meta.env.VITE_STRIPE_PUBLISHABLE_KEY || 'pk_test_51234567890123456789012345678901234567890123456789012345678901234567890123456789012345';
|
return import.meta.env.VITE_STRIPE_PUBLISHABLE_KEY || 'pk_test_51QuxKyIzCdnBmAVTGM8fvXYkItrBUILz6lHYwhAva6ZAH1HRi0e8zDRgZ4X3faN0zEABp5RHjCVBmMJL3aKXbaC200fFrSNnPl';
|
||||||
};
|
};
|
||||||
|
|
||||||
// Force Stripe to use test environment by loading from test endpoint
|
// Force Stripe to use test environment by loading from test endpoint
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ from app.core.config import settings
|
|||||||
|
|
||||||
logger = structlog.get_logger()
|
logger = structlog.get_logger()
|
||||||
|
|
||||||
router = APIRouter(prefix="/api/v1/public", tags=["public-contact"])
|
router = APIRouter(prefix="/public", tags=["public-contact"])
|
||||||
|
|
||||||
# ================================================================
|
# ================================================================
|
||||||
# PYDANTIC MODELS
|
# PYDANTIC MODELS
|
||||||
|
|||||||
Reference in New Issue
Block a user