-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (51 loc) · 1.45 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
version: "3.9"
services:
koj-pulsar:
image: apachepulsar/pulsar
container_name: koj-pulsar
deploy:
restart_policy:
condition: any
delay: 5s
window: 60s
ports:
- "6650:6650"
- "8080:8080"
volumes:
- "./data/pulsar/data:/pulsar/data"
- "./data/pulsar/conf:/pulsar/conf"
command: bin/pulsar standalone
koj-sandbox:
image: openjdk:17
# container_name: koj-sandbox
deploy:
restart_policy:
condition: any
delay: 5s
window: 60s
mode: replicated
replicas: 6
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./koj-sandbox-server-1.0-SNAPSHOT.jar:/koj-sandbox-server-1.0-SNAPSHOT.jar"
- "./wait-for-it.sh:/wait-for-it.sh"
- "/tmp:/tmp" # 必须挂载出来,临时文件夹创建是需要挂载到其他容器的
depends_on:
- "koj-pulsar"
command: /wait-for-it.sh koj-pulsar:6650 -- java -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -Xmx2g -jar koj-sandbox-server-1.0-SNAPSHOT.jar --pulsar.service-url=pulsar://koj-pulsar:6650 #--debug=true --logging.level.root=debug
mysql:
image: mysql:oracle
container_name: mysql
deploy:
restart_policy:
condition: any
delay: 5s
window: 60s
environment:
- MYSQL_ROOT_PASSWORD=kairlec
- MYSQL_USER=kairlec
- MYSQL_PASS=kairlec
ports:
- "3306:3306"
volumes:
- ./mysql:/var/lib/mysql