updated tag format, nginx Dockerfile

This commit is contained in:
Josh 2025-08-01 12:11:26 +00:00
parent c2ca91012e
commit 7a425a955b
3 changed files with 7 additions and 7 deletions

2
.env
View File

@ -2,4 +2,4 @@ CORS_ALLOWED_ORIGINS=https://dev1.aptivaai.com,http://34.16.120.118:3000,http://
SERVER1_PORT=5000 SERVER1_PORT=5000
SERVER2_PORT=5001 SERVER2_PORT=5001
SERVER3_PORT=5002 SERVER3_PORT=5002
IMG_TAG=202508011133 IMG_TAG=202508011207

View File

@ -1,10 +1,10 @@
FROM nginx:1.25-alpine FROM nginx:1.25-alpine
# Remove default config if needed # Remove default config
RUN rm /etc/nginx/conf.d/default.conf RUN rm /etc/nginx/nginx.conf
# Copy custom config (optional) # Replace with staging config
COPY nginx.conf /etc/nginx/conf.d/default.conf 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 COPY build/ /usr/share/nginx/html

View File

@ -25,7 +25,7 @@ npm run build
# ───────────────────────────────────────────────────────────── # ─────────────────────────────────────────────────────────────
# 1. Build → Push → Stamp .env # 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})" echo "🔨 Building & pushing containers (tag = ${TAG})"
for svc in server1 server2 server3 nginx; do for svc in server1 server2 server3 nginx; do