Fix Docker deployment and runtime environment variables
- Add --break-system-packages flag to pip install for Alpine Linux 3.12+ compatibility - Configure Astro server to bind to 0.0.0.0 for Docker container accessibility - Replace import.meta.env with process.env for runtime environment variable access in SSR - Enable dynamic LOGIN configuration at runtime Co-Authored-By: Warp <agent@warp.dev>
This commit is contained in:
@@ -14,7 +14,7 @@ const translations: Record<string, Translations> = {
|
||||
*/
|
||||
export function getLocale(astro: AstroGlobal): string {
|
||||
// Check environment variable first (for Docker/container environments)
|
||||
const envLocale = import.meta.env.LOCALE;
|
||||
const envLocale = process.env.LOCALE;
|
||||
if (envLocale && (envLocale === 'de' || envLocale === 'en')) {
|
||||
return envLocale;
|
||||
}
|
||||
@@ -26,7 +26,7 @@ export function getLocale(astro: AstroGlobal): string {
|
||||
*/
|
||||
export function getLocaleFromRequest(request: Request): string {
|
||||
// Check environment variable first (for Docker/container environments)
|
||||
const envLocale = import.meta.env.LOCALE;
|
||||
const envLocale = process.env.LOCALE;
|
||||
if (envLocale && (envLocale === 'de' || envLocale === 'en')) {
|
||||
return envLocale;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user