修改1panel部署文档

This commit is contained in:
yaoyue 2025-01-14 14:12:17 +08:00
parent 9ae6fbaaa7
commit bcc478a829
3 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,46 @@
networks:
1panel-network:
driver: bridge
external: true
services:
web:
image: ghcr.io/cedar2025/xboard:new
volumes:
- ./.docker/.data/redis/:/data/
- ./.env:/www/.env
- ./.docker/.data/:/www/.docker/.data
- ./storage/logs:/www/storage/logs
- ./storage/theme:/www/storage/theme
environment:
- docker=true
depends_on:
- redis
# network_mode: host
networks:
- 1panel-network
command: php artisan octane:start --host=0.0.0.0 --port=7001
restart: on-failure
ports:
- 7001:7001
horizon:
image: ghcr.io/cedar2025/xboard:new
volumes:
- ./.docker/.data/redis/:/data/
- ./.env:/www/.env
- ./.docker/.data/:/www/.docker/.data
- ./storage/logs:/www/storage/logs
restart: on-failure
# network_mode: host
command: php artisan horizon
networks:
- 1panel-network
depends_on:
- redis
redis:
image: redis:7-alpine
command: redis-server --unixsocket /data/redis.sock --unixsocketperm 777 --save 900 1 --save 300 10 --save 60 10000
restart: unless-stopped
networks:
- 1panel-network
volumes:
- ./.docker/.data/redis:/data

View File

@ -62,11 +62,16 @@ apt update && apt install -y git
yum update && yum install -y git
# 克隆代码
git clone -b compose-new --depth 1 https://github.com/cedar2025/Xboard ./
git clone -b new --depth 1 https://github.com/cedar2025/Xboard ./
# 复制配置文件
cp .docker/onepanel/compose.sample.yaml compose.yaml
# 安装依赖并初始化
docker compose run -it --rm web php artisan xboard:install
```
> ⚠️ Mysql的连接地址需要使用1panel中Mysql菜单中连接信息里的容器连接地址而不是本地的localhost地址。
![示例图](./images/1panel_mysql.png)
> 安装时选择使用内置 Redis并输入之前创建的数据库信息
> 安装完成后请保存返回的后台地址和管理员账号密码

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB