-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (54 loc) · 1.29 KB
/
docker-compose.yml
File metadata and controls
58 lines (54 loc) · 1.29 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
services:
api:
build: .
container_name: quant_api
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/quant_backtester
volumes:
- ./src:/app/src # Sync code for hot reloading
dns:
- 8.8.8.8
- 8.8.4.4
frontend:
image: node:20-alpine
container_name: quant_frontend
working_dir: /app
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
command: sh -c "npm install && npm run dev"
environment:
- VITE_API_URL=http://localhost:8000
db:
image: postgres:15-alpine
container_name: quant_db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: quant_backtester
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d quant_backtester"]
interval: 5s
timeout: 5s
retries: 10
# Optional: Adminer for a simple web UI to see the data
adminer:
image: adminer
container_name: quant_adminer
restart: always
ports:
- "8080:8080"
volumes:
postgres_data:
frontend_node_modules: