14 lines
237 B
Bash
14 lines
237 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
REPO_DIR=${REPO_DIR:-/opt/query-database}
|
|
BRANCH=${BRANCH:-main}
|
|
|
|
cd "$REPO_DIR"
|
|
|
|
git fetch --all --prune
|
|
git reset --hard "origin/$BRANCH"
|
|
|
|
docker compose -f docker-compose.prod.yml up -d --build
|
|
|