forked from mdn/kuma
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-base
More file actions
48 lines (38 loc) · 1.28 KB
/
Copy pathDockerfile-base
File metadata and controls
48 lines (38 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM quay.io/deis/base:0.3.0
ENV PYTHONDONTWRITEBYTECODE=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
# disable this when preparing for Django upgrade
ENV PYTHONWARNINGS=ignore
WORKDIR /app
EXPOSE 8000
RUN apt-get update && \
apt-get install -y --no-install-recommends python2.7 libpython2.7 python-dev \
python-pip gettext build-essential \
nodejs npm \
libtidy-0.99-0 libtidy-dev \
libxml2-dev libxslt1.1 libxslt1-dev \
libffi-dev \
libjpeg-dev \
libmagic-dev \
libmysqlclient-dev \
mysql-client # Only for local dev.
# bug 1301116
RUN pip install setuptools==26.1.1
RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
RUN npm install -g \
fibers@1.0.13 \
cssmin@0.4.3 \
csslint@0.10.0 \
jshint@2.7.0 \
stylus@0.49.2 \
uglify-js@2.4.13
ENV PIPELINE_CSS_COMPRESSOR=pipeline.compressors.cssmin.CSSMinCompressor \
PIPELINE_CSSMIN_BINARY=/usr/local/bin/cssmin \
PIPELINE_JS_COMPRESSOR=pipeline.compressors.uglifyjs.UglifyJSCompressor \
PIPELINE_UGLIFYJS_BINARY=/usr/local/bin/uglifyjs
COPY ./requirements /app/requirements
RUN pip install --no-cache-dir -r requirements/dev.txt
RUN useradd kuma
USER kuma
ENV WEB_CONCURRENCY=4
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--timeout=120", "kuma.wsgi:application"]