Skip to content

Commit 784ce9d

Browse files
committed
Add PostgreSQL and Redis config for distributed deployment
1 parent adb56af commit 784ce9d

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

application.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
server:
2+
port: 8090
3+
spring:
4+
r2dbc:
5+
url: r2dbc:pool:postgresql://170.106.99.35:5432/halo-test
6+
username: admin
7+
password: 123456
8+
sql:
9+
init:
10+
mode: always
11+
platform: postgresql
12+
schema-locations:
13+
- classpath:schema-postgresql.sql
14+
- classpath:schema-postgresql-outbox.sql
15+
# 使用正确的 Redis 配置路径和格式
16+
data:
17+
redis:
18+
host: localhost
19+
port: 6379
20+
password: 123456
21+
timeout: 30000
22+
lettuce:
23+
pool:
24+
max-active: 8
25+
max-idle: 8
26+
min-idle: 0
27+
max-wait: -1ms
28+
# 添加客户端名称
29+
client-name: halo-client
30+
cache:
31+
type: redis
32+
redis:
33+
time-to-live: 3600000
34+
key-prefix: "halo:"
35+
halo:
36+
work-dir: ${user.home}/.halo2
37+
external-url: http://localhost:8090
38+
attachment:
39+
resource-mappings:
40+
- pathPattern: /upload/**
41+
locations:
42+
- migrate-from-1.x
43+
distributed:
44+
enabled: true
45+
stream-key: halo:distributed:stream
46+
consumer-group: halo-consumer-group
47+
scheduler-lock-prefix: "halo:scheduler-lock:"
48+
listener-interval: 1000
49+
outbox-processor-interval: 5000

0 commit comments

Comments
 (0)