Fix CORS and API URLs for container communication
This commit is contained in:
Submodule HarborForge.Frontend.Test updated: db9fadd13d...3b9533a432
@@ -34,7 +34,8 @@ services:
|
|||||||
CONFIG_DIR: /config
|
CONFIG_DIR: /config
|
||||||
LISTEN_ADDR: "0.0.0.0:${WIZARD_PORT:-8080}"
|
LISTEN_ADDR: "0.0.0.0:${WIZARD_PORT:-8080}"
|
||||||
MAX_BACKUPS: "5"
|
MAX_BACKUPS: "5"
|
||||||
CORS_ORIGINS: http://127.0.0.1:${FRONTEND_PORT:-3000},http://localhost:${FRONTEND_PORT:-3000}
|
# Allow frontend (container network) and localhost for testing
|
||||||
|
CORS_ORIGINS: http://frontend:${FRONTEND_PORT:-3000},http://127.0.0.1:${FRONTEND_PORT:-3000},http://localhost:${FRONTEND_PORT:-3000}
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:${WIZARD_PORT:-8080}:${WIZARD_PORT:-8080}"
|
- "127.0.0.1:${WIZARD_PORT:-8080}:${WIZARD_PORT:-8080}"
|
||||||
networks:
|
networks:
|
||||||
@@ -74,7 +75,8 @@ services:
|
|||||||
container_name: harborforge-test-frontend
|
container_name: harborforge-test-frontend
|
||||||
restart: "no"
|
restart: "no"
|
||||||
environment:
|
environment:
|
||||||
VITE_API_BASE_URL: http://127.0.0.1:${BACKEND_PORT:-8000}
|
# Use internal service name for backend API
|
||||||
|
VITE_API_BASE_URL: http://backend:${BACKEND_PORT:-8000}
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:${FRONTEND_PORT:-3000}:${FRONTEND_PORT:-3000}"
|
- "127.0.0.1:${FRONTEND_PORT:-3000}:${FRONTEND_PORT:-3000}"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ services:
|
|||||||
CONFIG_DIR: /config
|
CONFIG_DIR: /config
|
||||||
LISTEN_ADDR: "0.0.0.0:${WIZARD_PORT:-8080}"
|
LISTEN_ADDR: "0.0.0.0:${WIZARD_PORT:-8080}"
|
||||||
MAX_BACKUPS: "5"
|
MAX_BACKUPS: "5"
|
||||||
|
# Internal network only
|
||||||
CORS_ORIGINS: http://frontend:${FRONTEND_PORT:-3000}
|
CORS_ORIGINS: http://frontend:${FRONTEND_PORT:-3000}
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:${WIZARD_PORT:-8080}:${WIZARD_PORT:-8080}"
|
- "127.0.0.1:${WIZARD_PORT:-8080}:${WIZARD_PORT:-8080}"
|
||||||
@@ -67,6 +68,7 @@ services:
|
|||||||
container_name: harborforge-test-frontend
|
container_name: harborforge-test-frontend
|
||||||
restart: "no"
|
restart: "no"
|
||||||
environment:
|
environment:
|
||||||
|
# Use internal service name
|
||||||
VITE_API_BASE_URL: http://backend:${BACKEND_PORT:-8000}
|
VITE_API_BASE_URL: http://backend:${BACKEND_PORT:-8000}
|
||||||
networks:
|
networks:
|
||||||
- test-network
|
- test-network
|
||||||
|
|||||||
Reference in New Issue
Block a user