ci: enhance deployment with file cleanup and forced container recreation
This commit is contained in:
@@ -315,6 +315,9 @@ jobs:
|
|||||||
else
|
else
|
||||||
TARGET_DIR="$VERSIONS_DIR/dev"
|
TARGET_DIR="$VERSIONS_DIR/dev"
|
||||||
echo "🔧 Deploying dev build to: $TARGET_DIR"
|
echo "🔧 Deploying dev build to: $TARGET_DIR"
|
||||||
|
|
||||||
|
echo "Cleaning old dev files..."
|
||||||
|
rm -rf "$TARGET_DIR"/*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create target directory
|
# Create target directory
|
||||||
@@ -347,9 +350,9 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart nginx to pick up new content
|
# Force recreate container to ensure new config/mounts are applied
|
||||||
docker compose -f docker-compose.prod.yml restart fhir-ig || \
|
# This handles "stuck" states better than a simple restart
|
||||||
docker compose -f docker-compose.prod.yml up -d
|
docker compose -f docker-compose.prod.yml up -d --force-recreate fhir-ig
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
rm -rf /tmp/fhir-ig-deploy
|
rm -rf /tmp/fhir-ig-deploy
|
||||||
|
|||||||
Reference in New Issue
Block a user