updated tag format, nginx Dockerfile
This commit is contained in:
parent
c2ca91012e
commit
7a425a955b
2
.env
2
.env
@ -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
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user