commit doble databse

This commit is contained in:
2025-05-28 08:10:10 +07:00
parent 1ead64f86e
commit 158b612993
33 changed files with 408 additions and 4454 deletions

27
docker-push.sh Normal file
View File

@@ -0,0 +1,27 @@
!/bin/bash
#get image name
remote_url=$(git remote get-url origin)
image=$(echo $remote_url | sed 's|https://||g; s|.git||g')
#get branch name
branch_name=$(git rev-parse --abbrev-ref HEAD)
clean_branch_name=${branch_name##*/}
#get timestamp for the tag
timestamp=$(date +%Y%m%d%H%M%S)
tag=$image:$timestamp-$clean_branch_name
latest=$image:latest-$clean_branch_name
#build image
docker build -t $tag .
docker tag $tag $latest
#push to dockerhub
docker login git.rssa.top -u stim -p 4fde63b07906e7bfa6b3493d76d153a3981039b9
docker push $tag
docker push $latest
#remove dangling images
docker system prune -f