forked from uishon/Sefaria-Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-web
34 lines (25 loc) · 915 Bytes
/
Dockerfile-web
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
FROM python:2.7
ENV PYTHONUNBUFFERED 1
ENV PYTHONPATH /www
ENV DJANGO_SETTINGS_MODULE sefaria.settings
RUN apt-get -y update \
&& apt-get -y upgrade \
&& apt-get install -y sqlite3 libsqlite3-dev gettext
RUN mkdir /db \
&& /usr/bin/sqlite3 /db/db.sqlite
RUN mkdir /www \
&& mkdir /www/log
# This assumes that code is already in ./Sefaria-Project
COPY ./Sefaria-Project /www/
COPY ./local_settings.py /www/sefaria/
WORKDIR /www
RUN pip install -r requirements.txt \
&& cp -R ./locale/en/LC_MESSAGES/ /usr/local/lib/python2.7/site-packages/django/conf/locale/en
ENV NVM_DIR /usr/local/nvm
# Install nvm with node and npm
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install node \
&& npm install \
&& cp ./node/local_settings_example.json ./node/local_settings.json \
&& npm run build