-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
111 lines (105 loc) · 2.98 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
111 lines (105 loc) · 2.98 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
# This
services:
backend:
build:
context: .
dockerfile: backend/Dockerfile.dev
ports:
- "8000:8000"
volumes:
- ./backend/app:/backend/app # bind mount — edits reflect immediately
- ./backend/app/data:/backend/app/data
- ./backend/alembic.ini:/backend/alembic.ini
- ./backend/alembic:/backend/alembic
environment:
- ENVIRONMENT=development
- JWT_SECRET=dev-only-change-me
- GITHUB_REDIRECT=http://localhost:5173/login/callback
- AUTH_DEV_MODE_APPROVE_ALL_LOGINS=true
- COOKIE_SECURE=false
- STORAGE_BACKEND=s3
- S3_BUCKET=openml-upload-local
- S3_REGION=eu-west-1
- S3_ENDPOINT=http://minio:9000
- S3_PUBLIC_ENDPOINT=http://localhost:9000
- S3_ACCESS_KEY=minioadmin
- S3_SECRET_KEY=minioadmin123
- S3_FORCE_PATH_STYLE=true
- QUARANTINE_DIR=/backend/app/data/quarantine
- CORS_ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173
- CLAMD_HOST=clamd
- CLAMD_PORT=3310
- CLAMD_TIMEOUT_SECONDS=60
depends_on:
clamd:
condition: service_healthy
minio-init:
condition: service_completed_successfully
command:
- /bin/sh
- -c
- |
set -e
alembic upgrade head
exec uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
networks:
- app-network
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
ports:
- "5173:5173"
- "24678:24678" # Vite HMR websocket port
volumes:
- ./frontend:/app # bind mount source code
- frontend-node-modules:/app/node_modules # isolate node_modules
environment:
- VITE_API_BASE_URL=http://localhost:8000/api
networks:
- app-network
clamd:
image: clamav/clamav-debian:stable
restart: unless-stopped
volumes:
- ./backend/app/data:/backend/app/data:ro
networks:
- app-network
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin123
- MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:5173,http://127.0.0.1:5173
volumes:
- minio-data:/data
networks:
- app-network
minio-init:
image: minio/mc:latest
depends_on:
- minio
volumes:
- ./infra/minio:/etc/minio:ro
entrypoint: >
/bin/sh -c "
set -eu;
until mc alias set local http://minio:9000 minioadmin minioadmin123; do
sleep 2;
done;
mc mb --ignore-existing local/openml-upload-local;
mc anonymous set none local/openml-upload-local;
mc ilm import local/openml-upload-local < /etc/minio/lifecycle.json;
"
networks:
- app-network
volumes:
frontend-node-modules: # named volume prevents host/container conflicts
minio-data: # local S3-compatible object storage
networks:
app-network:
driver: bridge