-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yaml
45 lines (41 loc) · 1.05 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
# Docker compose for demonstration of the MySQL monitor application
version: '3'
services:
mysql-monitor:
build:
context: .
dockerfile: docker/monitor/Dockerfile
image: mysql-monitor
volumes:
# Mounting just the data dir is required to persist state across restarts
#- ./data:/usr/src/app/data
# Mount the whole app for editing source without rebuilding
- .:/usr/src/app
depends_on:
- db
- queue
# Small demo database instance
db:
build:
context: .
dockerfile: docker/db/Dockerfile
image: db
environment:
MYSQL_ROOT_PASSWORD: monitor
MYSQL_USER: monitor
MYSQL_PASSWORD: monitor
MYSQL_DATABASE: monitor_test
ports:
- "3306:3306"
queue:
image: rabbitmq:3.7-alpine
ports:
- "5672:5672"
# Simple subscriber script to demonstrate the system is working and see what messages will look like
subscriber:
build:
context: .
dockerfile: docker/subscriber/Dockerfile
image: subscriber
depends_on:
- queue