Change mount dir of Halo container to ./halo2 (#258)

#### What this PR does / why we need it:

目前 Halo 容器挂载目录配置 `./:/root/.halo2` 容易让用户无意在 Halo 工作目录添加一些其他无关目录,例如:Nginx 也挂载到当前目录。这可能会导致无法正常使用备份功能。目前也无法预知未来可能会发生什么样的错误。


#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/4637

#### Does this PR introduce a user-facing change?

```release-note
修改 Halo 容器工作目录挂载目标目录为 ./halo2
```
wan92hen-patch-1
John Niang 1 year ago committed by GitHub
parent 587cd952d6
commit f1e2d27c8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -68,7 +68,7 @@ import DockerArgs from "./slots/docker-args.md"
networks: networks:
halo_network: halo_network:
volumes: volumes:
- ./:/root/.halo2 - ./halo2:/root/.halo2
ports: ports:
- "8090:8090" - "8090:8090"
healthcheck: healthcheck:
@ -126,7 +126,7 @@ import DockerArgs from "./slots/docker-args.md"
networks: networks:
halo_network: halo_network:
volumes: volumes:
- ./:/root/.halo2 - ./halo2:/root/.halo2
ports: ports:
- "8090:8090" - "8090:8090"
healthcheck: healthcheck:
@ -185,7 +185,7 @@ import DockerArgs from "./slots/docker-args.md"
container_name: halo container_name: halo
restart: on-failure:3 restart: on-failure:3
volumes: volumes:
- ./:/root/.halo2 - ./halo2:/root/.halo2
ports: ports:
- "8090:8090" - "8090:8090"
healthcheck: healthcheck:
@ -210,7 +210,7 @@ import DockerArgs from "./slots/docker-args.md"
restart: on-failure:3 restart: on-failure:3
network_mode: "host" network_mode: "host"
volumes: volumes:
- ./:/root/.halo2 - ./halo2:/root/.halo2
command: command:
# 修改为自己已有的 MySQL 配置 # 修改为自己已有的 MySQL 配置
- --spring.r2dbc.url=r2dbc:pool:mysql://localhost:3306/halo - --spring.r2dbc.url=r2dbc:pool:mysql://localhost:3306/halo
@ -342,7 +342,7 @@ services:
container_name: halo container_name: halo
restart: on-failure:3 restart: on-failure:3
volumes: volumes:
- ./:/root/.halo2 - ./halo2:/root/.halo2
networks: networks:
- traefik - traefik
- halo - halo

@ -100,7 +100,7 @@ services:
container_name: halo container_name: halo
restart: on-failure:3 restart: on-failure:3
volumes: volumes:
- ./:/root/.halo2 - ./halo2:/root/.halo2
networks: networks:
- traefik - traefik
- halo - halo

Loading…
Cancel
Save