-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
168 lines (127 loc) · 3.07 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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Docker Compose definition for easy development environment setup
# @I Document nginx proxy requirement for docker-compose development environment
version: '2'
services:
# Where the main development happens.
development:
# Build.
build:
context: ./docker
dockerfile: Dockerfile-go
image: ms_development
# Run.
command: sleep infinity
container_name: ms_development
# Configure.
environment:
- VIRTUAL_HOST=api.mantis-shrimp.localhost
- VIRTUAL_PORT=8888
- VIRTUAL_NETWORK=nginx-proxy
links:
- elasticsearch
- redis
- watch_api:ms-watch-api
- action_api:ms-action-api
networks:
- proxy-tier
volumes:
- ../../../..:/go
# Service that runs the Watch API. To be used when developing a consumer.
watch_api:
# Build.
build:
context: ./docker
dockerfile: Dockerfile-go
image: ms_watch_api
# Run.
command: /go/bin/ms_watch_api
container_name: ms_watch_api
# Configure.
links:
- elasticsearch
networks:
- proxy-tier
volumes:
- ../../../..:/go
# Service that runs the Action API. To be used when developing a consumer.
action_api:
# Build.
build:
context: ./docker
dockerfile: Dockerfile-go
image: ms_action_api
# Run.
command: /go/bin/ms_action_api
container_name: ms_action_api
# Configure.
links:
- redis
networks:
- proxy-tier
volumes:
- ../../../..:/go
# Databases.
elasticsearch:
# Build.
build:
context: ./docker
dockerfile: Dockerfile-elasticsearch
image: ms_elasticsearch
# Run.
container_name: ms_elasticsearch
# Configure.
environment:
- ES_JAVA_OPTS=-Xms1g -Xmx1g
# 2GB memory limit - otherwise elasticsearch will eat up all memory.
# It will complain and not start if provided less.
mem_limit: 2147483648
networks:
- proxy-tier
volumes:
- ${DOCKER_COMPOSE_VOLUMES_DIR}/src/go-mantis-shrimp/elasticsearch:/usr/share/elasticsearch/data
redis:
# Build.
image: redis:alpine
# Run.
container_name: ms_redis
# Configure.
mem_limit: 268435456
networks:
- proxy-tier
volumes:
- ${DOCKER_COMPOSE_VOLUMES_DIR}/src/go-mantis-shrimp/redis:/data
# Image for easily calling a redis cli via the following command:
# docker-compose run --rm redis_cli redis-cli -h redis -p 6379
redis_cli:
# Build.
image: redis:alpine
# Run.
command: exit
container_name: ms_redis_cli
# Configure.
links:
- redis
networks:
- proxy-tier
# Development tools.
kibana:
# Build.
build:
context: ./docker
dockerfile: Dockerfile-kibana
image: ms_kibana
# Run.
container_name: ms_kibana
# Configure.
environment:
- VIRTUAL_HOST=kibana.mantis-shrimp.localhost
- VIRTUAL_PORT=5601
- VIRTUAL_NETWORK=nginx-proxy
links:
- elasticsearch
networks:
- proxy-tier
networks:
proxy-tier:
external:
name: nginx-proxy