chore: standardize service domains and error logging
Build and Push Docker Images / detect-changes (push) Successful in 15s
Build and Push Docker Images / build-auth-api (push) Successful in 1m2s
Build and Push Docker Images / build-employee-api (push) Successful in 1m2s
Build and Push Docker Images / build-transit-api (push) Successful in 1m2s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m10s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m22s
Build and Push Docker Images / deploy-test-node (push) Successful in 4s

This commit is contained in:
Sven laptop
2026-09-18 19:26:05 +02:00
parent 3f0a02aa04
commit 1154d1d658
21 changed files with 609 additions and 380 deletions
+21 -7
View File
@@ -3,12 +3,14 @@
## 🚀 5-Minute Setup
### Step 1: Initial Setup
```bash
# From the project root
./scripts/init.sh
```
This will:
- Check Docker and Docker Compose installation
- Create `.env` file from template
- Build all Docker images
@@ -17,6 +19,7 @@ This will:
### Step 2: Configure Database Connection
Edit `.env` with your database details:
```env
POSTGRES_HOST=your-db-host.com
POSTGRES_USER_AUTH=transitAUTH
@@ -28,11 +31,13 @@ JWT_SECRET=your-secure-secret
```
### Step 3: Start Services
```bash
./scripts/deploy.sh start
```
### Step 4: Access Admin UI
```
http://localhost:5174
```
@@ -42,29 +47,32 @@ Log in with your real user code and password.
## 📱 Admin UI Features
### Stops Management
- Create new transit stops
- Set geolocation (latitude, longitude)
- View all stops
- Link stops to bus lines
### Bus Lines
- Create new bus routes
- Define start and end stops
- Set estimated travel time
- Assign stops to lines with order
### Fleet
- View fleet vehicles (read-only)
- See vehicle details
## 🐳 Docker Services
| Port | Service | URL |
|------|---------|-----|
| 5174 | Admin UI | http://localhost:5174 |
| 5000 | Auth API | http://localhost:5000 |
| 5001 | Transit API | http://localhost:5001 |
| 4000 | Employee API | http://localhost:4000 |
| Port | Service | URL |
| ---- | ------------ | ---------------------------------------- |
| 5174 | Admin UI | http://localhost:5174 |
| 5000 | Auth API | https://auth.xtransit.testinstance.nl |
| 5001 | Transit API | https://transit.xtransit.testinstance.nl |
| 4000 | Employee API | http://localhost:4000 |
## 🔧 Common Commands
@@ -91,6 +99,7 @@ Log in with your real user code and password.
Use the real login flow with user code and password.
### Production
- Keep `DEV_BYPASS=0` and `DEV_MOCK=0`
- Configure proper admin user codes in `ADMIN_USER_CODES`
- Ensure JWTs include the `userCode` claim
@@ -105,6 +114,7 @@ Use the real login flow with user code and password.
## ⚠️ Troubleshooting
### "Address already in use"
```bash
# Find and stop the process using the port
lsof -i :5174 # Find process on port 5174
@@ -112,6 +122,7 @@ kill -9 <PID> # Kill the process
```
### "Cannot connect to database"
```bash
# Check database credentials in .env
# Verify database is accessible from your machine
@@ -119,6 +130,7 @@ kill -9 <PID> # Kill the process
```
### "Admin UI not loading"
```bash
# Check container is running
docker-compose ps admin_ui
@@ -131,7 +143,9 @@ docker-compose restart admin_ui
```
### "Permission denied" errors
The transit API user needs proper database permissions:
```sql
-- Grant permissions to transitAPI user
GRANT CONNECT ON DATABASE "XTransit" TO transitAPI;
@@ -142,7 +156,7 @@ GRANT SELECT, INSERT, UPDATE ON all tables IN SCHEMA public TO transitAPI;
## 📚 For More Information
- **DEPLOYMENT.md** - Full deployment guide for production
- **DOCKER_README.md** - Docker and container information
- **DOCKER_README.md** - Docker and container information
- **admin_ui/README.md** - Admin UI specific details
## 🎯 Next Steps