generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
dev-env.yaml
52 lines (52 loc) · 1.33 KB
/
dev-env.yaml
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
services:
ocr:
build:
context: ./OCR
dockerfile: dev-dockerfile
ports:
- "8000:8000"
volumes:
- ./OCR:/ocr
restart: "no"
command: "/bin/sh -c 'poetry install --without=torch --sync && poetry run fastapi dev ocr/api.py --host 0.0.0.0 --port 8000'"
frontend:
build:
context: ./frontend
dockerfile: dev-dockerfile
ports:
- "5173:5173"
- "8080:8080"
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- api
- ocr
restart: "no"
command: "/bin/sh -c 'npm install && npx playwright install && npx playwright test --ui-port=8080 --ui-host=0.0.0.0 & npm run dev -- --host'"
db:
image: postgres:alpine
restart: "unless-stopped"
shm_size: 128mb
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${postgres_db_name:-reportvision}
POSTGRES_HOST: ${postgres_fqdn:-localhost}
POSTGRES_USER: ${postgres_user:-postgres}
POSTGRES_PASSWORD: ${postgres_password:-super_secret_password}
DB_PORT: ${postgres_port:-5432}
SSL_MODE: ${postgres_sslmode:-disable}
api:
build:
context: ./backend
dockerfile: dev-dockerfile
environment:
- DB_HOST=db
ports:
- "8081:8081"
volumes:
- ./backend:/app
restart: "unless-stopped"
depends_on:
- db