Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
django-docker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Evili del Rio
django-docker
Commits
5bfb6965
Commit
5bfb6965
authored
Feb 19, 2020
by
Evili del Rio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add django-health-checks
parent
7ff61947
Pipeline
#1793
canceled with stages
in 5 minutes and 20 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
Dockerfile
Dockerfile
+2
-0
environment_settings.py
environment_settings.py
+16
-0
health_urls.py
health_urls.py
+7
-0
No files found.
Dockerfile
View file @
5bfb6965
...
...
@@ -18,6 +18,7 @@ RUN apk update && \
${
dev_packages
}
&&
\
pip
install
gunicorn
\
"django
${
django_version
}
"
\
django-health-check
\
psycopg2-binary mysql-connector whitenoise[brotli]
&&
\
apk del
${
dev_packages
}
&&
\
apk add
${
lib_packages
}
&&
\
...
...
@@ -32,5 +33,6 @@ EXPOSE 5000/tcp
COPY
environment_settings.py /
COPY
entrypoint.sh /
COPY
health_urls.py /settings
ENTRYPOINT
["/entrypoint.sh"]
environment_settings.py
View file @
5bfb6965
...
...
@@ -61,3 +61,19 @@ if os.getenv('DJANGO_DATABASES', None) is None:
'PASSWORD'
:
os
.
getenv
(
'DJANGO_DATABASE_PASSWORD'
,
os
.
getenv
(
'POSTGRES_PASSWORD'
,
__PROJECT_NAME
)),
}
}
#
# Add django-health-check to INSTALLED_APPS
#
INSTALLED_APPS
.
extend
([
'health_check'
,
'health_check.db'
,
'health_check.cache'
,
'health_check.storage'
,
])
#
# Substitue ROOT_URLCONF to include health checks
#
PROJECT_ROOT_URLCONF
=
ROOT_URLCONF
ROOT_URLCONF
=
'health_urls'
health_urls.py
0 → 100644
View file @
5bfb6965
from
django.conf
import
settings
from
django.urls
import
path
,
include
urlpatterns
=
[
path
(
'health_checks'
,
include
(
'health_check.urls'
)),
path
(
''
,
include
(
settings
.
PROJECT_ROOT_URLCONF
)),
]
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