2026-02-24 20:44:16 +00:00
|
|
|
|
export ENV=${1:-dev}
|
|
|
|
|
|
echo "Env değeri: ${ENV}"
|
|
|
|
|
|
|
|
|
|
|
|
cd ~/sozsoft-platform/configs/deployment
|
|
|
|
|
|
docker compose -f docker-compose-app.yml -f docker-compose-app.${ENV}.yml --profile api stop
|
|
|
|
|
|
docker compose -f docker-compose-app.yml -f docker-compose-app.${ENV}.yml --profile api rm -f
|
|
|
|
|
|
|
|
|
|
|
|
docker compose -f docker-compose-app.yml -f docker-compose-app.${ENV}.yml --profile ui stop
|
|
|
|
|
|
docker compose -f docker-compose-app.yml -f docker-compose-app.${ENV}.yml --profile ui rm -f
|
|
|
|
|
|
|
|
|
|
|
|
cd ~/sozsoft-platform
|
|
|
|
|
|
git checkout main
|
2026-08-15 06:30:36 +00:00
|
|
|
|
# --tags --force: sürüm notları git tag'lerinden üretiliyor; yerel tag origin'den
|
|
|
|
|
|
# farklı commit'e bakıyorsa --force olmadan reddedilir ve yeni tag'ler gelmez.
|
|
|
|
|
|
git fetch --prune --prune-tags --tags --force && git pull
|
|
|
|
|
|
|
|
|
|
|
|
# Sürüm notları imaja gömülü değil; konteynere configs/release-notes klasöründen
|
|
|
|
|
|
# mount ediliyor ve API açılışta veritabanına senkronize ediyor (DbMigrator
|
|
|
|
|
|
# gerekmez). `bash ...` ile çağrılır: depo Windows'tan yönetildiği için
|
|
|
|
|
|
# çalıştırma biti kaybolunca "Permission denied" verip notları sessizce düşürüyordu.
|
|
|
|
|
|
RELEASE_NOTES=~/sozsoft-platform/configs/release-notes/release-notes.json
|
|
|
|
|
|
bash ~/sozsoft-platform/configs/release-notes/generate-release-notes.sh
|
|
|
|
|
|
|
|
|
|
|
|
# Dosya yoksa API açılışta "release-notes.json bulunamadı" uyarısı verir ve
|
|
|
|
|
|
# changelog eskir; sessizce devam etmek yerine burada dur.
|
|
|
|
|
|
if [ ! -s "$RELEASE_NOTES" ]; then
|
|
|
|
|
|
echo "HATA: ${RELEASE_NOTES} üretilemedi, deploy durduruldu." >&2
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
fi
|
2026-02-24 20:44:16 +00:00
|
|
|
|
|
|
|
|
|
|
cd ~/sozsoft-platform/configs/deployment
|
|
|
|
|
|
docker compose -f docker-compose-app.yml -f docker-compose-app.${ENV}.yml --profile api pull
|
|
|
|
|
|
docker compose -f docker-compose-app.yml -f docker-compose-app.${ENV}.yml --profile api up -d
|
|
|
|
|
|
|
|
|
|
|
|
# API_URL="https://api.sozsoft.com/api/app/platform-tenant?skipCount=0&maxResultCount=1"
|
|
|
|
|
|
|
|
|
|
|
|
# echo "sozsoft-api açılması bekleniyor: $API_URL"
|
|
|
|
|
|
# until curl -fsS --max-time 5 -o /dev/null "$API_URL"; do
|
|
|
|
|
|
# sleep 2
|
|
|
|
|
|
# done
|
|
|
|
|
|
|
|
|
|
|
|
docker compose -f docker-compose-app.yml -f docker-compose-app.${ENV}.yml --profile ui pull
|
|
|
|
|
|
docker compose -f docker-compose-app.yml -f docker-compose-app.${ENV}.yml --profile ui up -d
|