forked from mkstayalive/castled
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
107 lines (99 loc) · 2.67 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.8"
x-logging: &default-logging
options:
max-size: "120m"
max-file: "5"
driver: json-file
services:
db:
image: mysql:5.7
platform: linux/amd64
container_name: castled-db
restart: unless-stopped
logging: *default-logging
environment:
- MYSQL_USER=${DATABASE_USER}
- MYSQL_PASSWORD=${DATABASE_PASSWORD}
- MYSQL_DATABASE=${DATABASE_DB}
- MYSQL_ROOT_PASSWORD=${DATABASE_PASSWORD}
ports:
- ${DATABASE_PORT}:3306
volumes:
- db_vol:/var/lib/mysql
app:
image: castled/app:${VERSION}
platform: linux/amd64
container_name: castled-app
restart: unless-stopped
logging: *default-logging
depends_on:
- kafka
- db
- redis
environment:
- APP_KAFKA_HOST=${KAFKA_HOST}
- APP_REDIS_HOST=${REDIS_HOST}
- APP_REDIS_PORT=${REDIS_PORT}
- APP_DATABASE_URL=${DATABASE_URL}
- APP_DATABASE_USER=${DATABASE_USER}
- APP_DATABASE_PASSWORD=${DATABASE_PASSWORD}
- APP_LOG_LEVEL=${LOG_LEVEL}
- S3_BUCKET=${S3_BUCKET}
- S3_BUCKET_REGION=${S3_BUCKET_REGION}
ports:
- 7050:7050
zookeeper:
image: confluentinc/cp-zookeeper:5.3.0
container_name: castled-zookeeper
restart: unless-stopped
logging: *default-logging
environment:
- ZOOKEEPER_CLIENT_PORT=2181
- ZOOKEEPER_TICK_TIME=2000
volumes:
- zk_data:/var/lib/zookeeper/data
- zk_log:/var/lib/zookeeper/log
- zk_secrets:/etc/zookeeper/secrets
kafka:
image: confluentinc/cp-kafka:5.3.0
container_name: castled-kafka
restart: unless-stopped
logging: *default-logging
depends_on:
- zookeeper
environment:
- KAFKA_BROKER_ID=1
- KAFKA_ZOOKEEPER_CONNECT=${ZOOKEEPER_HOST}
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://${KAFKA_HOST},PLAINTEXT_INTERNAL://localhost:29092
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
- KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
volumes:
- kafka_vol:/var/lib/kafka/data
- kafka_secrets:/etc/kafka/secrets
redis:
image: redis:6.2-alpine
container_name: castled-redis
logging: *default-logging
restart: unless-stopped
volumes:
- redis_vol:/data/
webapp:
image: castled/webapp:${VERSION}
container_name: castled-webapp
restart: unless-stopped
logging: *default-logging
environment:
- API_BASE=${API_BASE}
- API_BASE_URL=${API_BASE_URL}
- APP_BASE_URL=${APP_BASE_URL}
ports:
- 3000:3000
volumes:
kafka_vol:
db_vol:
zk_log:
zk_data:
redis_vol:
kafka_secrets:
zk_secrets: