Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webservice
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
masi9606
webservice
Commits
7af81375
Commit
7af81375
authored
1 year ago
by
gjahn
Browse files
Options
Downloads
Patches
Plain Diff
Allow to set version via environment variable
The version is displayed on the HTML-based landing page.
parent
497c5afc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configuration/config.go
+2
-0
2 additions, 0 deletions
configuration/config.go
routing/routes.go
+1
-1
1 addition, 1 deletion
routing/routes.go
with
3 additions
and
1 deletion
configuration/config.go
+
2
−
0
View file @
7af81375
...
...
@@ -12,6 +12,8 @@ const BODY_SIZE_LIMIT = 32 * 1024 * 1024 // 32 MB, in bytes
type
Config
struct
{
Version
string
`env:"VERSION" envDefault:"N/A"`
Environment
string
`env:"ENV_NAME" envDefault:"development"`
Host
string
`env:"HOST" envDefault:"127.0.0.1"`
Port
int16
`env:"PORT" envDefault:"3000"`
...
...
This diff is collapsed.
Click to expand it.
routing/routes.go
+
1
−
1
View file @
7af81375
...
...
@@ -34,7 +34,7 @@ func SetRoutes( router *f.App, config *configuration.Config, store state.Store,
}
data
:=
indexHtmlData
{
Version
:
""
,
Version
:
config
.
Version
,
Color
:
""
,
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment