Compare commits
2 Commits
e939543f3b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c3e2f9662 | |||
| f91bfbdd65 |
3
.env.example
Normal file
3
.env.example
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user