-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (78 loc) · 2.57 KB
/
docker-compose.yml
File metadata and controls
82 lines (78 loc) · 2.57 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
services:
mariadb:
image: mariadb:11.8
container_name: mariadb
environment:
MYSQL_ROOT_PASSWORD: rootpassword
volumes:
- ./sql/mariadb.cnf:/etc/mysql/mariadb.conf.d/mariadb.cnf
- ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
jobmanager:
build: .
container_name: jobmanager
environment:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
execution.checkpointing.interval: 60s
execution.checkpointing.mode: EXACTLY_ONCE
execution.checkpointing.min-pause: 30s
execution.checkpointing.timeout: 120s
state.backend: hashmap
state.checkpoints.dir: file:///opt/flink/checkpoints
state.savepoints.dir: file:///opt/flink/savepoints
restart-strategy: fixed-delay
restart-strategy.fixed-delay.attempts: 3
restart-strategy.fixed-delay.delay: 10s
metrics.reporters: prom
metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory
metrics.reporter.prom.port: 9091
ports:
- "8081:8081"
depends_on:
mariadb:
condition: service_healthy
command: jobmanager
volumes:
- ./jobs/job.sql:/opt/flink/job.sql
- flink-checkpoints:/opt/flink/checkpoints
- flink-savepoints:/opt/flink/savepoints
taskmanager:
build: .
environment:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
taskmanager.numberOfTaskSlots: 2
execution.checkpointing.interval: 60s
execution.checkpointing.mode: EXACTLY_ONCE
execution.checkpointing.min-pause: 30s
execution.checkpointing.timeout: 120s
state.backend: hashmap
state.checkpoints.dir: file:///opt/flink/checkpoints
state.savepoints.dir: file:///opt/flink/savepoints
restart-strategy: fixed-delay
restart-strategy.fixed-delay.attempts: 3
restart-strategy.fixed-delay.delay: 10s
metrics.reporters: prom
metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory
metrics.reporter.prom.port: 9091
depends_on:
- jobmanager
command: taskmanager
volumes:
- flink-checkpoints:/opt/flink/checkpoints
- flink-savepoints:/opt/flink/savepoints
deploy:
replicas: 2
volumes:
flink-checkpoints:
flink-savepoints: