add config file and rework cli parsing and passing of config values#263

Merged
6543 merged 20 commits from feature/add-config-file into main 2024-02-15 17:08:31 +01:00
Owner
No description provided.
crapStone added this to the v6.0 milestone 2023-11-17 16:22:16 +01:00
cli/flags.go Outdated
@ -0,0 +129,4 @@
Name: "config-file",
Usage: "specify the location of the config file",
Aliases: []string{"config"},
EnvVars: []string{"CONFIG_FILE"},
Contributor

add default mime type and allowd mime types

add default mime type and allowd mime types
crapStone marked this conversation as resolved
@ -0,0 +8,4 @@
mainDomain = 'codeberg.page'
rawDomain = 'raw.codeberg.page'
allowedCorsDomains = ['fonts.codeberg.org', 'design.codeberg.org']
blacklistedPaths = []
Contributor

defailt & allowed mime

defailt & allowed mime
crapStone marked this conversation as resolved
config/setup.go Outdated
@ -0,0 +67,4 @@
}
if ctx.IsSet("blacklisted-paths") {
config.BlacklistedPaths = ctx.StringSlice("blacklisted-paths")
}
Contributor

as above - I mime it

as above - I mime it
crapStone marked this conversation as resolved
@ -0,0 +22,4 @@
return nil, fmt.Errorf("%w: ACME_EAB_KID also needs ACME_EAB_HMAC to be set", ErrAcmeMissConfig)
}
return certificates.NewAcmeClient(
Contributor

pass cfg down :)

pass cfg down :)
crapStone marked this conversation as resolved
@ -3,3 +3,3 @@
import "time"
type SetGetKey interface {
type ICache interface {
Contributor

add godoc

add godoc
crapStone marked this conversation as resolved
crapStone force-pushed feature/add-config-file from 7ba8c579e0
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/pr/woodpecker Pipeline failed
to 81e980ce13
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
2023-11-17 22:47:17 +01:00
Compare
crapStone force-pushed feature/add-config-file from 9c23608153
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
to 4d760d9a9d
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
2023-11-17 22:55:08 +01:00
Compare
remove codeberg default values
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
7a58c97817
fix integration test
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2238a57801
add test to override values from config when args are present
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
5ed4ca2500
fix tests
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
7b3a09d8ac
WIP
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
4a6f56b44b
Merge branch 'main' into feature/add-config-file
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
fc480bfb45
fix lints
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
6bf6f621b4
crapStone changed title from WIP: add config file and rework cli parsing and passing of config values to add config file and rework cli parsing and passing of config values 2024-01-18 21:36:16 +01:00
Merge branch 'main' into feature/add-config-file
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
bdd62b7453
crapStone requested review from 6543 2024-01-18 21:36:24 +01:00
@ -0,0 +1,11 @@
ACME_API=https://acme.mock.directory
ACME_ACCEPT_TERMS=true
PAGES_DOMAIN=localhost.mock.directory
RAW_DOMAIN=raw.localhost.mock.directory
Contributor

wasnt raw removed?

wasnt raw removed?
6543 marked this conversation as resolved
.env-dev Outdated
@ -0,0 +5,4 @@
PAGES_BRANCHES=pages,master,main
GITEA_ROOT=https://codeberg.org
PORT=4430
HTTP_PORT=1234
Contributor

8880 ... or change readme too ...

8880 ... or change readme too ...
Author
Owner

there isn't anything in the README

there isn't anything in the README
6543 marked this conversation as resolved
@ -0,0 +23,4 @@
type GiteaConfig struct {
Root string
Token string
LFSEnabled bool `default:"false"`
Contributor

default true ... as with default env var

default true ... as with default env var
Author
Owner

the env var is also false

the env var is also false
6543 marked this conversation as resolved
crapStone force-pushed feature/add-config-file from 91825492a3
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
to 75efaae21a
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2024-02-05 20:35:18 +01:00
Compare
6543 approved these changes 2024-02-15 17:03:24 +01:00
6543 left a comment
Contributor

nice

nice
Merge branch 'main' into feature/add-config-file
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
b85194cded
6543 merged commit 7e80ade24b into main 2024-02-15 17:08:31 +01:00
6543 deleted branch feature/add-config-file 2024-02-15 17:08:32 +01:00
Sign in to join this conversation.
No description provided.