Update service ports to 12015 for backend and 12016 for frontend; adjust configurations and documentation accordingly

This commit is contained in:
2026-04-29 11:52:12 +02:00
parent d484721a94
commit abd61798c7
11 changed files with 59 additions and 57 deletions
+12 -12
View File
@@ -44,9 +44,9 @@ docker compose up --build
```
4. **Access the application**:
- Frontend UI: http://localhost:12001
- Backend API: http://localhost:12000
- API Health: http://localhost:12000/health
- Frontend UI: http://localhost:12016
- Backend API: http://localhost:12015
- API Health: http://localhost:12015/health
- Nginx Proxy: http://localhost:80 (routes to frontend) or http://localhost:80/api (routes to backend)
5. **View logs**:
@@ -77,8 +77,8 @@ The `.env` file in the project root is automatically loaded by Docker Compose. R
| `OPENROUTER_API_KEY` | API key for AI generation | `sk-or-v1-...` |
| `JWT_SECRET` | Secret for JWT token signing | (random hex string) |
| `FLASK_SECRET_KEY` | Secret for Flask session cookies | (random hex string) |
| `BACKEND_URL` | Internal URL for frontend to reach backend | `http://backend:12000` (Docker) or `http://localhost:12000` (local dev) |
| `CORS_ORIGINS` | Allowed CORS origins for backend | `http://localhost:12001` (local) or `https://ai.allucanget.biz` (production) |
| `BACKEND_URL` | Internal URL for frontend to reach backend | `http://backend:12015` (Docker) or `http://localhost:12015` (local dev) |
| `CORS_ORIGINS` | Allowed CORS origins for backend | `http://localhost:12016` (local) or `https://ai.allucanget.biz` (production) |
| `APP_URL` | Public URL of the backend | `http://localhost` or `https://ai.allucanget.biz` |
| `APP_NAME` | Application name | `AI Allucanget` |
@@ -97,7 +97,7 @@ The `docker-compose.yml` defines the following volume:
│ │
│ ┌──────────────────┐ ┌──────────────────────────┐ │
│ │ Frontend │ │ Backend │ │
│ │ Port 12001 │ │ Port 12000 │ │
│ │ Port 12016 │ │ Port 12015 │ │
│ │ Flask + Gunicorn│◄──►│ FastAPI + Uvicorn │ │
│ │ (Service name: │ │ (Service name: backend) │ │
│ │ frontend) │ │ │ │
@@ -128,8 +128,8 @@ Output example:
```
NAME COMMAND SERVICE STATUS PORTS
ai-backend "uvicorn app.main:a…" backend Up 2m 0.0.0.0:12000->12000/tcp
ai-frontend "gunicorn app.main:…" frontend Up 2m 0.0.0.0:12001->12001/tcp
ai-backend "uvicorn app.main:a…" backend Up 2m 0.0.0.0:12015->12015/tcp
ai-frontend "gunicorn app.main:…" frontend Up 2m 0.0.0.0:12016->12016/tcp
ai-nginx "nginx -g daemon of…" nginx Up 2m 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp
```
@@ -191,7 +191,7 @@ docker compose down --rmi all
**Solution**: Start Docker Desktop (Windows/Mac) or start the Docker daemon (Linux).
### "Port 12000 or 12001 already in use"
### "Port 12015 or 12016 already in use"
**Error**: `Error response from daemon: bind: address already in use`
@@ -199,8 +199,8 @@ docker compose down --rmi all
```yaml
ports:
- "13000:12000" # Maps host:13000 to container:12000
- "13001:12001" # Maps host:13001 to container:12001
- "13000:12015" # Maps host:13000 to container:12015
- "13001:12016" # Maps host:13001 to container:12016
```
### Frontend cannot reach backend
@@ -210,7 +210,7 @@ ports:
**Ensure**:
1. Backend service is running: `docker compose ps`
2. `BACKEND_URL` in `.env` is set to `http://backend:12000` (not `localhost`)
2. `BACKEND_URL` in `.env` is set to `http://backend:12015` (not `localhost`)
3. Services are on the same Docker network: `docker compose ps` shows them in the same `docker-compose.yml`
### Database file not persisting