-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
121 lines (116 loc) · 3.39 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
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: squad
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d squad"]
interval: 5s
timeout: 5s
retries: 5
minio:
image: minio/minio
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
MINIO_STORAGE_CLASS_REDIRECT_DISABLE: "true"
entrypoint: ''
command: bash -c 'mkdir -p /data/chutes && minio server /data'
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
restart: always
redis:
image: redis:7
ports:
- "127.0.0.1:6379:6379"
command: ["redis-server", "--requirepass", "redispassword"]
environment:
- REDIS_PASSWORD=redispassword
restart: always
healthcheck:
test: ["CMD", "redis-cli", "-a", "redispassword", "ping"]
interval: 5s
timeout: 5s
retries: 5
opensearch:
environment:
- discovery.type=single-node
- OPENSEARCH_JAVA_OPTS=-Xms256m -Xmx256m
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb
- cluster.routing.allocation.disk.watermark.high=256mb
- cluster.routing.allocation.disk.watermark.flood_stage=128mb
- plugins.security.disabled=true
- action.auto_create_index=*
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=Sup3rSecureP@ssword!
image: opensearchproject/opensearch:2.18.0
ulimits:
nofile:
soft: 65536
hard: 65536
restart: always
ports:
- "127.0.0.1:9200:9200"
volumes:
- opensearch_data:/usr/share/opensearch/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=50s"]
interval: 30s
timeout: 10s
retries: 5
api:
build:
context: .
volumes:
- ./squad:/app/squad
- ./migrations:/app/migrations
- ./squad_priv.pem:/etc/jwt-cert/squad_priv.pem
- ./squad_pub.pem:/etc/jwt-cert/squad_pub.pem
environment:
- POSTGRESQL=postgresql+asyncpg://user:password@postgres:5432/squad
- REDIS_URL=redis://:redispassword@redis:6379/0
- OPENSEARCH_URL=http://opensearch:9200
- MEMCACHED=memcached
## If you have the actual JWT private cert for chutes auth.
- JWT_PRIVATE_PATH=/etc/jwt-cert/squad_priv.pem
- JWT_PUBLIC_PATH=/etc/jwt-cert/squad_pub.pem
# Otherwise hack away with manual key.
#- DEV_CHUTES_AUTH=${CHUTES_API_KEY}
- X_API_TOKEN=${X_API_TOKEN}
- X_API_KEY=${X_API_KEY}
- X_APP_ID=${X_APP_ID}
- X_CLIENT_ID=${X_CLIENT_ID}
- X_CLIENT_SECRET=${X_CLIENT_SECRET}
- OAUTHLIB_INSECURE_TRANSPORT="1"
- DEVMODE="1"
- AWS_ACCESS_KEY_ID=minioadmin
- AWS_SECRET_ACCESS_KEY=minioadmin
- AWS_ENDPOINT_URL=http://minio:9000
- AWS_REGION=us-east-1
- STORAGE_BUCKET=chutes
restart: always
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
opensearch:
condition: service_healthy
minio:
condition: service_started
volumes:
postgres_data:
opensearch_data:
minio_data: