Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
2bb8c473
Commit
2bb8c473
authored
7 years ago
by
John Gerlock
Browse files
Options
Downloads
Patches
Plain Diff
Add commit sha1 and docker tag to healthcheck route
parent
ed693cb9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+5
-0
5 additions, 0 deletions
Dockerfile
hive/server/serve.py
+3
-0
3 additions, 0 deletions
hive/server/serve.py
hooks/build
+8
-0
8 additions, 0 deletions
hooks/build
with
16 additions
and
0 deletions
Dockerfile
+
5
−
0
View file @
2bb8c473
...
@@ -5,6 +5,11 @@ ENV ENVIRONMENT DEV
...
@@ -5,6 +5,11 @@ ENV ENVIRONMENT DEV
ENV
LOG_LEVEL INFO
ENV
LOG_LEVEL INFO
ENV
LANG en_US.UTF-8
ENV
LANG en_US.UTF-8
ENV
LC_ALL en_US.UTF-8
ENV
LC_ALL en_US.UTF-8
ARG
SOURCE_COMMIT
ENV
SOURCE_COMMIT ${SOURCE_COMMIT}
ARG
DOCKER_TAG
ENV
DOCKER_TAG ${DOCKER_TAG}
ENV
APP_ROOT /app
ENV
APP_ROOT /app
ENV
WSGI_APP ${APP_ROOT}/hive/server/serve.py
ENV
WSGI_APP ${APP_ROOT}/hive/server/serve.py
ENV
HTTP_SERVER_PORT 8080
ENV
HTTP_SERVER_PORT 8080
...
...
This diff is collapsed.
Click to expand it.
hive/server/serve.py
+
3
−
0
View file @
2bb8c473
...
@@ -57,6 +57,9 @@ def health():
...
@@ -57,6 +57,9 @@ def health():
state
[
'
db_head_block
'
]))
state
[
'
db_head_block
'
]))
else
:
else
:
return
dict
(
return
dict
(
status
=
'
OK
'
,
source_commit
=
os
.
environ
.
get
(
'
SOURCE_COMMIT
'
),
docker_tag
=
os
.
environ
.
get
(
'
DOCKER_TAG
'
),
state
=
state
,
state
=
state
,
timestamp
=
datetime
.
utcnow
().
isoformat
())
timestamp
=
datetime
.
utcnow
().
isoformat
())
...
...
This diff is collapsed.
Click to expand it.
hooks/build
0 → 100644
+
8
−
0
View file @
2bb8c473
#!/bin/bash
echo
"
SOURCE_COMMIT: $SOURCE_COMMIT
"
if
[[
-
z
"
$SOURCE_COMMIT
"
]];
then
export
SOURCE_COMMIT
=
"
${SOURCE_COMMIT:-$(git rev-parse HEAD)}
"
echo
"
Updating SOURCE_COMMIT from git rev-parse HEAD
"
echo
"
SOURCE_COMMIT: $SOURCE_COMMIT
"
fi
docker
build
-
t
"
${IMAGE_NAME}
"
--
build
-
arg
SOURCE_COMMIT
=
"
${SOURCE_COMMIT}
"
--
build
-
arg
DOCKER_TAG
=
"
${DOCKER_TAG}
"
.
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