ci(deploy): standardize docker compose env file usage across scripts
- Added --env-file .env to all docker compose commands for consistent environment variable loading - Added MISTRAL_API_KEY validation in deploy.sh with fatal error if missing - Added --force-recreate flag to recipe-api restarts in disable/enable receipt trace scripts - Added .env file existence check in rebuild_flutter.sh - Added API service recreation logic in deploy.sh when backend/importer services are updated
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
set -Eeuo pipefail
|
||||
|
||||
APP_DIR="${1:-/opt/containers/recipe-app}"
|
||||
COMPOSE_FILES=(-f compose.yml -f compose.flutter.yml)
|
||||
COMPOSE_FILES=(--env-file .env -f compose.yml -f compose.flutter.yml)
|
||||
SERVICE="recipe-flutter"
|
||||
|
||||
log() { echo "[flutter-rebuild] $*"; }
|
||||
@@ -18,6 +18,8 @@ if [ ! -f "compose.yml" ] || [ ! -f "compose.flutter.yml" ]; then
|
||||
fail "compose.yml eller compose.flutter.yml saknas i $APP_DIR"
|
||||
fi
|
||||
|
||||
[ -f ".env" ] || fail ".env saknas i $APP_DIR"
|
||||
|
||||
log "Bygger om $SERVICE"
|
||||
docker compose "${COMPOSE_FILES[@]}" build "$SERVICE"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user