fixed to docker-compose

This commit is contained in:
2026-01-24 09:54:27 -05:00
parent 2aca22148f
commit 5ddb769e54
4 changed files with 12 additions and 7 deletions

View File

@@ -34,12 +34,12 @@ services:
- battlbuilder-api
networks:
- app-network
- nginx_nginx
# - nginx_nginx
# --- Docker Network for Inter-Container Communication ---
networks:
app-network:
external: false
nginx_nginx:
external: true
# nginx_nginx:
# external: true

View File

@@ -10,7 +10,7 @@ TAG=$(git rev-parse --short HEAD)
FULL_IMAGE="$REGISTRY/$OWNER/$IMAGE"
echo "Building $FULL_IMAGE:$TAG"
docker build -f docker/backend/Dockerfile -t $FULL_IMAGE:$TAG .
docker buildx build -f docker/backend/Dockerfile --platform linux/amd64,linux/arm64 --push -t $FULL_IMAGE:$TAG .
echo "Tagging latest"
docker tag $FULL_IMAGE:$TAG $FULL_IMAGE:latest

View File

@@ -22,11 +22,13 @@ public class CorsConfig {
// Allow Angular development server
config.setAllowedOrigins(Arrays.asList(
"http://localhost:3000", // local dev
"http://localhost:3000",
"http://localhost:3001", // local dev
"https://localhost:3000", // local https dev (if used)
"https://battl.builders",
"http://bb-web-app:3001",
"http://bb-web-app:3000"
"http://bb-web-app:3000",
"http://bb-web-app"
)); // production frontend));

View File

@@ -80,10 +80,13 @@ public class SecurityConfig {
CorsConfiguration cfg = new CorsConfiguration();
cfg.setAllowedOrigins(Arrays.asList(
"http://localhost:3000", // local dev
"http://localhost:3001",
"https://localhost:3000", // local https dev (if used)
"https://battl.builders",
"http://bb-web-app:3001",
"http://bb-web-app:3000")); // production frontend));
"http://bb-web-app:3000",
"http://bb-web-app"
)); // production frontend));
cfg.setAllowedMethods(List.of("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"));
cfg.setAllowedHeaders(List.of("Authorization", "Content-Type"));
cfg.setExposedHeaders(List.of("Authorization"));