-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.3 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
services:
postgres:
image: pgvector/pgvector:pg16
container_name: study_web_postgres
environment:
POSTGRES_USER: study_user
POSTGRES_PASSWORD: study_password
POSTGRES_DB: study_web_db
ports:
- "5434:5432"
volumes:
- study_web_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U study_user -d study_web_db"]
interval: 5s
timeout: 5s
retries: 10
backend:
build:
context: .
dockerfile: back/Dockerfile
container_name: study_web_backend
environment:
DATABASE_URL: postgresql://study_user:study_password@postgres:5432/study_web_db
ports:
- "8000:8000"
volumes:
- ./back:/app
depends_on:
postgres:
condition: service_healthy
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
frontend:
build:
context: .
dockerfile: front/Dockerfile
container_name: study_web_frontend
environment:
VITE_API_BASE_URL: http://localhost:8000
ports:
- "5173:5173"
volumes:
- ./front:/app
- study_web_frontend_node_modules:/app/node_modules
depends_on:
- backend
command: npm run dev -- --host 0.0.0.0 --port 5173
volumes:
study_web_postgres_data:
study_web_frontend_node_modules: