Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/guide/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ server {
docker run \
-it -d \
--name halo-1 \
--stop-timeout 120 \
-p 8090:8090 \
-v ~/.halo2:/root/.halo2 \
registry.fit2cloud.com/halo/halo-pro:2.27 \
Expand All @@ -104,6 +105,7 @@ docker run \
docker run \
-it -d \
--name halo-2 \
--stop-timeout 120 \
-p 8091:8090 \
-v ~/.halo2_2:/root/.halo2 \
registry.fit2cloud.com/halo/halo-pro:2.27 \
Expand Down
6 changes: 4 additions & 2 deletions docs/guide/install/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,14 @@ Halo 付费版在 2.16 中新增了集成 Redis 的功能,目前提供将用

Docker Compose 配置片段如下:

```yaml {25-32}
```yaml {26-33}
version: "3"

services:
halo:
image: registry.fit2cloud.com/halo/halo-pro:2.27
restart: on-failure:3
stop_grace_period: 120s
depends_on:
halodb:
condition: service_healthy
Expand Down Expand Up @@ -192,13 +193,14 @@ networks:

如果你是使用的 Docker Compose 部署 Halo,并且希望将 Redis 服务编排在一起,以下是配置示例:

```yaml {26-33,37-44}
```yaml {27-34,38-45}
version: "3"

services:
halo:
image: registry.fit2cloud.com/halo/halo-pro:2.27
restart: on-failure:3
stop_grace_period: 120s
depends_on:
halodb:
condition: service_healthy
Expand Down
15 changes: 10 additions & 5 deletions docs/guide/install/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ mkdir ~/halo && cd ~/halo
<Tabs>
<Tab value="halo-postgresql" label="Halo + PostgreSQL(推荐)">

```yaml {25-31,45} title="~/halo/docker-compose.yaml"
```yaml {26-32,46} title="~/halo/docker-compose.yaml"
services:
halo:
image: registry.fit2cloud.com/halo/halo-pro:2.27
restart: on-failure:3
stop_grace_period: 120s
depends_on:
halodb:
condition: service_healthy
Expand Down Expand Up @@ -107,11 +108,12 @@ networks:
</Tab>
<Tab value="halo-mysql" label="Halo + MySQL">

```yaml {25-31,53} title="~/halo/docker-compose.yaml"
```yaml {26-32,54} title="~/halo/docker-compose.yaml"
services:
halo:
image: registry.fit2cloud.com/halo/halo-pro:2.27
restart: on-failure:3
stop_grace_period: 120s
depends_on:
halodb:
condition: service_healthy
Expand Down Expand Up @@ -178,11 +180,12 @@ networks:
不推荐在生产环境使用默认的 H2 数据库,这可能因为操作不当导致数据文件损坏。如果因为某些原因(如内存不足以运行独立数据库)必须要使用,建议按时[备份数据](../../guide/use/backup.md)。
:::

```yaml {21} title="~/halo/docker-compose.yaml"
```yaml {22} title="~/halo/docker-compose.yaml"
services:
halo:
image: registry.fit2cloud.com/halo/halo-pro:2.27
restart: on-failure:3
stop_grace_period: 120s
volumes:
- ./halo2:/root/.halo2
ports:
Expand All @@ -205,11 +208,12 @@ services:
</Tab>
<Tab value="external-db" label="使用外部数据库">

```yaml {5,13-20} title="~/halo/docker-compose.yaml"
```yaml {6,14-21} title="~/halo/docker-compose.yaml"
services:
halo:
image: registry.fit2cloud.com/halo/halo-pro:2.27
restart: on-failure:3
stop_grace_period: 120s
network_mode: "host"
volumes:
- ./halo2:/root/.halo2
Expand Down Expand Up @@ -345,7 +349,7 @@ reverse_proxy 127.0.0.1:8090
3. 修改外部地址为你的域名
4. 声明路由规则、开启 TLS

```yaml {2-3,14,18,23-29}
```yaml {2-3,15,19,24-30}
networks:
traefik:
external: true
Expand All @@ -355,6 +359,7 @@ services:
halo:
image: registry.fit2cloud.com/halo/halo-pro:2.27
restart: on-failure:3
stop_grace_period: 120s
volumes:
- ./halo2:/root/.halo2
networks:
Expand Down
5 changes: 3 additions & 2 deletions docs/guide/install/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import DockerRegistryList from "./slots/_docker-registry-list.md";
### 创建容器

```bash
docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 -e JVM_OPTS="-Xmx256m -Xms256m" registry.fit2cloud.com/halo/halo-pro:2.27
docker run -it -d --name halo --stop-timeout 120 -p 8090:8090 -v ~/.halo2:/root/.halo2 -e JVM_OPTS="-Xmx256m -Xms256m" registry.fit2cloud.com/halo/halo-pro:2.27
```

:::info 默认使用 H2 数据库
Expand All @@ -44,6 +44,7 @@ docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 -e JVM_OPTS=
- **--name**:为容器指定一个名称
- **-p**:端口映射,格式为 `主机(宿主)端口:容器端口` ,可在 `application.yaml` 配置。
- **-v**:工作目录映射。形式为:`-v 宿主机路径:/root/.halo2`,后者不能修改。
- **--stop-timeout**:停止容器时的超时时间(秒)。Halo 停止时需要时间完成插件停止和索引快照保存,建议设置为 `120`。

运行参数详解:

Expand Down Expand Up @@ -93,7 +94,7 @@ docker rm halo
修改版本号后,按照最初安装的方式,重新创建容器即可。

```bash
docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 -e JVM_OPTS="-Xmx256m -Xms256m" registry.fit2cloud.com/halo/halo-pro:2.27
docker run -it -d --name halo --stop-timeout 120 -p 8090:8090 -v ~/.halo2:/root/.halo2 -e JVM_OPTS="-Xmx256m -Xms256m" registry.fit2cloud.com/halo/halo-pro:2.27
```

</Steps>
9 changes: 5 additions & 4 deletions docs/guide/install/podman.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Podman 采用无守护进程的包容性架构,因此可以更安全、更简

```bash
mkdir -p ~/.halo2
podman run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2:Z registry.fit2cloud.com/halo/halo-pro:2.27
podman run -it -d --name halo --stop-timeout 120 -p 8090:8090 -v ~/.halo2:/root/.halo2:Z registry.fit2cloud.com/halo/halo-pro:2.27
```

:::info 默认使用 H2 数据库
Expand All @@ -74,6 +74,7 @@ podman run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2:Z registry.f
- **--name**:为容器指定一个名称
- **-p**:端口映射,格式为 `主机(宿主)端口:容器端口` ,可在 `application.yaml` 配置。
- **-v**:工作目录映射。形式为:`-v 宿主机路径:/root/.halo2`,后者不能修改。
- **--stop-timeout**:停止容器时的超时时间(秒)。Halo 停止时需要时间完成插件停止和索引快照保存,建议设置为 `120`。

运行参数详解:

Expand Down Expand Up @@ -123,7 +124,7 @@ podman rm halo
修改版本号后,按照最初安装的方式,重新创建容器即可。

```bash
podman run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2:Z registry.fit2cloud.com/halo/halo-pro:2.27
podman run -it -d --name halo --stop-timeout 120 -p 8090:8090 -v ~/.halo2:/root/.halo2:Z registry.fit2cloud.com/halo/halo-pro:2.27
```

</Steps>
Expand Down Expand Up @@ -168,7 +169,7 @@ Exec=--halo.external-url=https://localhost:8090 --spring.sql.init.platform=postg
Restart=always
RestartSec=30s
TimeoutStartSec=900
TimeoutStopSec=70
TimeoutStopSec=120

[Install]
WantedBy=multi-user.target default.target
Expand Down Expand Up @@ -238,7 +239,7 @@ Exec=--halo.external-url=https://localhost:8090 --spring.sql.init.platform=postg
Restart=always
RestartSec=30s
TimeoutStartSec=900
TimeoutStopSec=70
TimeoutStopSec=120

[Install]
WantedBy=multi-user.target default.target
Expand Down
Loading