Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
CTB
ctb-platform-backend-antigo
Commits
aaa645f5
Commit
aaa645f5
authored
6 years ago
by
Bruno Martin
Browse files
Options
Download
Email Patches
Plain Diff
update python version to 3.7; uses root user in containers on production; update nginx version
parent
e714cee2
develop
master
v0.5.1
v0.5.0
v0.4.0
v0.3.5
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.1
v0.2.0
v0.1.0
Pipeline
#7380
failed with stages
in 15 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
15 deletions
+3
-15
compose/local/django/Dockerfile
compose/local/django/Dockerfile
+1
-1
compose/production/Dockerfile
compose/production/Dockerfile
+2
-14
No files found.
compose/local/django/Dockerfile
View file @
aaa645f5
FROM
python:3.
6
FROM
python:3.
7
LABEL
mantainer "Hacklab <contato@hacklab.com.br>"
ENV
PYTHONUNBUFFERED 1
...
...
This diff is collapsed.
Click to expand it.
compose/production/Dockerfile
View file @
aaa645f5
FROM
python:3.
6
as django
FROM
python:3.
7
as django
LABEL
mantainer "Hacklab <contato@hacklab.com.br>"
ENV
PYTHONUNBUFFERED 1
# Ensure that the the internal user and
# group used by django have a known uid and gid
RUN
groupadd
-r
-g
999 django
\
&&
useradd
-r
-u
999
-g
django django
# Requirements have to be pulled and installed here, otherwise caching won't work
COPY
./requirements /requirements
...
...
@@ -15,32 +11,24 @@ RUN pip install --no-cache-dir -r /requirements/production.txt \
COPY
./compose/production/django/gunicorn.sh /gunicorn.sh
RUN
sed
-i
's/\r//'
/gunicorn.sh
RUN
chmod
+x /gunicorn.sh
RUN
chown
django /gunicorn.sh
COPY
./compose/production/django/entrypoint.sh /entrypoint.sh
RUN
sed
-i
's/\r//'
/entrypoint.sh
RUN
chmod
+x /entrypoint.sh
RUN
chown
django /entrypoint.sh
COPY
. /app
RUN
mkdir
/app/staticfiles
# env.example must be used during build to provide a valid environment
RUN
export
$(
cat
/app/env.example |
grep
-v
^# | xargs
)
&&
\
python /app/manage.py collectstatic
--noinput
RUN
chown
-R
django /app
USER
django
WORKDIR
/app
ENTRYPOINT
["/entrypoint.sh"]
CMD
["/gunicorn.sh"]
FROM
nginx:1.1
3
as nginx
FROM
nginx:1.1
6
as nginx
COPY
./compose/production/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY
--from=django /app/staticfiles/static/ /usr/share/nginx/html/static/
This diff is collapsed.
Click to expand it.
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