diff --git a/.env b/.env index 5bcef66..83eade4 100644 --- a/.env +++ b/.env @@ -2,4 +2,4 @@ CORS_ALLOWED_ORIGINS=https://dev1.aptivaai.com,http://34.16.120.118:3000,http:// SERVER1_PORT=5000 SERVER2_PORT=5001 SERVER3_PORT=5002 -IMG_TAG=202508011133 \ No newline at end of file +IMG_TAG=202508011207 \ No newline at end of file diff --git a/Dockerfile.nginx b/Dockerfile.nginx index 46553f2..057db9a 100644 --- a/Dockerfile.nginx +++ b/Dockerfile.nginx @@ -1,10 +1,10 @@ FROM nginx:1.25-alpine -# Remove default config if needed -RUN rm /etc/nginx/conf.d/default.conf +# Remove default config +RUN rm /etc/nginx/nginx.conf -# Copy custom config (optional) -COPY nginx.conf /etc/nginx/conf.d/default.conf +# Replace with staging config +COPY nginx.conf /etc/nginx/nginx.conf -# Copy React build output +# Copy React build output into staging app's build folder COPY build/ /usr/share/nginx/html diff --git a/deploy_all.sh b/deploy_all.sh index 99e9f09..699c9fd 100755 --- a/deploy_all.sh +++ b/deploy_all.sh @@ -25,7 +25,7 @@ npm run build # ───────────────────────────────────────────────────────────── # 1. Build → Push → Stamp .env # ───────────────────────────────────────────────────────────── -TAG=$(date -u +%Y%m%d%H%M) +TAG="$(git rev-parse --short HEAD)-$(date -u +%Y%m%d%H%M)" echo "🔨 Building & pushing containers (tag = ${TAG})" for svc in server1 server2 server3 nginx; do