-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
107 lines (98 loc) · 2.31 KB
/
docker-compose.yaml
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
version: '3'
networks:
cc_main_net:
driver: bridge
services:
cc_zookeeper:
image: bitnami/zookeeper:latest
restart: always
environment:
ALLOW_ANONYMOUS_LOGIN: 'yes'
healthcheck:
test: [ "CMD-SHELL", "/opt/bitnami/zookeeper/bin/zkServer.sh status | grep 'Mode: standalone' || exit 1" ]
interval: 30s
timeout: 10s
retries: 3
networks:
- cc_main_net
cc_kafka:
image: bitnami/kafka:latest
restart: always
healthcheck:
test: [ "CMD-SHELL", "/opt/bitnami/kafka/bin/kafka-topics.sh --list --bootstrap-server localhost:9092 || exit 1" ]
interval: 30s
timeout: 10s
retries: 3
depends_on:
cc_zookeeper:
condition: service_healthy
environment:
ALLOW_PLAINTEXT_LISTENER: 'yes'
KAFKA_CFG_ZOOKEEPER_CONNECT: cc_zookeeper:2181
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://cc_kafka:9092
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "true"
networks:
- cc_main_net
cc_postgres:
image: bitnami/postgresql:16
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_USER: shift_cc
POSTGRES_PASSWORD: shift_cc_pass
POSTGRES_DB: shift_cc_db
volumes:
- postgres_data:/bitnami/postgresql
networks:
- cc_main_net
cc_auth:
build:
context: .
dockerfile: docker/Dockerfile-auth
image: cc_auth:latest
restart: always
ports:
- "24001:24001"
depends_on:
cc_kafka:
condition: service_healthy
cc_postgres:
condition: service_started
volumes:
- photo_storage:/app/photo_storage/
networks:
- cc_main_net
cc_balance:
build:
context: .
dockerfile: docker/Dockerfile-balance
image: cc_balance:latest
restart: always
ports:
- "24101:24101"
depends_on:
cc_kafka:
condition: service_healthy
cc_postgres:
condition: service_started
networks:
- cc_main_net
cc_verify:
build:
context: .
dockerfile: docker/Dockerfile-verify
image: cc_verify:latest
restart: always
ports:
- "24201:24201"
volumes:
- photo_storage:/app/photo_storage
depends_on:
cc_kafka:
condition: service_healthy
networks:
- cc_main_net
volumes:
photo_storage:
postgres_data: