-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
125 lines (117 loc) · 2.96 KB
/
docker-compose.yml
File metadata and controls
125 lines (117 loc) · 2.96 KB
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
name: minitwit
services:
mysql:
image: mysql:8.0
volumes:
- mysql-data:/var/lib/mysql
- ./src/main/resources/schema.sql:/docker-entrypoint-initdb.d/schema.sql
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ALLOW_EMPTY_PASSWORD=${MYSQL_ALLOW_EMPTY_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
ports:
- "${MYSQL_PORT}:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p$MYSQL_ROOT_PASSWORD"]
interval: 30s
timeout: 10s
retries: 10
restart: always
# BLUE VERSION (MySQL-based)
minitwit-blue:
build:
context: .
dockerfile: Dockerfile
container_name: minitwit-blue
ports:
- "5004:5000"
- "9404:9404"
- "9094:9091"
volumes:
#old sqlite data
# - minitwit-data:/data
- minitwit-logs:/data/logs
environment:
- DATABASE_URL=jdbc:mysql://mysql:3306/${MYSQL_DATABASE}?user=root&password=${MYSQL_ROOT_PASSWORD}
- METRICS_PORT=9091
depends_on:
mysql:
condition: service_healthy
restart: always
# GREEN VERSION (MySQL-based)
minitwit-green:
build:
context: .
dockerfile: Dockerfile
container_name: minitwit-green
ports:
- "5005:5000"
- "9406:9404"
- "9095:9091"
volumes:
#old sqlite data
# - minitwit-data:/data
- minitwit-logs:/data/logs
environment:
- DATABASE_URL=jdbc:mysql://mysql:3306/${MYSQL_DATABASE}?user=root&password=${MYSQL_ROOT_PASSWORD}
- METRICS_PORT=9091
depends_on:
mysql:
condition: service_healthy
restart: always
simulator-api:
build:
context: .
dockerfile: Dockerfile.api
ports:
- "5001:5001"
- "9405:9404"
- "9092:9091"
volumes:
#old sqlite data
# - minitwit-data:/data
- minitwit-logs:/data/logs
environment:
- DATABASE_URL=jdbc:mysql://mysql:3306/${MYSQL_DATABASE}?user=root&password=${MYSQL_ROOT_PASSWORD}
depends_on:
mysql:
condition: service_healthy
restart: always
node-exporter-app:
image: prom/node-exporter:latest
command: ["--path.rootfs=/host"]
volumes:
- /:/host:ro
ports:
- "9101:9100"
restart: unless-stopped
cadvisor-app:
image: gcr.io/cadvisor/cadvisor:latest
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
ports:
- "8081:8080"
restart: unless-stopped
filebeat:
image: docker.elastic.co/beats/filebeat:8.8.2
user: root
volumes:
- type: bind
source: ./filebeat.yml
target: /usr/share/filebeat/filebeat.yml
read_only: true
- minitwit-logs:/data/logs:ro
networks:
- default
volumes:
mysql-data:
name: minitwit_mysql-data
minitwit-data:
external: true
name: minitwit_minitwit-data
minitwit-logs:
external: true
name: minitwit_minitwit-logs