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