docker-compose Install Yaml
consul
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
version: "3"
services:
consul-server1:
image: hashicorp/consul:latest
container_name: consul-server1
restart: always
volumes:
- ${PWD}/config/server1.json:/consul/config/server1.json:ro
- ${PWD}/config/certs/:/consul/config/certs/:ro
networks:
- consul
ports:
- "9999:8500"
- "10001:8600/tcp"
- "10002:8600/udp"
command: "agent -bootstrap-expect=3"
consul-server2:
image: hashicorp/consul:latest
container_name: consul-server2
restart: always
volumes:
- ${PWD}/config/server2.json:/consul/config/server2.json:ro
- ${PWD}/config/certs/:/consul/config/certs/:ro
networks:
- consul
command: "agent -bootstrap-expect=3"
consul-server3:
image: hashicorp/consul:latest
container_name: consul-server3
restart: always
volumes:
- ${PWD}/config/server3.json:/consul/config/server3.json:ro
- ${PWD}/config/certs/:/consul/config/certs/:ro
networks:
- consul
command: "agent -bootstrap-expect=3"
consul-client:
image: hashicorp/consul:latest
container_name: consul-client
restart: always
volumes:
- ${PWD}/config/client.json:/consul/config/client.json:ro
- ${PWD}/config/certs/:/consul/config/certs/:ro
networks:
- consul
command: "agent"
networks:
consul:
driver: bridge
Browser file share
filebrowser
1
2
3
4
5
6
7
8
9
10
11
12
13
version: "3"
services:
filebrowser:
restart: always
image: filebrowser/filebrowser:v2.29.0
container_name: filebrowser
ports: # 映射端口号
- "80:80"
volumes:
- /home/save/filebrowser/srv:/srv
- /home/save/filebrowser/database.db:/database.db
- /home/save/filebrowser/.filebrowser.json:/.filebrowser.jsoni
restart: 'always'
minio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
version: "3"
services:
minio:
image: minio/minio
hostname: "minio"
ports:
- 10030:9000 # api 端口
- 10031:9001 # 控制台端口
environment:
MINIO_ACCESS_KEY: admin #管理后台用户名
MINIO_SECRET_KEY: minioadmin123 #管理后台密码,最小8个字符
volumes:
- ./data:/data #映射当前目录下的data目录至容器内/data目录
- ./config:/root/.minio/ #映射配置目录
command: server --console-address ':9001' /data #指定容器中的目录 /data
privileged: true
restart: always
gitlab-runner
1
2
3
4
5
6
7
8
9
10
11
12
version: "3"
services:
gitlab-runner:
image: gitlab/gitlab-runner:latest
container_name: gitlab-runner
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/save/gitlab-runner/config:/etc/gitlab-runner
environment:
- CI_SERVER_URL=https://gitlab-address.com
- RUNNER_REGISTRATION_TOKEN=token
restart: always
ELK
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
version: "3"
services:
elasticsearch:
image: elasticsearch:8.8.1
container_name: elasticsearch
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- /home/save/elk/elasticsearch/data:/usr/share/elasticsearch/data # 数据文件
- /home/save/elk/elasticsearch/logs:/usr/share/elasticsearch/logs # 日志文件
- /home/save/elk/elasticsearch/plugins:/usr/share/elasticsearch/plugins # 日志文件
- /home/save/elk/elasticsearch/config:/usr/share/elasticsearch/config # 配置文件
ports:
- "10011:9200"
- "10012:9300"
restart: always
kibana:
image: kibana:8.8.1
container_name: kibana
environment:
I18N_LOCALE: zh-CN
volumes:
- /home/save/elk/kibana/config:/usr/share/kibana/config
- /home/save/elk/kibana/plugins:/usr/share/kibana/plugins
# - /home/save/elk/kibana/node_modules:/usr/share/kibana/node_modules
ports:
- 10013:5601
depends_on:
- elasticsearch
restart: always
logstash:
image: logstash:8.8.1
container_name: logstash
restart: always
volumes:
- /etc/localtime:/etc/localtime
- /home/save/elk/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml
- /home/save/elk/logstash/pipeline/logstash.conf:/usr/share/logstash/pipeline/logstash.conf:ro
ports:
- "10014:5044"
- "10015:50000/tcp"
- "10015:50000/udp"
- "10016:9600"
depends_on:
- elasticsearch
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
books view
fbreader
1
2
3
4
5
6
7
8
9
10
11
12
13
version: "3"
services:
fbreader:
image: akshmakov/fbreader
container_name: fbreader
volumes:
- ./books:/books # 将你的书籍目录挂载到容器中
environment:
- DISPLAY=:0 # 设置显示变量,这在模拟桌面环境中很重要
ports:
- "8180:8080" # 设置 VNC 或其他远程访问服务的端口
restart: unless-stopped
gotify-server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
version: "3"
services:
gotify-server:
container_name: gotify-server
image: gotify/server
ports:
- "10034:8004"
environment:
TZ: "Asia/Shanghai"
GOTIFY_SERVER_PORT: 8004
volumes:
- ./data:/app/data
- /etc/hosts:/etc/hosts
restart: "always"
This post is licensed under
CC BY 4.0
by the author.