-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
89 lines (83 loc) · 2.78 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
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
version: '3'
services:
traefik:
image: "traefik"
container_name: "traefik"
restart: always
command:
# - "--log.level=DEBUG"
# - "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
- "--certificatesResolvers.myresolver.acme.dnsChallenge.resolvers=1.1.1.1:53,8.8.8.8:53"
# - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
############
# 修改为自己的邮箱地址
############
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
# prometheus 数据监控、如不需要可注释掉
- "--metrics.prometheus=true"
- "--entryPoints.metrics.address=:9090"
- "--metrics.prometheus.entryPoint=metrics"
# http 跳转至 https
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
# network_mode: host
# 如果遇到找不到 bolo 容器地址的报错提示请注释上一行、打开以下注释
ports:
- 80:80
- 443:443
networks:
- default
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
db:
image: mariadb:10.7
command: --max_allowed_packet=32505856 --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- ./mysql/data:/var/lib/mysql
env_file:
- bolo-env.env
networks:
- default
bolo:
image: tangcuyu/bolo-solo:latest
restart: always
container_name: "bolo"
expose:
- "8080"
# 主题与文章挂载目录
volumes:
- /etc/localtime:/etc/localtime:ro
# - ./web/markdowns:/opt/solo/markdowns:rw
# - ./theme/solo-nexmoe:/opt/bolo/skins/nexmoe
env_file:
- bolo-env.env
command: --listen_port=8080 --server_scheme=https --server_host=blog.example.org --server_port=443 --lute_http=http://lute:8249
dns: 8.8.8.8
labels:
- traefik.enable=true
- traefik.port=8080
- traefik.http.routers.bolo.rule=Host(`blog.example.org`)
- traefik.http.routers.bolo.tls=true
- traefik.http.routers.bolo.entrypoints=websecure
- traefik.http.routers.bolo.tls.certresolver=myresolver
depends_on:
- db
networks:
- default
lute:
image: b3log/lute-http
restart: always
expose:
- "8249"
networks:
- default
networks:
default: