forked from longguikeji/arkid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (26 loc) · 789 Bytes
/
Dockerfile
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
FROM python:3.6 as build_deps
EXPOSE 80
WORKDIR /var/oneid
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
vim supervisor gettext xmlsec1 \
python-dev default-libmysqlclient-dev
ADD devops/pip.conf /etc/pip.conf
ADD requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
FROM build_deps as run_lint
ADD requirements-dev.txt ./
RUN pip install --no-cache-dir -r requirements-dev.txt
ADD . .
ARG base_commit_id=""
RUN pre-commit install \
&& make BASE_COMMIT_ID=${base_commit_id} lint
FROM build_deps as run_test
ADD . .
RUN make test
FROM build_deps as build
RUN pip install uwsgi mysqlclient==1.4.6
ADD . .
COPY uwsgi.ini /etc/uwsgi/uwsgi.ini
RUN python manage.py compilemessages
CMD python manage.py migrate && supervisord