Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Metagenomics
metagenedb
Commits
abafaa3f
Commit
abafaa3f
authored
Mar 23, 2020
by
Kenzo-Hugo Hillion
♻
Browse files
add health check to local dev app
parent
ec567cd7
Changes
6
Hide whitespace changes
Inline
Side-by-side
backend/Pipfile
View file @
abafaa3f
...
...
@@ -66,6 +66,7 @@ celery = "*"
redis
=
"*"
django-health-check
=
"==3.0.0"
django-redis
=
"*"
kombu
=
"*"
[requires]
python_version
=
"3.7"
backend/Pipfile.lock
View file @
abafaa3f
{
"_meta"
:
{
"hash"
:
{
"sha256"
:
"
7a57302feb304e2e7a2b4eee0639908bbd8c66a0c5e86fc82c82f9dec0ed0af1
"
"sha256"
:
"
92db23f20aeda23e0c9540438d0a34f33d1d3a41422a09e9d721c98b6cb3b754
"
},
"pipfile-spec"
:
6
,
"requires"
:
{
...
...
@@ -214,6 +214,7 @@
"sha256:2d1cda774126a044d91a7ff5fa6d09edf99f46924ab332a810760fe6740e9b76"
,
"sha256:598e7e749d6ab54f646b74b2d2df67755dee13894f73ab02a2a9feb8870c7cb2"
],
"index"
:
"pypi"
,
"version"
:
"==4.6.8"
},
"markupsafe"
:
{
...
...
@@ -518,7 +519,7 @@
"sha256:5b26757dc6f79a3b7dc9fab95359328d5747fcb2409d331ea66d0272b90ab2a0"
,
"sha256:8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71"
],
"markers"
:
"platform
_system
== '
D
arwin'"
,
"markers"
:
"
sys_
platform == '
d
arwin'"
,
"version"
:
"==0.1.0"
},
"astroid"
:
{
...
...
@@ -664,10 +665,10 @@
},
"ipykernel"
:
{
"hashes"
:
[
"sha256:
7f1f01df22f1229c8879501057877ccaf92a3b01c1d00db708aad5003e5f923
8"
,
"sha256:
ba8c9e5561f3223fb47ce06ad7925cb9444337ac367341c0c520ffb68ea6d120
"
"sha256:
37c65d2e2da3326e5cf114405df6d47d997b8a3eba99e2cc4b75833bf71a5e1
8"
,
"sha256:
39746b5f7d847a23fae4eac893e63e3d9cc5f8c3a4797fcd3bfa8d1a296ec6ed
"
],
"version"
:
"==5.
1.4
"
"version"
:
"==5.
2.0
"
},
"ipython"
:
{
"hashes"
:
[
...
...
@@ -1178,11 +1179,11 @@
},
"wcwidth"
:
{
"hashes"
:
[
"sha256:
8fd29383f539be45b20bd4df0dc29c20ba48654a41e661925e612311e9f3c603
"
,
"sha256:
f28b3e8a6483e5d49e7f8949ac1a78314e740333ae305b4ba5defd3e74fb37a8
"
"sha256:
cafe2186b3c009a04067022ce1dcd79cb38d8d65ee4f4791b8888d6599d1bbe1
"
,
"sha256:
ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1
"
],
"index"
:
"pypi"
,
"version"
:
"==0.1.
8
"
"version"
:
"==0.1.
9
"
},
"webencodings"
:
{
"hashes"
:
[
...
...
backend/metagenedb/settings/django.py
View file @
abafaa3f
...
...
@@ -23,6 +23,15 @@ INSTALLED_APPS = [
'corsheaders'
,
'drf_yasg'
,
'django_admin_listfilter_dropdown'
,
# Running Health Checks
'health_check'
,
'health_check.db'
,
'health_check.cache'
,
'health_check.contrib.celery'
,
# Test Celery beat
'metagenedb.demoapp'
]
MIDDLEWARE
=
[
...
...
backend/metagenedb/urls.py
View file @
abafaa3f
...
...
@@ -40,4 +40,5 @@ urlpatterns = [
url
(
r
'^swagger(?P<format>\.json|\.yaml)$'
,
schema_view
.
without_ui
(
cache_timeout
=
0
),
name
=
'schema-json'
),
url
(
r
'^swagger/$'
,
schema_view
.
with_ui
(
'swagger'
,
cache_timeout
=
0
),
name
=
'schema-swagger-ui'
),
url
(
r
'^redoc/$'
,
schema_view
.
with_ui
(
'redoc'
,
cache_timeout
=
0
),
name
=
'schema-redoc'
),
url
(
r
'^ht/'
,
include
(
'health_check.urls'
)),
]
ci/kubernetes/redis.yaml
View file @
abafaa3f
...
...
@@ -15,7 +15,7 @@ spec:
pod
:
redis
spec
:
containers
:
-
name
:
master
-
name
:
redis-app
image
:
redis
resources
:
requests
:
...
...
nginx/dev/nginx.conf
View file @
abafaa3f
...
...
@@ -49,7 +49,7 @@ http {
}
# backend urls
location
~
^/(admin|api|swagger|redoc|static)
{
location
~
^/(admin|api|swagger|redoc|static
|ht
)
{
proxy_redirect
off
;
proxy_pass
http://backend
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment