61 lines
1.3 KiB
Markdown
61 lines
1.3 KiB
Markdown
|
|
# Run All Deployment Steps
|
||
|
|
|
||
|
|
## Quick Command
|
||
|
|
|
||
|
|
Run this single command to complete all deployment steps:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd explorer-monorepo
|
||
|
|
bash scripts/run-all-deployment.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
## What It Does
|
||
|
|
|
||
|
|
1. ✅ Tests database connection with `explorer` user
|
||
|
|
2. ✅ Checks for existing tables
|
||
|
|
3. ✅ Runs migration if needed
|
||
|
|
4. ✅ Stops existing server
|
||
|
|
5. ✅ Starts server with database connection
|
||
|
|
6. ✅ Tests all endpoints
|
||
|
|
7. ✅ Provides summary and next steps
|
||
|
|
|
||
|
|
## Manual Steps (if script fails)
|
||
|
|
|
||
|
|
### 1. Test Database
|
||
|
|
```bash
|
||
|
|
PGPASSWORD='L@ker$2010' psql -h localhost -U explorer -d explorer -c "SELECT 1;"
|
||
|
|
```
|
||
|
|
|
||
|
|
### 2. Run Migration
|
||
|
|
```bash
|
||
|
|
cd explorer-monorepo
|
||
|
|
PGPASSWORD='L@ker$2010' psql -h localhost -U explorer -d explorer \
|
||
|
|
-f backend/database/migrations/0010_track_schema.up.sql
|
||
|
|
```
|
||
|
|
|
||
|
|
### 3. Restart Server
|
||
|
|
```bash
|
||
|
|
pkill -f api-server
|
||
|
|
cd explorer-monorepo/backend
|
||
|
|
export DB_PASSWORD='L@ker$2010'
|
||
|
|
export JWT_SECRET='your-secret-here'
|
||
|
|
./bin/api-server
|
||
|
|
```
|
||
|
|
|
||
|
|
### 4. Test
|
||
|
|
```bash
|
||
|
|
curl http://localhost:8080/health
|
||
|
|
curl http://localhost:8080/api/v1/features
|
||
|
|
```
|
||
|
|
|
||
|
|
## Expected Results
|
||
|
|
|
||
|
|
- ✅ Database connected
|
||
|
|
- ✅ Tables created
|
||
|
|
- ✅ Server running on port 8080
|
||
|
|
- ✅ All endpoints responding
|
||
|
|
- ✅ Health shows database as "ok"
|
||
|
|
|
||
|
|
See `DEPLOYMENT_FINAL_STATUS.md` for complete status.
|
||
|
|
|