-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
79 lines (75 loc) · 2.62 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
# Copyright 2018 The OpenPitrix Authors. All rights reserved.
# Use of this source code is governed by a Apache license
# that can be found in the LICENSE file.
version: '3'
services:
# tag mysql db
notification-db:
image: "mysql:8.0.11"
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ${DATA_PATH}/mysql:/var/lib/mysql
- ./pkg/db/ddl:/docker-entrypoint-initdb.d
command: --lower_case_table_names=0 --max_allowed_packet=10485760 --max_connections=256
ports:
- "13306:3306" # for unit-test & debug
container_name: "notification-db"
logging:
driver: "json-file"
options:
max-size: ${NOTIFICATION_LOG_MAX_SIZE}
max-file: ${NOTIFICATION_LOG_MAX_FILE}
# notification etcd
notification-etcd:
image: "quay.io/coreos/etcd:v3.2.18"
command: etcd --data-dir /data --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://notification-etcd:2379 --max-snapshots 5 --max-wals 5 --auto-compaction-retention=168
volumes:
- ${DATA_PATH}/etcd:/data
ports:
- "12379:2379" # for unit-test & debug
container_name: "notification-etcd"
logging:
driver: "json-file"
options:
max-size: ${NOTIFICATION_LOG_MAX_SIZE}
max-file: ${NOTIFICATION_LOG_MAX_FILE}
# notification service
notification-manager:
#build: .
image: "notification:latest"
#image: "kubespheredev/notification:v0.2.0"
command: "notification"
links:
- notification-db:notification-db
- notification-etcd:notification-etcd
depends_on:
- notification-notification-db-ctrl
- notification-etcd
container_name: "notification-manager"
environment:
- NOTIFICATION_LOG_LEVEL=${NOTIFICATION_LOG_LEVEL}
- NOTIFICATION_GRPC_SHOW_ERROR_CAUSE=${NOTIFICATION_GRPC_SHOW_ERROR_CAUSE}
- NOTIFICATION_MYSQL_DATABASE=notification
- NOTIFICATION_MYSQL_LOG_MODE=false
- NOTIFICATION_LOG_LEVEL=error
- NOTIFICATION_APP_MAX_WORKING_NOTIFICATIONS=5
- NOTIFICATION_APP_MAX_WORKING_TASKS=5
logging:
driver: "json-file"
options:
max-size: ${NOTIFICATION_LOG_MAX_SIZE}
max-file: ${NOTIFICATION_LOG_MAX_FILE}
ports:
- "9200:9200"
- "9201:9201"
notification-notification-db-ctrl:
image: dhoer/flyway:5.1.4-mysql-8.0.11-alpine
command: -url=jdbc:mysql://notification-db/notification -user=root -password=${MYSQL_ROOT_PASSWORD} -validateOnMigrate=false migrate
volumes:
- ./pkg/db/schema/notification:/flyway/sql
links:
- notification-db:notification-db
depends_on:
- notification-db
container_name: "notification-notification-db-ctrl"