Update backend and frontend service ports to 12015 and 12016; adjust healthcheck and environment variables accordingly
This commit is contained in:
@@ -14,7 +14,7 @@ A multi-modal AI web application. Users can choose between different AI models f
|
|||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- Python 3.11+
|
- Python 3.12+
|
||||||
- An [openrouter.ai](https://openrouter.ai) API key
|
- An [openrouter.ai](https://openrouter.ai) API key
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
@@ -42,14 +42,14 @@ cp .env.example .env
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd backend
|
cd backend
|
||||||
uvicorn app.main:app --reload --port 12000
|
uvicorn app.main:app --reload --port 12015
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running the frontend
|
### Running the frontend
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd frontend
|
cd frontend
|
||||||
flask --app app.main run --port 12001
|
flask --app app.main run --port 12016
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running tests
|
### Running tests
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "-f", "http://localhost:12000/health" ]
|
test: [ "CMD", "curl", "-f", "http://localhost:12015/health" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 5s
|
start_period: 5s
|
||||||
expose:
|
expose:
|
||||||
- "12000"
|
- "12015"
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
@@ -28,14 +28,14 @@ services:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
environment:
|
environment:
|
||||||
- FLASK_SECRET_KEY=${FLASK_SECRET_KEY}
|
- FLASK_SECRET_KEY=${FLASK_SECRET_KEY}
|
||||||
- BACKEND_URL=${BACKEND_URL:-http://backend:12000}
|
- BACKEND_URL=${BACKEND_URL:-http://backend:12015}
|
||||||
depends_on:
|
depends_on:
|
||||||
backend:
|
backend:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
expose:
|
expose:
|
||||||
- "12001"
|
- "12016"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
app-network:
|
app-network:
|
||||||
|
|||||||
+5
-5
@@ -5,19 +5,19 @@ services:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: ai-backend
|
container_name: ai-backend
|
||||||
ports:
|
ports:
|
||||||
- "12000:12000"
|
- "12015:12015"
|
||||||
environment:
|
environment:
|
||||||
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
|
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
|
||||||
- JWT_SECRET=${JWT_SECRET}
|
- JWT_SECRET=${JWT_SECRET}
|
||||||
- APP_URL=${APP_URL:-http://localhost}
|
- APP_URL=${APP_URL:-http://localhost}
|
||||||
- APP_NAME=${APP_NAME:-AI Allucanget}
|
- APP_NAME=${APP_NAME:-AI Allucanget}
|
||||||
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:12001}
|
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:12016}
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/app/data
|
- ./data:/app/data
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "-f", "http://localhost:12000/health" ]
|
test: [ "CMD", "curl", "-f", "http://localhost:12015/health" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
@@ -29,10 +29,10 @@ services:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: ai-frontend
|
container_name: ai-frontend
|
||||||
ports:
|
ports:
|
||||||
- "12001:12001"
|
- "12016:12016"
|
||||||
environment:
|
environment:
|
||||||
- FLASK_SECRET_KEY=${FLASK_SECRET_KEY}
|
- FLASK_SECRET_KEY=${FLASK_SECRET_KEY}
|
||||||
- BACKEND_URL=${BACKEND_URL:-http://backend:12000}
|
- BACKEND_URL=${BACKEND_URL:-http://backend:12015}
|
||||||
depends_on:
|
depends_on:
|
||||||
backend:
|
backend:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|||||||
Reference in New Issue
Block a user