-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (47 loc) · 1.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (47 loc) · 1.2 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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: script_status
POSTGRES_USER: script_status
POSTGRES_PASSWORD: script_status
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U script_status -d script_status"]
interval: 5s
timeout: 5s
retries: 10
backend:
build:
context: ./backend
environment:
DATABASE_URL: postgresql+psycopg://script_status:script_status@db:5432/script_status
CORS_ORIGINS: '["http://localhost:5173","http://localhost:8080"]'
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
volumes:
- ./backend/app:/app/app
- ./backend/alembic:/app/alembic
- ./backend/alembic.ini:/app/alembic.ini
frontend:
image: node:22-alpine
working_dir: /app
command: sh -c "npm install && npm run dev"
environment:
VITE_API_BASE_URL: http://localhost:8000
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
depends_on:
- backend
volumes:
postgres_data:
frontend_node_modules: