mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-24 14:54:43 +08:00
feat: 修改nginx配置文件
This commit is contained in:
parent
6f7584b72d
commit
b8473096f8
3 changed files with 11 additions and 9 deletions
|
@ -1,12 +1,10 @@
|
|||
version: '3'
|
||||
services:
|
||||
nginx1.23.1:
|
||||
container_name: ${CONTAINER_NAME}
|
||||
image: nginx:1.23.1
|
||||
restart: always
|
||||
network_mode: host
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_HTTP}:80
|
||||
- ${PANEL_APP_PORT_HTTPS}:443
|
||||
volumes:
|
||||
- ./conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./log:/var/log/nginx
|
||||
|
|
|
@ -419,6 +419,11 @@ func copyAppData(key, version, installName string, params map[string]interface{}
|
|||
installDir := path.Join(constant.AppInstallDir, key)
|
||||
installVersionDir := path.Join(installDir, version)
|
||||
fileOp := files.NewFileOp()
|
||||
if fileOp.Stat(installVersionDir) {
|
||||
if err = fileOp.DeleteDir(installVersionDir); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
if err = fileOp.Copy(resourceDir, installVersionDir); err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -43,13 +43,12 @@ func InitDir() {
|
|||
constant.BackupDir = path.Join(constant.DefaultDataDir, "backup")
|
||||
constant.AppBackupDir = path.Join(constant.BackupDir, "apps")
|
||||
|
||||
dirs := []string{constant.DefaultDataDir, constant.ResourceDir, constant.AppResourceDir, constant.AppInstallDir, constant.BackupDir, constant.AppBackupDir}
|
||||
|
||||
fileOp := files.NewFileOp()
|
||||
createDir(fileOp, constant.DefaultDataDir)
|
||||
createDir(fileOp, constant.ResourceDir)
|
||||
createDir(fileOp, constant.AppResourceDir)
|
||||
createDir(fileOp, constant.AppInstallDir)
|
||||
createDir(fileOp, constant.BackupDir)
|
||||
createDir(fileOp, constant.AppBackupDir)
|
||||
for _, dir := range dirs {
|
||||
createDir(fileOp, dir)
|
||||
}
|
||||
}
|
||||
|
||||
func createDir(fileOp files.FileOp, dirPath string) {
|
||||
|
|
Loading…
Reference in a new issue