Adjust build process
This commit is contained in:
parent
99add9dbe2
commit
f64d5c2420
8 changed files with 31 additions and 6 deletions
2
internal/env/env.go
vendored
2
internal/env/env.go
vendored
|
@ -14,7 +14,7 @@ type Config struct {
|
|||
TimeZone string `env:"TZ" envDefault:"Etc/UTC" validate:"timezone"`
|
||||
Port int `env:"PORT" envDefault:"8080" validate:"min=1024,max=49151"`
|
||||
LogLevel string `env:"LOG_LEVEL" envDefault:"info" validate:"oneof=debug info warn error panic fatal"`
|
||||
Version string `env:"APP_VERSION" envDefault:"v0.0.0"`
|
||||
Version string `env:"VERSION" envDefault:"v0.0.0"`
|
||||
SwaggerHost string `env:"SWAGGER_HOST" envDefault:"https://cafe.test"`
|
||||
DB_Host string `env:"DB_HOST"`
|
||||
DB_User string `env:"DB_USER"`
|
||||
|
|
|
@ -75,13 +75,13 @@ func SetupRoutes(e *echo.Echo, ctrl *controller.Controller, env *env.Config) {
|
|||
health := api.Group("/health", authHeader)
|
||||
{
|
||||
health.GET("", func(ctx echo.Context) error {
|
||||
return ctx.String(http.StatusOK, ".")
|
||||
return ctx.String(http.StatusOK, env.Version)
|
||||
})
|
||||
}
|
||||
|
||||
if env.SwaggerHost != "" {
|
||||
docs.SwaggerInfo.Title = "Cafe"
|
||||
docs.SwaggerInfo.Description = "This is the backend of a cafe"
|
||||
docs.SwaggerInfo.Title = "Café Plätschwiesle"
|
||||
docs.SwaggerInfo.Description = "This is the backend of Café Plätschwiesle"
|
||||
docs.SwaggerInfo.Version = env.Version
|
||||
docs.SwaggerInfo.BasePath = "/api"
|
||||
parsed, _ := url.Parse(env.SwaggerHost)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue