forked from sproutsocial/botanist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (26 loc) · 911 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
FROM python:2.7.14
ENV r=/botanist
RUN apt-get update && apt-get install -y \
git \
mercurial \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p \
${r}/bin \
${r}/repos \
${r}/repos/.index \
${r}/repos/bitbucket \
${r}/repos/github
ENV CSEARCHINDEX=${r}/repos/.index
ADD packages/codesearch-0.01-linux-amd64.tgz ${r}/bin
ADD packages/bitbucket-backup.tgz ${r}/bin
ADD packages/github_backup.py ${r}/bin
ADD cron/index.sh ${r}/bin/index.sh
ADD cron/fetch-code.sh ${r}/bin/fetch-code.sh
ADD webapp/requirements.txt /tmp
RUN pip install -r /tmp/requirements.txt
ADD ./webapp /code
VOLUME ${r}/repos
RUN groupadd -r botanist -g 9009 && useradd -u 9009 -g 9009 --no-log-init -r -g botanist botanist
RUN chown -R botanist:botanist ${r}
USER botanist
CMD uwsgi --socket :9090 --chdir /code --wsgi-file /code/codesearch/wsgi.py --master --processes 4 --threads 2 --buffer-size 65535