forked from BrainTease/Brain-Storm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
119 lines (111 loc) · 2.43 KB
/
Copy pathdocker-compose.yml
File metadata and controls
119 lines (111 loc) · 2.43 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: '3.8'
services:
postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: brain-storm
POSTGRES_USER: brain-storm
POSTGRES_PASSWORD: brain-storm
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- '5432:5432'
networks:
- brain-storm
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U brain-storm -d brain-storm']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis_data:/data
ports:
- '6379:6379'
networks:
- brain-storm
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 3s
retries: 5
backend:
build:
context: ./apps/backend
dockerfile: Dockerfile
restart: unless-stopped
ports:
- '3000:3000'
env_file:
- .env
environment:
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_USERNAME: brain-storm
DATABASE_PASSWORD: brain-storm
DATABASE_NAME: brain-storm
REDIS_HOST: redis
REDIS_PORT: 6379
volumes:
- /app/node_modules
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- brain-storm
healthcheck:
test: ['CMD-SHELL', 'wget -qO- http://localhost:3000/v1/health/readiness || exit 1']
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
frontend:
build:
context: .
dockerfile: apps/frontend/Dockerfile
restart: unless-stopped
ports:
- '3001:3001'
env_file:
- .env
environment:
NEXT_PUBLIC_API_URL: http://backend:3000
depends_on:
backend:
condition: service_healthy
networks:
- brain-storm
healthcheck:
test: ['CMD-SHELL', 'wget -qO- http://localhost:3001/api/health || exit 1']
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
contracts-builder:
build:
context: .
dockerfile: contracts/Dockerfile
target: builder
profiles:
- contracts
volumes:
- wasm_artifacts:/contracts/contracts
networks:
- brain-storm
volumes:
postgres_data:
driver: local
redis_data:
driver: local
wasm_artifacts:
driver: local
networks:
brain-storm:
name: brain-storm
driver: bridge