-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (63 loc) · 1.93 KB
/
docker-compose.yml
File metadata and controls
67 lines (63 loc) · 1.93 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
services:
app:
build: .
ports:
- ${HOST_PORT:-8080}:${SERVER_PORT:-8080}
- ${MARKET_TEST_HOSTPORT:-9099}:${MARKET_TEST_PORT:-40100}
container_name: marketflow
env_file:
- .env
depends_on:
redisDB:
condition: service_healthy
db:
condition: service_healthy
exchange1:
image: terow/exchanges:v1
container_name: exchange1
ports:
- "40101:40101"
exchange2:
image: terow/exchanges:v2
container_name: exchange2
ports:
- "40102:40102"
exchange3:
image: terow/exchanges:v3
container_name: exchange3
ports:
- "40103:40103"
redisDB:
image: redis:alpine3.22
container_name: marketflow-redis
# sysctls:
# - vm.overcommit_memory=1
ports:
- "${REDIS_PORT:-6379}:6379"
command: ["redis-server", "--requirepass", "${REDIS_PASS:-mypass}"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 3s
retries: 5
db:
image: postgres:alpine3.22
container_name: marketflow_db
ports:
- ${DB_PORT:-5432}:5432
environment:
POSTGRES_USER: ${DB_USER:-ukabdoll}
POSTGRES_PASSWORD: ${DB_PASSWORD:-07654321}
POSTGRES_DB: ${DB_NAME:-marketflow}
volumes:
- ./internal/adapters/driven/postgres/migration/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER:-ukabdoll} -d ${DB_NAME:-marketflow}" ]
interval: 3s
timeout: 5s
retries: 10 # Если база данных заработает после всех retries, контейнер не вернется в healthy автоматически!
# volumes:
# - ./minio/data:/data # ⬅ сохраняем в ./data локально
# - ./minio/certs:/root/.minio/certs
# volumes:
# minio_data: