Aggiunge Garage al compose di produzione e script di bootstrap.
Rails e Sidekiq usano S3 interno (http://garage:3900); setup_garage_production.sh configura bucket, chiavi e infra/.env sul server. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
24
infra/scripts/setup_garage_production.sh
Executable file
24
infra/scripts/setup_garage_production.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# Garage replay storage su server produzione (/opt/matchlivetv/infra)
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
export COMPOSE_FILE="docker-compose.prod.yml"
|
||||
export ENV_FILE="${ROOT}/.env"
|
||||
export CREDS_FILE="${ROOT}/garage/prod-credentials.env"
|
||||
|
||||
bash "${ROOT}/scripts/ensure_garage_prod_config.sh"
|
||||
|
||||
echo "Avvio Garage..."
|
||||
docker compose -f docker-compose.prod.yml --env-file .env up -d garage
|
||||
|
||||
bash "${ROOT}/scripts/setup_garage_replays.sh"
|
||||
|
||||
echo "Riavvio Rails e Sidekiq..."
|
||||
docker compose -f docker-compose.prod.yml --env-file .env up -d rails sidekiq
|
||||
|
||||
echo "Verifica storage:"
|
||||
docker compose -f docker-compose.prod.yml --env-file .env exec -T rails bundle exec rails runner \
|
||||
'puts({local: MatchLiveTv.replay_storage_local?, backend: Recordings::Storage.new.backend_name}.inspect)'
|
||||
Reference in New Issue
Block a user