🟠 Docker version simplifies the important description of the mount directory | docker版本简化挂载目录的重要说明 #98
hslr-s
announced in
Announcements
Replies: 1 comment 1 reply
-
custom目录是否也迁移到了新路径? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[English]
Starting from
v1.4.0-beta24-02-20
, simplifications have been made to the mounting directories for the Docker version. Now, only one mount command is needed when running:-v ~/xxx/sun-panel/conf:/app/conf
(Replace~/xxx/sun-panel/conf
with your actual directory). Upgrading from older versions will not be affected (on the premise of retaining thev1.3.0
and the previous version configuration file and directory); the original configuration file directory will be maintained. You can refer to your configuration file ./conf/conf.ini for specifics.🍔Implementation principle
The method of rectification this time is judged by the operation environment. If for the Docker environment, some of the mounting directory will be set in the configuration file when generating configuration files
🏖️New version deployment command
(Only new deployment, please continue to look down on upgrading deployment)
After simplifying, you only need to mount a
conf
directory:docker run -d --restart=always -p 3002:3002 \ -v ~/docker_data/sun-panel/conf:/app/conf \ --name sun-panel \ hslr/sun-panel:1.4.0-beta24-02-20
🌭The old version is upgraded to the new mounting method
If existing users wish to use the new directory mounting method (This is a testing feature, please backup your data before making any changes❗), they need to manually move the
uploads
anddatabase
directories to theconf
directory, then delete the configuration file./conf/conf.ini
. Running Sun-Panel again will automatically generate it according to the rules.For specific backup instructions, you can refer to the command I just tested:
[中文]
从
v1.4.0-beta24-02-20
开始,对docker版本的挂载目录进行了简化,运行的时候仅需一条挂载命令-v ~/xxx/sun-panel/conf:/app/conf
(此处~/xxx/sun-panel/conf
请按照你的实际目录进行修改)。老版本升级不受影响(在保留v1.3.0
及之前版本配置文件和目录的前提下),仍保持原有的配置文件目录,具体可以参考你的配置文件./conf/conf.ini。🍔实现原理
此次整改的方式,通过运行环境判断,如果为docker环境,在生成配置文件的时候会将部分挂载的目录在配置文件中就设定为以下新的方式
🏖️新版本部署命令
(仅限全新部署,升级部署请继续向下看)
简化后,只需要挂载一个
conf
目录:docker run -d --restart=always -p 3002:3002 \ -v ~/docker_data/sun-panel/conf:/app/conf \ --name sun-panel \ hslr/sun-panel:1.4.0-beta24-02-20
🌭旧版本升级到新的挂载方式
如果老用户想使用新的目录挂载方式(此为测试功能,修改前请备份数据❗),请手动将
uploads
,database
目录移动到conf
目录下,然后删除配置文件./conf/conf.ini
,再次运行Sun-Panel会自动按照规则生成具体备份可以参考我刚刚测试用的命令:
Beta Was this translation helpful? Give feedback.
All reactions