-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
238 lines (234 loc) · 7.67 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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
version: '3.4'
services:
ssorder:
build:
context: frontend
dockerfile: Dockerfile
target: intermediate
args:
- WITH_XDEBUG=true
volumes:
- ./:/app
depends_on:
- mysql
labels:
traefik.backend: "ssorder"
traefik.frontend.rule: "Host:ssorder.lvh.me"
environment:
XDEBUG_TRIGGER: "default_no_matter"
XDEBUG_MODE: develop,debug
XDEBUG_CONFIG: "client_host=${MY_IP:-172.17.0.1} discover_client_host=0 client_port=9000"
PHP_IDE_CONFIG: "serverName=${DEV_SERVER_NAME:-ssorder.lvh.me}"
api-web:
image: nginx:1.19-alpine
depends_on:
- api-fpm
labels:
traefik.backend: "ssorder-api"
traefik.frontend.rule: "Host:api.ssorder.lvh.me"
volumes:
- ./api:/var/www/html
- ./provision/nginx/vhost-api.conf:/etc/nginx/conf.d/default.conf
api-fpm:
build:
context: api
dockerfile: Dockerfile
target: intermediate
args:
- WITH_XDEBUG=true
tmpfs:
- /var/www/html/var/cache:mode=750,size=50m,uid=33,gid=33
volumes:
- ./api:/var/www/html
depends_on:
- mysql
environment:
PHP_IDE_CONFIG: "serverName=${API_DEV_SERVER_NAME:-api.ssorder.lvh.me}"
XDEBUG_MODE: develop,debug
XDEBUG_CONFIG: "client_host=${MY_IP:-172.17.0.1} discover_client_host=0 client_port=9000"
cli:
image: thecodingmachine/php:8.1-v4-cli-node14
command: 'bash'
volumes:
- ./:/app
- ./provision/xdebug.ini:/usr/local/etc/php/conf.d/xdebug-conf.ini
user: ${MY_UID:-1000}
tty: true
working_dir: /app
depends_on:
- mysql
environment:
XDEBUG_TRIGGER: "default_no_matter"
XDEBUG_MODE: develop,debug
XDEBUG_CONFIG: "client_host=${MY_IP:-172.17.0.1} discover_client_host=0 client_port=9000"
PHP_IDE_CONFIG: "serverName=cli"
PHP_EXTENSIONS: bcmath xdebug
mysql:
image: mysql:5.6
volumes:
- mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: $DB_DATABASE_NAME
MYSQL_USER: $DB_USERNAME
MYSQL_PASSWORD: $DB_PASSWORD
ports:
- "3307:3306"
redis:
image: redis:5.0-alpine
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis:/data
phpmyadmin:
image: phpmyadmin/phpmyadmin:4.8
environment:
- PMA_HOST=mysql
labels:
traefik.backend: "phpmyadmin"
traefik.frontend.rule: "Host:phpmyadmin.lvh.me"
redis-web:
image: rediscommander/redis-commander:latest
environment:
- REDIS_HOSTS=local:redis:6379
labels:
traefik.backend: "redis-web"
traefik.port: "8081"
traefik.frontend.rule: "Host:redis.lvh.me"
mailhog:
image: mailhog/mailhog
labels:
traefik.port: "8025"
traefik.frontend.rule: "Host:mailhog.lvh.me"
minio:
image: minio/minio:RELEASE.2021-01-05T05-22-38Z
volumes:
- minio:/data
labels:
traefik.port: "9000"
traefik.frontend.rule: "Host:minio.lvh.me"
environment:
MINIO_ACCESS_KEY: $MINIO_ACCESS_KEY
MINIO_SECRET_KEY: $MINIO_SECRET_KEY
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://minio:9000/minio/health/live"]
interval: 1m30s
timeout: 20s
retries: 3
start_period: 3m
meilisearch:
image: getmeili/meilisearch:v0.26.1
labels:
traefik.port: "7700"
traefik.frontend.rule: "Host:meilisearch.lvh.me"
environment:
MEILI_ENV: development
MEILI_MASTER_KEY: ~
volumes:
- meilisearch:/data.ms
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1:7700/health" ]
interval: 30s
timeout: 5s
retries: 3
start_period: 1m
rocketchat:
image: rocketchat/rocket.chat:0.70.2 # upgrade to 0.70.4
volumes:
- rocketchat-uploads:/app/uploads
environment:
- PORT=3000
- ROOT_URL=${ROCKETCHAT_URL:-http://localhost:3000}
- MONGO_URL=mongodb://mongo:27017/rocketchat
- MONGO_OPLOG_URL=mongodb://mongo:27017/local
- MAIL_URL=smtp://mailhog:1025
- ADMIN_USERNAME=admin
- ADMIN_PASS=admin
- ADMIN_EMAIL=admin@example.com
# - HTTP_PROXY=http://proxy.domain.com
# - HTTPS_PROXY=http://proxy.domain.com
depends_on:
- mongo
#ports:
#- 3001:80
labels:
traefik.backend: "rocketchat"
traefik.frontend.rule: "Host:rocketchat.lvh.me"
traefik.port: "3000"
external_links:
- ssorder:ssorder.lvh.me
mongo:
image: mongo:3.2
volumes:
- mongodb:/data/db
#- ./data/dump:/dump
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
labels:
traefik.enable: "false"
# this container's job is just run the command to initialize the replica set.
# it will run the command and remove himself (it will not stay running)
mongo-init-replica:
image: mongo:3.2
depends_on:
- mongo
command: 'mongo mongo/rocketchat --eval "rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})"'
labels:
traefik.enable: "false"
traefik:
image: traefik:1.5
command: --web --docker --logLevel=DEBUG
ports:
- "80:80"
- "8080:8080"
- "4443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/etc/traefik/traefik.toml
newman:
image: postman/newman:alpine
volumes:
- ./integration-tests:/tests
depends_on:
- traefik
external_links:
- traefik:ssorder.lvh.me
entrypoint: '/tests/entrypoint.sh'
wait:
image: dokku/wait
prometheus:
image: prom/prometheus
volumes:
- ./provision/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-tsdb:/prometheus
labels:
traefik.port: "9090"
traefik.backend: "prometheus"
traefik.frontend.rule: "Host: prometheus.lvh.me"
grafana:
image: grafana/grafana:6.7.1
# volumes:
# - .runtime/grafana:/var/lib/grafana
environment:
#- GF_INSTALL_PLUGINS=grafana-clock-panel 1.0.1,grafana-simple-json-datasource 1.3.5
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=adminpassword
- GF_USERS_ALLOW_SIGN_UP=false
- GF_SERVER_DOMAIN=grafana.lvh.me
- GF_SMTP_ENABLED=true
- GF_SMTP_FROM_ADDRESS=grafana@ssorder.example
- GF_SMTP_FROM_NAME=Grafana SSOrder
- GF_SMTP_HOST=mailhog:1025
- GF_SMTP_USER=grafana
- GF_SMTP_PASSWORD=grafanapassword
labels:
traefik.port: "3000"
traefik.backend: "grafana"
traefik.frontend.rule: "Host: grafana.lvh.me"
volumes:
mysql:
redis:
minio:
rocketchat-uploads:
mongodb:
prometheus-tsdb:
meilisearch: