-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
219 lines (219 loc) · 6.76 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# For more information: https://laravel.com/docs/indra
version: "3"
services:
## web service #######################################################################################################
web:
build:
context: ./docker/web
args:
WWWGROUP: "${WWWGROUP}"
WWWUSER: "${WWWUSER}"
PHP_VERSION: "${PHP_VERSION}"
INSTALL_XDEBUG: "${INSTALL_XDEBUG}"
DEFAULT_WEB_SERVER: "${DEFAULT_WEB_SERVER}"
APP_ENV: "${APP_ENV}"
networks:
- indra
volumes:
- "./:/var/www/html"
- "./storage/:/var/www/html/storage:rw"
- "${PHP_LOCAL_CONFIG}:/etc/php/${PHP_VERSION}/${PHP_CONFIG_FOLDER}/conf.d/override_php.ini"
- "${MSMTP_LOCAL_CONFIG}:/etc/msmtprc"
depends_on:
- db
- redis
- selenium
- proxy
links:
- proxy:www.indra.de.localhost
- proxy:www.indra.localhost
container_name: ${WEB_CONTAINER_NAME}
### proxy ############################################################################################################
proxy:
build:
context: ./docker/proxy
args:
DEFAULT_WEB_SERVER: "${DEFAULT_WEB_SERVER}"
ports:
- '80:80'
- '443:443'
networks:
- indra
container_name: ${PROXY_CONTAINER_NAME}
### hostmachine ######################################################################################################
hostmachine:
image: qoomon/docker-host
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
deploy:
resources:
limits:
memory: 8M
restart: on-failure
networks:
- indra
container_name: ${HOSTMACHINE_CONTAINER_NAME}
### composer #########################################################################################################
composer:
build:
context: ./docker/composer/
working_dir: /var/www/html/
volumes:
- "./:/var/www/html"
command: [ "install", "--ignore-platform-reqs" ]
user: "${WWWUSER}"
networks:
- indra
container_name: ${COMPOSER_CONTAINER_NAME}
## mariadb service #####################################################################################################################
### database #########################################################################################################
db:
image: "${DB_IMAGE}:${DB_VERSION}"
restart: 'always'
ports:
- "${FORWARD_DB_PORT:-3306}:3306"
environment:
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
MYSQL_DATABASE: "${DB_DATABASE}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- "indra_db:/var/lib/mysql"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}" ]
retries: 3
timeout: 5s
networks:
- indra
container_name: ${DB_CONTAINER_NAME}
## redis service #####################################################################################################
redis:
image: "redis:alpine"
ports:
- "${FORWARD_REDIS_PORT:-6379}:6379"
volumes:
- "indra_redis:/data"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
retries: 3
timeout: 5s
networks:
- indra
container_name: ${REDIS_CONTAINER_NAME}
## mailhog service ###################################################################################################
mailhog:
image: "mailhog/mailhog:latest"
ports:
- "${FORWARD_MAILHOG_PORT:-1025}:1025"
- "${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025"
networks:
- indra
container_name: ${MAIL_SERVICE_CONTAINER_NAME}
## selenium service ##################################################################################################
selenium:
image: "selenium/standalone-chrome"
volumes:
- "/dev/shm:/dev/shm"
networks:
- indra
container_name: ${SELENIUM_CONTAINER_NAME}
### mongo ############################################################################################################
mongo:
image: mongo:4.2
networks:
- indra
container_name: ${MONOGO_CONTAINER_NAME}
### elasticSearch ####################################################################################################
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
deploy:
resources:
limits:
memory: 1g
networks:
- indra
container_name: ${ELASTICSEARCH_CONTAINER_NAME}
### graylog ##########################################################################################################
graylog:
image: graylog/graylog:4.1
volumes:
- "indra_graylog:/usr/share/graylog/data/journal"
- "./docker/graylog/config/:/usr/share/graylog/data/config"
environment:
# CHANGE ME (must be at least 16 characters)!
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:7000/
- GRAYLOG_ELASTICSEARCH_VERSION=7
links:
- proxy:www.graylog.localhost
depends_on:
- mongo
- elasticsearch
networks:
- indra
ports:
# Graylog web interface and REST API
- 7000:9000
# GELF http
- 12201:12201
# Syslog TCP
- 1514:1514
# Syslog UDP
- 1514:1514/udp
# GELF TCP
- 5555:5555
# GELF UDP
- 12201:12201/udp
entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh
restart: always
container_name: ${GRAYLOG_CONTAINER_NAME}
### portainer ########################################################################################################
portainer:
image: portainer/portainer
volumes:
- "indra_portainer_data:/data"
- "/var/run/docker.sock:/var/run/docker.sock"
links:
- proxy:www.portainer.localhost
networks:
- indra
deploy:
placement:
constraints: [ node.role == manager ]
replicas: 1
restart_policy:
condition: on-failure
resources:
limits:
cpus: "1"
ports:
- "9999:9000"
container_name: ${PORTAINER_CONTAINER_NAME}
################################################################################################################################
networks:
indra:
driver: bridge
volumes:
indra_db:
driver: local
indra_redis:
driver: local
mongo:
driver: local
elasticsearch:
driver: local
indra_graylog:
driver: local
indra_portainer_data:
driver: local