Compare commits

..

2 Commits

Author SHA1 Message Date
1c3e2f9662 fix 2026-04-08 18:02:56 -05:00
f91bfbdd65 Bitte nochmal machen 2025-10-08 22:26:33 +02:00
4 changed files with 20 additions and 0 deletions

3
.env.example Normal file
View File

@@ -0,0 +1,3 @@
# API Base URL for production
# Set this to your production domain when building
VITE_API_BASE_URL=https://annavillesda.org

View File

@@ -1,4 +1,13 @@
services:
frontend:
build: . # Nutzt dein vorhandenes Dockerfile (Node Build + Nginx)
container_name: annaville-frontend
restart: unless-stopped
ports:
- "3071:80"
networks:
- annaville-network
backend:
image: node:22-alpine
container_name: annaville-backend

View File

@@ -33,6 +33,10 @@ function resolveImageUrl(value, fallback) {
if (apiBaseUrl) {
return `${apiBaseUrl}${path}`
}
// Fallback to current domain if no API base URL is set
if (typeof window !== 'undefined') {
return `${window.location.origin}${path}`
}
return path
}
return fallback

View File

@@ -15,6 +15,10 @@ function resolveImageUrl(value) {
if (apiBaseUrl) {
return `${apiBaseUrl}${path}`
}
// Fallback to current domain if no API base URL is set
if (typeof window !== 'undefined') {
return `${window.location.origin}${path}`
}
return path
}