-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (66 loc) · 2.55 KB
/
docker-compose.yml
File metadata and controls
73 lines (66 loc) · 2.55 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: '3.8'
networks:
default:
name: classifai-network
services:
postgres:
image: postgres:16-alpine
container_name: classifai-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-classifai}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-classifai_password}
POSTGRES_DB: ${POSTGRES_DB:-classifai}
volumes:
- postgres_data:/var/lib/postgresql/data
# Port mapping removed for Coolify compatibility - PostgreSQL is only accessible internally
# Uncomment the next 2 lines for local development if you need direct database access
# ports:
# - "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-classifai}"]
interval: 10s
timeout: 5s
retries: 5
app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
# Port mapping removed for Coolify compatibility - Coolify manages ports externally
# Uncomment the next 2 lines for local development if you need direct access
# ports:
# - "3000:3000"
depends_on:
postgres:
condition: service_healthy
environment:
# Database
DATABASE_URL: postgresql://${POSTGRES_USER:-classifai}:${POSTGRES_PASSWORD:-classifai_password}@postgres:5432/${POSTGRES_DB:-classifai}?schema=public
# NextAuth
AUTH_URL: ${AUTH_URL:-http://localhost:3000}
AUTH_TRUST_HOST: ${AUTH_TRUST_HOST:-true}
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
# Default Admin User
DEFAULT_ADMIN_EMAIL: ${DEFAULT_ADMIN_EMAIL:-admin@example.com}
DEFAULT_ADMIN_PASSWORD: ${DEFAULT_ADMIN_PASSWORD:-ChangeMe123!}
DEFAULT_ADMIN_NAME: ${DEFAULT_ADMIN_NAME:-Admin User}
# AI Labeling (Optional)
AI_LABELING_API_URL: ${AI_LABELING_API_URL}
AI_LABELING_API_KEY: ${AI_LABELING_API_KEY}
AI_LABELING_BATCH_SIZE: ${AI_LABELING_BATCH_SIZE:-100}
AI_LEARNING_BATCH_SIZE: ${AI_LEARNING_BATCH_SIZE:-100}
AI_LEARNING_MIN_NEW_ANNOTATIONS: ${AI_LEARNING_MIN_NEW_ANNOTATIONS:-500}
AI_JOB_POLL_INTERVAL_MS: ${AI_JOB_POLL_INTERVAL_MS:-5000}
AI_JOB_POLL_TIMEOUT_MS: ${AI_JOB_POLL_TIMEOUT_MS:-600000}
AI_SOURCE_SLUG: ${AI_SOURCE_SLUG:-}
command: sh -c "npx prisma migrate deploy && node scripts/init-admin.js && node server.js"
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
postgres_data: