-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (100 loc) · 2.6 KB
/
docker-compose.yml
File metadata and controls
106 lines (100 loc) · 2.6 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
# Docker Compose for local development
# Usage:
# docker compose up # Start MinIO + TypeScript API + Frontend
# docker compose --profile python up # Start with Python API instead
services:
# MinIO object storage
minio:
image: minio/minio:latest
ports:
- "9000:9000" # API
- "9001:9001" # Console
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
# Create default bucket on startup
minio-init:
image: minio/mc:latest
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 minioadmin minioadmin;
mc mb local/thumbnails --ignore-existing;
mc anonymous set public local/thumbnails;
exit 0;
"
# TypeScript API (default)
api-ts:
build:
context: .
dockerfile: docker/api-ts.Dockerfile
ports:
- "8080:8080"
environment:
PORT: 8080
LOCAL_MODE: "true"
MINIO_ENDPOINT: http://minio:9000
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
MINIO_BUCKET: thumbnails
MINIO_PUBLIC_BASE_URL: http://localhost:9000
env_file:
- .env.local
depends_on:
minio-init:
condition: service_completed_successfully
volumes:
- ./typescript:/app/typescript
- ./shared:/app/shared
- /app/typescript/api-ts/node_modules
- /app/typescript/workflow-ts/node_modules
# Python API (optional, use --profile python)
api-python:
profiles: ["python"]
build:
context: .
dockerfile: docker/api-python.Dockerfile
ports:
- "8080:8000"
environment:
PORT: 8000
LOCAL_MODE: "true"
MINIO_ENDPOINT: http://minio:9000
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
MINIO_BUCKET: thumbnails
MINIO_PUBLIC_BASE_URL: http://localhost:9000
env_file:
- .env.local
depends_on:
minio-init:
condition: service_completed_successfully
volumes:
- ./python:/app/python
- ./shared:/app/shared
# Frontend (Vite dev server)
frontend:
build:
context: .
dockerfile: docker/frontend.Dockerfile
ports:
- "5173:5173"
environment:
VITE_API_HOST: http://localhost:8080
volumes:
- ./frontend:/app/frontend
- /app/frontend/node_modules
depends_on:
- api-ts
volumes:
minio-data: