-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yaml
127 lines (121 loc) · 3.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# docker-compose.yml
# Copyright (C) 2018 shady <shady@MrRobot.local>
#
version: "3"
services:
mysql:
image: itechub/sanic-mysql:latest
build: ./deployment/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: "sanic_seckill"
volumes:
- ${DOCKER_DIR}/volumes/data:/var/lib/mysql # mysql data source
- ${DOCKER_DIR}/volumes/log:/disk/log # mysql log
networks:
- sanic_seckill
consul:
image: itechub/sanic-consul:latest
build: ./deployment/consul
ports:
- "8501:8500"
networks:
- sanic_seckill
jaeger:
image: itechub/sanic-jaeger:latest
build: ./deployment/jaeger
networks:
- sanic_seckill
ports:
- "8502:16686"
product:
image: itechub/product_service:latest
build:
context: ./
dockerfile: ./deployment/service/Dockerfile
args:
- service=product
depends_on:
- mysql
ports:
- "8503:8503"
environment:
SERVER_HOST: "localhost"
SERVER_PORT: 8503
MYSQL_SERVICE_DB_NAME: "sanic_seckill"
MYSQL_SERVICE_USER: "root"
MYSQL_SERVICE_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_SERVICE_HOST: "mysql"
MYSQL_SERVICE_PORT: 3306
SANIC_SETTINGS_MODULE: "settings"
ACCESS_CONTROL_ALLOW_ORIGIN: "*"
ACCESS_CONTROL_ALLOW_HEADERS: "Content-Type"
ACCESS_CONTROL_ALLOW_METHODS: "POST, PUT, DELETE, GET"
JAEGER_HOST: "jaeger"
CONSUL_AGENT_HOST: 'consul'
CONSUL_AGENT_PORT: 8500
command: ["python", "-m", "server"]
networks:
- sanic_seckill
activity:
image: itechub/activity_service:latest
build:
context: ./
dockerfile: ./deployment/service/Dockerfile
args:
- service=activity
depends_on:
- mysql
ports:
- "8504:8504"
environment:
SERVER_HOST: "localhost"
SERVER_PORT: 8504
MYSQL_SERVICE_DB_NAME: "sanic_seckill"
MYSQL_SERVICE_USER: "root"
MYSQL_SERVICE_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_SERVICE_HOST: "mysql"
MYSQL_SERVICE_PORT: 3306
SANIC_SETTINGS_MODULE: "settings"
ACCESS_CONTROL_ALLOW_ORIGIN: "*"
ACCESS_CONTROL_ALLOW_HEADERS: "Content-Type"
ACCESS_CONTROL_ALLOW_METHODS: "POST, PUT, DELETE, GET"
TRACE_ALL: "true"
JAEGER_HOST: "jaeger"
CONSUL_AGENT_HOST: 'consul'
CONSUL_AGENT_PORT: 8500
command: ["python", "-m", "server"]
networks:
- sanic_seckill
order:
image: itechub/order_service:latest
build:
context: ./
dockerfile: ./deployment/service/Dockerfile
args:
- service=order
depends_on:
- mysql
ports:
- "8505:8505"
environment:
SERVER_HOST: "localhost"
SERVER_PORT: 8505
MYSQL_SERVICE_DB_NAME: "sanic_seckill"
MYSQL_SERVICE_USER: "root"
MYSQL_SERVICE_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_SERVICE_HOST: "mysql"
MYSQL_SERVICE_PORT: 3306
SANIC_SETTINGS_MODULE: "settings"
ACCESS_CONTROL_ALLOW_ORIGIN: "*"
ACCESS_CONTROL_ALLOW_HEADERS: "Content-Type"
ACCESS_CONTROL_ALLOW_METHODS: "POST, PUT, DELETE, GET"
JAEGER_HOST: "jaeger"
CONSUL_AGENT_HOST: 'consul'
CONSUL_AGENT_PORT: 8500
command: ["python", "-m", "server"]
networks:
- sanic_seckill
networks:
sanic_seckill:
# vim:ft=ansible