Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docker-django
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Evili del Rio i Silvan
docker-django
Commits
dd291e18
Commit
dd291e18
authored
6 years ago
by
Evili del Rio i Silvan
Browse files
Options
Downloads
Patches
Plain Diff
.- Correct entrypoint.sh
.- Add LOG_LEVEL environment variable .- Use python 3.6 for compatibility
parent
ec305129
No related branches found
No related tags found
No related merge requests found
Pipeline
#2142
failed
6 years ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.dockerignore
+1
-0
1 addition, 0 deletions
.dockerignore
Dockerfile
+3
-2
3 additions, 2 deletions
Dockerfile
entrypoint.sh
+7
-7
7 additions, 7 deletions
entrypoint.sh
with
11 additions
and
9 deletions
.dockerignore
+
1
−
0
View file @
dd291e18
Dockerfile
Dockerfile
.dockerignore
.dockerignore
README.md
This diff is collapsed.
Click to expand it.
Dockerfile
+
3
−
2
View file @
dd291e18
FROM
python:alpine
FROM
python:
3.6-
alpine
ARG
django_version=1.11
ARG
django_version=1.11
ARG
dev_packages="gcc g++ postgresql-dev"
ARG
dev_packages="gcc g++ postgresql-dev"
ADD
./entrypoint.sh /
ADD
./entrypoint.sh /
...
@@ -15,6 +15,7 @@ RUN apk update && \
...
@@ -15,6 +15,7 @@ RUN apk update && \
pip
install
"Django<=
${
DJANGO_VERSION
}
"
gunicorn
\
pip
install
"Django<=
${
DJANGO_VERSION
}
"
gunicorn
\
psycopg2-binary psycopg2 mysql-connector
\
psycopg2-binary psycopg2 mysql-connector
\
django-heroku whitenoise[brotli]
&&
\
django-heroku whitenoise[brotli]
&&
\
apk del
${
dev_packages
}
apk del
${
dev_packages
}
&&
\
rm
-fr
/root/.cache
ENTRYPOINT
[ "/entrypoint.sh" ]
ENTRYPOINT
[ "/entrypoint.sh" ]
This diff is collapsed.
Click to expand it.
entrypoint.sh
+
7
−
7
View file @
dd291e18
...
@@ -4,6 +4,11 @@ set -x
...
@@ -4,6 +4,11 @@ set -x
git clone
${
GIT_URL
}
.
git clone
${
GIT_URL
}
.
pip
install
-r
requirements.txt
--no-input
pip
install
-r
requirements.txt
--no-input
if
[
-z
"
${
WSGI_MODULE
}
"
]
then
export
WSGI_MODULE
=
$(
basename
$(
dirname
$(
find
.
-name
wsgi.py |
head
-1
)))
.wsgi
fi
DJANGO_SETTINGS_MODULE
=
${
DJANGO_SETTINGS_MODULE
:-
$(
basename
${
WSGI_MODULE
}
.wsgi
)
.settings
}
DJANGO_SETTINGS_MODULE
=
${
DJANGO_SETTINGS_MODULE
:-
$(
basename
${
WSGI_MODULE
}
.wsgi
)
.settings
}
# Override static content
# Override static content
...
@@ -17,10 +22,5 @@ export DJANGO_SETTINGS_MODULE=settings
...
@@ -17,10 +22,5 @@ export DJANGO_SETTINGS_MODULE=settings
python manage.py collectstatic
--no-input
python manage.py collectstatic
--no-input
python manage.py migrate
python manage.py migrate
LOG_LEVEL
=
${
LOG_LEVEL
:-
INFO
}
if
[
-z
"
${
WSGI_MODULE
}
"
]
gunicorn
--log-level
=
${
LOG_LEVEL
}
${
WSGI_MODULE
}
$*
then
export
WSGI_MODULE
=
$(
basename
$(
dirname
$(
find
.
-name
wsgi.py |
head
-1
)))
.wsgi
fi
gunicorn
--log-level
=
INFO
${
WSGI_MODULE
}
$*
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