-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
76 lines (69 loc) · 2.26 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
# 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:
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 --default-authentication-plugin=mysql_native_password --max_allowed_packet=10485760 --max_connections=256 --connect-timeout=5
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-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-db-ctrl"
#notification redis
notification-redis:
image: "redis:5.0.5-alpine"
volumes:
- ${DATA_PATH}/redis:/data
command: redis-server
ports:
- "16379:6379"
depends_on:
- notification-db-ctrl
container_name: "notification-redis"
# notification service
notification-manager:
#build: .
image: "notification:latest"
command: "notification"
links:
- notification-db:notification-db
depends_on:
- notification-db-ctrl
- notification-redis
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=debug
- 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"