-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
141 lines (138 loc) · 3.07 KB
/
docker-compose.yml
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
services:
api:
build: ./api/
environment:
ENV: production
PORT: 5000
HOSTNAME: "0.0.0.0"
REDIS_URL: redis://@cache:6379
MINIO_HOST: bucket:9000
MINIO_ACCESS_ID: minio
MINIO_SECRET_KEY: password
MINIO_TOKEN: ""
SENTRY_DSN: ""
ports:
- 5000:5000
healthcheck:
test: "curl -f http://api:5000/health/"
interval: 15s
timeout: 12s
retries: 10
start_period: 30s
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
delay: 30s
max_attempts: 20
window: 60s
resources:
limits:
memory: 1GB
cpus: '1'
reservations:
memory: 50MB
cpus: '0.1'
depends_on:
bucket:
condition: service_healthy
cache:
condition: service_healthy
client:
build: ./client/
environment:
PORT: 3000
VITE_NODE_ENV: production
VITE_SERVER_API_ENDPOINT: http://api:5000
VITE_BROWSER_API_ENDPOINT: http://localhost:3000
VITE_SENTRY_DSN: ""
ports:
- 3000:3000
healthcheck:
test: "curl -f http://client:3000/"
interval: 15s
timeout: 12s
retries: 10
start_period: 30s
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
delay: 30s
max_attempts: 20
window: 60s
resources:
limits:
memory: 500MB
cpus: '1'
reservations:
memory: 50MB
cpus: '0.1'
depends_on:
api:
condition: service_healthy
cache:
image: redis:6.2.7-alpine
ports:
- 6379:6379
healthcheck:
test: redis-cli -a foobared ping | grep PONG
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
delay: 30s
max_attempts: 20
window: 60s
resources:
limits:
memory: 2GB
cpus: '1'
reservations:
memory: 100MB
cpus: '0.1'
volumes:
- ./data/redis/etc:/usr/local/etc/redis
- ./data/redis/data:/data
bucket:
image: quay.io/minio/minio:RELEASE.2022-09-07T22-25-02Z
command: server /data --console-address ":9001"
restart: unless-stopped
ports:
- 9001:9001
- 9000:9000
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: password
MINIO_ACCESS_KEY: minio_access_key
MINIO_SECRET_KEY: minio_secret_key
healthcheck:
test: "curl -f http://localhost:9000/minio/health/live"
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
delay: 30s
max_attempts: 20
window: 60s
resources:
limits:
memory: 4GB
cpus: '2'
reservations:
memory: 50MB
cpus: '0.1'
volumes:
- ./data/minio:/data