forked from allegro/ralph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (42 loc) · 1.21 KB
/
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
45
46
47
48
49
50
51
52
FROM ubuntu:14.04
MAINTAINER PyLabs pylabs@allegrogroup.com
# set UTF-8 locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# set paths
ENV RALPH_DIR=/opt/ralph
ENV RALPH_EXEC=ralph
ENV RALPH_LOGGING_FILE_PATH=/root/logs/runtime.log
ENV RALPH_STATIC=/root/static
ENV RALPH_DOCS=$RALPH_DIR/docs
ENV SCRIPTS_PATH=/root
ADD docker/* $SCRIPTS_PATH/
# basic provisioning
RUN $SCRIPTS_PATH/provision.sh
# npm provisioning
ADD package.json $RALPH_DIR/package.json
RUN $SCRIPTS_PATH/provision_js.sh
# cleanup
RUN apt-get clean
# install basic requirements
WORKDIR $RALPH_DIR
ADD requirements $RALPH_DIR/requirements
ADD Makefile $RALPH_DIR/Makefile
# don't install ralph now - only requirements
RUN sed -i '/\-e ./d' $RALPH_DIR/requirements/test.txt
# temporary - change to `make install-prod` finally
RUN make install-dev
# install JS dependencies
ADD src/ralph/admin/static $RALPH_DIR/src/ralph/admin/static
ADD src/ralph/static $RALPH_DIR/src/ralph/static
ADD gulpfile.js bower.json package.json $RALPH_DIR/
RUN $SCRIPTS_PATH/init_js.sh
# install ralph
ADD . $RALPH_DIR
RUN pip3 install -e .
RUN make docs
VOLUME $RALPH_DOCS
VOLUME $RALPH_STATIC
CMD $RALPH_EXEC runserver 0.0.0.0:8000