Portal/scripts/prod/UpdateProd.sh
IRBorisov 2759f10d09
Some checks failed
Backend CI / build (3.12) (push) Has been cancelled
Frontend CI / build (18.x) (push) Has been cancelled
Initial commit
2024-06-07 20:17:03 +03:00

15 lines
402 B
Bash

COMPOSE_FILE="docker-compose-prod.yml"
BACKUP_SCRIPT="./scripts/prod/CreateBackup.sh"
git fetch --all
git reset --hard origin/main
/bin/bash "${BACKUP_SCRIPT}"
docker compose --file "${COMPOSE_FILE}" up --build --detach
# Use this to prune caches
# docker system prune -a -f
# Use this command to restart containers if something went wrong
# docker compose --file "docker-compose-prod.yml" restart