forked from arXiv/arxiv-browse
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
44 lines (34 loc) · 965 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# arxiv/browse
#
# Defines the runtime for the arXiv browse service, which provides the main
# UIs for browse.
FROM arxiv/base:0.16.7
ARG git_commit
WORKDIR /opt/arxiv
# remove conflicting mariadb-libs from arxiv/base
RUN yum remove -y mariadb-libs
# install MySQL
RUN yum install -y which mysql mysql-devel
RUN pip install uwsgi
# add python application and configuration
ENV PIPENV_VENV_IN_PROJECT 1
ADD app.py /opt/arxiv/
ADD Pipfile /opt/arxiv/
ADD Pipfile.lock /opt/arxiv/
RUN pip install -U pip pipenv
RUN pipenv sync
ENV PATH "/opt/arxiv:${PATH}"
ADD browse /opt/arxiv/browse
ADD tests /opt/arxiv/tests
ADD wsgi.py uwsgi.ini /opt/arxiv/
ADD bin/start_browse.sh /opt/arxiv/
RUN chmod +x /opt/arxiv/start_browse.sh
RUN echo $git_commit > /git-commit.txt
ENV LC_ALL en_US.utf8
ENV LANG en_US.utf8
ENV LOGLEVEL 40
ENV FLASK_DEBUG 1
ENV FLASK_APP /opt/arxiv/app.py
EXPOSE 8000
ENTRYPOINT ["pipenv", "run"]
CMD ["uwsgi", "--ini", "/opt/arxiv/uwsgi.ini"]