deployment_files

This commit is contained in:
2026-09-19 04:00:30 +00:00
parent 8a00692902
commit 19343de141
6 changed files with 169 additions and 10 deletions
@@ -0,0 +1,34 @@
#!/bin/bash
PRJ_NAME=test19sepflutter001-myfrontend-f
DOCKER_USER=risadmin_prod
DOCKER_PASS=adminprod1234
DOCKER_URL=157.66.191.31:3000
#********************
REPO_NAME=test19sepflutter001
GITEA_USER=risadmin_prod
GITEA_PASS=adminprod1234
GITEA_EMAIL=ganeshk@dekatc.com
GIT_BRANCH=main
DOMAIN=157.66.191.31:3000
#TARGET_PORT=9292
PATH_DIR=/data/66316_1789790270148/sureops/test19sepflutter001-myfrontend-f/deployment
#**********************
cd $PATH_DIR
DOCKER_TAG=1.0
docker system prune -f
IMAGE_NAME=$DOCKER_USER/$PRJ_NAME:$DOCKER_TAG
# Stop any existing containers with the same name and ports
docker stop $PRJ_NAME >/dev/null 2>&1 || true
docker rm $PRJ_NAME >/dev/null 2>&1 || true
# Build and push the Docker image
DOCKER_BUILDKIT=1 docker build -t $DOCKER_URL/$DOCKER_USER/$PRJ_NAME:$DOCKER_TAG --build-arg BUILD_ID=$DOCKER_TAG --build-arg CACHEBUST=$(date +%s) --build-arg GITEA_PASS=$GITEA_PASS .
docker login --username=$DOCKER_USER --password=$DOCKER_PASS $DOCKER_URL
docker tag $DOCKER_URL/$DOCKER_USER/$PRJ_NAME:$DOCKER_TAG $DOCKER_URL/$DOCKER_USER/$PRJ_NAME
docker push $DOCKER_URL/$DOCKER_USER/$PRJ_NAME
docker push $DOCKER_URL/$DOCKER_USER/$PRJ_NAME:$DOCKER_TAG
docker logout $DOCKER_URL
docker system prune -f
# Deploy the image in a Docker container
echo "Image deployed in container $PRJ_NAME"
curl -X GET "http://157.66.191.31:31123/sureops/suredocker/updaterepo?repoName=$REPO_NAME&packageName=$PRJ_NAME"