-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (68 loc) · 1.54 KB
/
docker-compose.yml
File metadata and controls
73 lines (68 loc) · 1.54 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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: agri_demo
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- pg_data:/var/lib/postgresql/data
- ./infra/postgres/init:/docker-entrypoint-initdb.d
ports:
- '5432:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres -d agri_demo']
interval: 5s
timeout: 5s
retries: 10
backend:
build:
context: .
dockerfile: backend/Dockerfile
environment:
PORT: 3000
DATABASE_URL: postgresql://postgres:postgres@db:5432/agri_demo
ENABLE_TEST_RESET: 'true'
SEED_ON_STARTUP: 'false'
ports:
- '3000:3000'
depends_on:
db:
condition: service_healthy
healthcheck:
test: ['CMD-SHELL', 'wget -qO- http://localhost:3000/health || exit 1']
interval: 5s
timeout: 3s
retries: 12
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
ports:
- '4200:80'
depends_on:
backend:
condition: service_healthy
e2e:
build:
context: .
dockerfile: tests/e2e/Dockerfile
environment:
FRONT_URL: http://frontend
API_URL: http://backend:3000/api
depends_on:
frontend:
condition: service_started
backend:
condition: service_healthy
profiles: ['tests']
report:
build:
context: .
dockerfile: reports/Dockerfile
ports:
- '8501:8501'
volumes:
- ./reports:/app/reports
volumes:
pg_data: