mirror of
https://gitee.com/goploy/goploy.git
synced 2024-12-01 19:57:34 +08:00
A repositoryPath
This commit is contained in:
parent
987b2b177a
commit
28b698adb2
@ -20,6 +20,7 @@ type Config struct {
|
|||||||
type APPConfig struct {
|
type APPConfig struct {
|
||||||
DeployLimit int32 `toml:"deployLimit"`
|
DeployLimit int32 `toml:"deployLimit"`
|
||||||
ShutdownTimeout time.Duration `toml:"shutdownTimeout"`
|
ShutdownTimeout time.Duration `toml:"shutdownTimeout"`
|
||||||
|
RepositoryPath string `toml:"repositoryPath"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CookieConfig struct {
|
type CookieConfig struct {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package core
|
package core
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/zhenorzz/goploy/config"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path"
|
"path"
|
||||||
@ -55,6 +56,9 @@ func GetConfigFile() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GetRepositoryPath() string {
|
func GetRepositoryPath() string {
|
||||||
|
if config.Toml.APP.RepositoryPath != "" {
|
||||||
|
return path.Join(config.Toml.APP.RepositoryPath, "repository")
|
||||||
|
}
|
||||||
return path.Join(GetAssetDir(), "repository")
|
return path.Join(GetAssetDir(), "repository")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ env = 'production'
|
|||||||
[app]
|
[app]
|
||||||
deployLimit = 8
|
deployLimit = 8
|
||||||
shutdownTimeout = 10
|
shutdownTimeout = 10
|
||||||
|
repositoryPath = ''
|
||||||
|
|
||||||
[cookie]
|
[cookie]
|
||||||
name = 'goploy_token'
|
name = 'goploy_token'
|
||||||
|
Loading…
Reference in New Issue
Block a user