-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: '3.8'
services:
api:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: intellitag-api
ports:
- "${API_PORT:-8000}:8000"
environment:
- APP_ENV=${APP_ENV:-production}
- APP_NAME=${APP_NAME:-intellitag}
- DEBUG=${DEBUG:-false}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- API_HOST=0.0.0.0
- API_PORT=8000
- DEFAULT_MODEL=${DEFAULT_MODEL:-bow}
- PREDICTION_THRESHOLD=${PREDICTION_THRESHOLD:-0.3}
- TOP_K_PREDICTIONS=${TOP_K_PREDICTIONS:-5}
volumes:
# Mount data and models directories
- ./data:/app/data:ro
- ./models:/app/models:ro
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
# Development service with hot reload
api-dev:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: intellitag-api-dev
ports:
- "${API_PORT:-8000}:8000"
environment:
- APP_ENV=development
- DEBUG=true
- LOG_LEVEL=DEBUG
volumes:
- ./src:/app/src:ro
- ./data:/app/data:ro
- ./models:/app/models:ro
command: uvicorn intellitag.api.app:app --host 0.0.0.0 --port 8000 --reload
profiles:
- dev
networks:
default:
name: intellitag-network