remove codeberg default values

This commit is contained in:
crapStone 2023-11-17 23:49:18 +01:00
parent 96fb1bebd9
commit 7a58c97817
No known key found for this signature in database
GPG Key ID: D74B82E7CDD863FE
2 changed files with 3 additions and 6 deletions

View File

@ -29,26 +29,24 @@ var (
Name: "gitea-root", Name: "gitea-root",
Usage: "specifies the root URL of the Gitea instance, without a trailing slash.", Usage: "specifies the root URL of the Gitea instance, without a trailing slash.",
EnvVars: []string{"GITEA_ROOT"}, EnvVars: []string{"GITEA_ROOT"},
Value: "https://codeberg.org",
}, },
// GiteaApiToken specifies an api token for the Gitea instance // GiteaApiToken specifies an api token for the Gitea instance
&cli.StringFlag{ &cli.StringFlag{
Name: "gitea-api-token", Name: "gitea-api-token",
Usage: "specifies an api token for the Gitea instance", Usage: "specifies an api token for the Gitea instance",
EnvVars: []string{"GITEA_API_TOKEN"}, EnvVars: []string{"GITEA_API_TOKEN"},
Value: "",
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "enable-lfs-support", Name: "enable-lfs-support",
Usage: "enable lfs support, require gitea >= v1.17.0 as backend", Usage: "enable lfs support, require gitea >= v1.17.0 as backend",
EnvVars: []string{"ENABLE_LFS_SUPPORT"}, EnvVars: []string{"ENABLE_LFS_SUPPORT"},
Value: true, Value: false,
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "enable-symlink-support", Name: "enable-symlink-support",
Usage: "follow symlinks if enabled, require gitea >= v1.18.0 as backend", Usage: "follow symlinks if enabled, require gitea >= v1.18.0 as backend",
EnvVars: []string{"ENABLE_SYMLINK_SUPPORT"}, EnvVars: []string{"ENABLE_SYMLINK_SUPPORT"},
Value: true, Value: false,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "default-mime-type", Name: "default-mime-type",
@ -72,7 +70,6 @@ var (
Name: "pages-domain", Name: "pages-domain",
Usage: "specifies the main domain (starting with a dot) for which subdomains shall be served as static pages", Usage: "specifies the main domain (starting with a dot) for which subdomains shall be served as static pages",
EnvVars: []string{"PAGES_DOMAIN"}, EnvVars: []string{"PAGES_DOMAIN"},
Value: "codeberg.page",
}, },
// RawDomain specifies the domain from which raw repository content shall be served in the following format: // RawDomain specifies the domain from which raw repository content shall be served in the following format:
// https://{RawDomain}/{owner}/{repo}[/{branch|tag|commit}/{version}]/{filepath...} // https://{RawDomain}/{owner}/{repo}[/{branch|tag|commit}/{version}]/{filepath...}
@ -81,7 +78,6 @@ var (
Name: "raw-domain", Name: "raw-domain",
Usage: "specifies the domain from which raw repository content shall be served, not set disable raw content hosting", Usage: "specifies the domain from which raw repository content shall be served, not set disable raw content hosting",
EnvVars: []string{"RAW_DOMAIN"}, EnvVars: []string{"RAW_DOMAIN"},
Value: "raw.codeberg.page",
}, },
// ######################### // #########################

View File

@ -45,6 +45,7 @@ func startServer(ctx context.Context) error {
setEnvIfNotSet("HTTP_PORT", "8880") setEnvIfNotSet("HTTP_PORT", "8880")
setEnvIfNotSet("ENABLE_HTTP_SERVER", "true") setEnvIfNotSet("ENABLE_HTTP_SERVER", "true")
setEnvIfNotSet("DB_TYPE", "sqlite3") setEnvIfNotSet("DB_TYPE", "sqlite3")
setEnvIfNotSet("GITEA_ROOT", "https://codeberg.org")
app := cli.NewApp() app := cli.NewApp()
app.Name = "pages-server" app.Name = "pages-server"