-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
122 lines (116 loc) · 3.07 KB
/
docker-compose.yml
File metadata and controls
122 lines (116 loc) · 3.07 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
services:
postgres:
image: postgres:16-alpine
container_name: sourceful-postgres
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=postgres
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- sourceful-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
pgadmin:
image: dpage/pgadmin4:latest
container_name: sourceful-pgadmin
ports:
- "5050:80"
environment:
- PGADMIN_DEFAULT_EMAIL=admin@admin.com
- PGADMIN_DEFAULT_PASSWORD=admin
- PGADMIN_SERVER_JSON_FILE=/pgadmin4/servers.json
volumes:
- pgadmin_data:/var/lib/pgadmin
- ./pgadmin/servers.json:/pgadmin4/servers.json:ro
networks:
- sourceful-network
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: sourceful-backend
ports:
- "8000:8000"
- "5678:5678" # Debug port
volumes:
- ./backend:/app
- /app/venv
environment:
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@postgres:5432/postgres
- VISION_PROVIDER=${VISION_PROVIDER:-openrouter}
- VISION_MODEL=${VISION_MODEL:-}
- VISION_TIMEOUT=${VISION_TIMEOUT:-30.0}
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
- OPENROUTER_SITE_URL=${OPENROUTER_SITE_URL:-http://localhost:8000}
- OPENROUTER_SITE_NAME=${OPENROUTER_SITE_NAME:-Image Classification API}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- MINIO_ENDPOINT=minio:9000
- MINIO_ACCESS_KEY=minioadmin
- MINIO_SECRET_KEY=minioadmin
- MINIO_BUCKET=generated-images
- MINIO_PUBLIC_URL=http://localhost:9000
networks:
- sourceful-network
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
minio:
image: minio/minio:latest
container_name: sourceful-minio
ports:
- "9000:9000" # API
- "9001:9001" # Console
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- minio_data:/data
command: server /data --console-address ":9001"
networks:
- sourceful-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: sourceful-frontend
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
environment:
- NODE_ENV=development
- NEXT_PUBLIC_API_URL=http://backend:8000
- WATCHPACK_POLLING=true
depends_on:
- backend
networks:
- sourceful-network
restart: unless-stopped
networks:
sourceful-network:
driver: bridge
volumes:
postgres_data:
pgadmin_data:
minio_data: