-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-web
77 lines (63 loc) · 2.31 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM python:3.6.8
MAINTAINER TwoRavens http://2ra.vn/
LABEL organization="Two Ravens" \
2ra.vn.version="0.0.9-alpha" \
2ra.vn.release-date="2019-11-05" \
description="Web service for preprocessing tabular data"
# -------------------------------------
# Install debugging tools
# -------------------------------------
RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-utils\
iputils-ping \
telnet \
vim
# -------------------------------------
# Set the workdir
# -------------------------------------
WORKDIR /var/webapps/raven-metadata-service
# -------------------------------------
# Copy over the requirements and run them
# -------------------------------------
COPY ./requirements/ ./requirements
RUN pip3 install --no-cache-dir -r requirements/30_preprocess_web.txt
# -------------------------------------
# Create a volume for sharing between containers
# -------------------------------------
VOLUME /raven_metadata
# -------------------------------------
# Expose port for web communication
# - web: 8080
# -------------------------------------
EXPOSE 8080
# -------------------------------------
# Set env variables
# -------------------------------------
ENV DJANGO_SETTINGS_MODULE=ravens_metadata.settings.local_settings \
R_SCRIPT_PATH=/usr/bin/Rscript
# -------------------------------------
# Copy over the rest of the repository
# -------------------------------------
COPY . .
# -------------------------------------
# Copy the metadata web server start command +
# preprocess script
# -------------------------------------
COPY startup_scripts/metadata_start.sh /usr/bin/metadata_start.sh
COPY preprocess/scripts/preprocess_file.sh /usr/bin/preprocess_file.sh
RUN chmod u+x /usr/bin/metadata_start.sh && \
chmod u+x /usr/bin/preprocess_file.sh
# -------------------------------------
# Update the working directory
# -------------------------------------
WORKDIR /var/webapps/raven-metadata-service/preprocess_web/code
# -------------------------------------
# Run preprocess against the entry point input param
# -------------------------------------
#ENTRYPOINT ["/usr/bin/preprocess_file.sh"]
CMD echo 'Starting preprocess web server.' && \
fab init_db && \
python manage.py runserver 0.0.0.0:8080
#RUN cd preprocess && \
# python preprocess.py