Rename /deploy to /tensors:deploy and rewrite in Ruby
Move deploy command to tensors namespace and replace bash script with Ruby for better error handling. Adds API health check after restart. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# Deploy Tensors to Junkpile
|
||||
|
||||
Deploy tensors API server to junkpile.
|
||||
|
||||
Run the deploy script:
|
||||
|
||||
```bash
|
||||
ruby scripts/deploy.rb
|
||||
```
|
||||
|
||||
## What it does
|
||||
|
||||
1. **Sync code** - Rsyncs Python code to `/opt/tensors/app/`
|
||||
2. **Fix permissions** - Sets ownership to `tensors:tensors`
|
||||
3. **Restart tensors** - Runs `sudo systemctl restart tensors`
|
||||
4. **Verify tensors** - Checks service is running
|
||||
5. **Health check** - Verifies API responds
|
||||
|
||||
## Service Structure
|
||||
|
||||
| Item | Value |
|
||||
|------|-------|
|
||||
| User/Group | `tensors:tensors` |
|
||||
| Install path | `/opt/tensors/app` |
|
||||
| Venv | `/opt/tensors/venv` |
|
||||
| Service | `tensors.service` |
|
||||
| Port | 51200 |
|
||||
|
||||
## API Endpoints
|
||||
|
||||
- `GET /status` - Health check
|
||||
- `GET /api/civitai/*` - CivitAI search and fetch
|
||||
- `GET /api/db/*` - Database management
|
||||
- `GET /api/images/*` - Image gallery
|
||||
- `POST /api/download` - Download models
|
||||
Reference in New Issue
Block a user