mkdir ~/.halo && cd ~/.halo
wget https://dl.halo.run/config/application-template.yaml -O ./application.yaml
vim application.yaml
默认的是h2
数据库, 我使用的是mysql
将h2
配置注释了
server:
port: 8090
# Response data gzip.
compression:
enabled: true
spring:
datasource:
# MySQL database configuration.
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://公网ip:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: xxx
password: xxx
halo:
# Your admin client path is https://your-domain/{admin-path}
admin-path: admin
# memory or level or redis
cache: memory
docker pull halohub/halo:1.5.2
docker run -it -d --name halo -p 8090:8090 -v ~/.halo:/root/.halo --restart=unless-stopped halohub/halo:1.5.2
配置主题
官网主题仓库
https://halo.run/themes.html
启用主题