forked from apssouza22/java-microservice
-
Notifications
You must be signed in to change notification settings - Fork 2
/
aws-compose.yml
131 lines (121 loc) · 3.52 KB
/
aws-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
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
128
129
130
131
version: '2'
services:
config:
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:config-server
ports:
- 8888:8888
hostname: config
container_name: config
mem_limit: 1025288000
cpu_shares: 100
extra_hosts:
- "eureka:EC2_INSTANCE_IP"
environment:
- JAVA_OPTS=' -Xmx800m'
user:
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:user-service
ports:
- 8016:8016
hostname: user
container_name: user
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
external_links:
- elk
- kafka
mem_limit: 1025288000
cpu_shares: 100
extra_hosts:
- "config:EC2_INSTANCE_IP"
- "eureka:EC2_INSTANCE_IP"
environment:
- JAVA_OPTS=' -Xmx800m'
eureka:
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:eureka-server
ports:
- 8010:8010
depends_on:
- config
hostname: eureka
container_name: eureka
command: ["./wait-for-it.sh","config:8888","--timeout=100","--","/usr/local/bin/start.sh"]
mem_limit: 1025288000
cpu_shares: 100
extra_hosts:
- "config:EC2_INSTANCE_IP"
environment:
- JAVA_OPTS=' -Xmx800m'
oauth:
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:oauth-server
ports:
- 8017:8017
hostname: oauth
container_name: oauth
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
mem_limit: 1025288000
cpu_shares: 100
extra_hosts:
- "config:EC2_INSTANCE_IP"
- "eureka:EC2_INSTANCE_IP"
environment:
- JAVA_OPTS=' -Xmx800m'
admin:
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:admin-server
container_name: admin
ports:
- 8026:8026
environment:
- EUREKA_SERVICE_URL=http://EC2_INSTANCE_IP:8010
- EUREKA_INSTANCE_PREFER_IP_ADDRESS=true
- LOGGING_FILE=/tmp/admin.log
- JAVA_OPTS=' -Xmx800m'
command: ["./wait-for-it.sh","EC2_INSTANCE_IP:8010","--timeout=150","--","/usr/local/bin/start.sh"]
mem_limit: 1225288000
cpu_shares: 100
extra_hosts:
- "config:EC2_INSTANCE_IP"
- "eureka:EC2_INSTANCE_IP"
environment:
- JAVA_OPTS=' -Xmx800m'
zookeeper:
image: wurstmeister/zookeeper
ports:
- 2181:2181
mem_limit: 925288000
cpu_shares: 100
kafka:
image: wurstmeister/kafka
ports:
- 9092:9092
environment:
KAFKA_ZOOKEEPER_CONNECT: "EC2_INSTANCE_IP:2181"
KAFKA_CREATE_TOPICS: "todo-mail:1:1"
HOSTNAME_COMMAND: curl http://169.254.169.254/latest/meta-data/public-hostname
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_ADVERTISED_PROTOCOL_NAME: OUTSIDE
KAFKA_PROTOCOL_NAME: INSIDE
KAFKA_ADVERTISED_PORT: 9094
volumes:
- /var/run/docker.sock:/var/run/docker.sock
hostname: kafka
container_name: kafka
mem_limit: 1325288000
cpu_shares: 100
extra_hosts:
- "zookeeper:EC2_INSTANCE_IP"
reminder:
image: 004833468061.dkr.ecr.eu-west-1.amazonaws.com/alex:reminder-service
ports:
- 8015:8015
networks:
- net
hostname: reminder
command: ["./wait-for-it.sh","config:8010","--timeout=150","--","/usr/local/bin/start.sh"]
extra_hosts:
- "config:52.50.116.215"
- "eureka:52.50.116.215"
- "kafka:52.50.116.215"
- "zookeeper:52.50.116.215"
environment:
- JAVA_OPTS=' -Xmx800m'
mem_limit: 1025288000
cpu_shares: 100