forked from OHDSI/Broadsea-WebTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
69 lines (51 loc) · 2.66 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM tomcat:7-jre8
MAINTAINER Lee Evans - www.ltscomputingllc.com
# OHDSI WebAPI and web applications running in a Tomcat 7 server on Java JRE 8
# the WEBAPI_WAR argument is defaulted here to the WEBAPI war file for the required WebAPI release
# optionally override the war file url when building this container using: --build-arg WEBAPI_WAR=<webapi war file name>
ARG WEBAPI_WAR=WebAPI-2.3.0.war
ENV WEBAPI_RELEASE=2.3.0
# add a Tomcat server management web UI 'admin' user with default 'abc123' password!
COPY tomcat-users.xml /usr/local/tomcat/conf/
# install linux utilities and supervisor daemon
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
unzip \
supervisor \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# deploy the OHDSI WEBAPI and OHDSI web applications to the Tomcat server
# set working directory to the Tomcat server webapps directory
WORKDIR /usr/local/tomcat/webapps
# deploy the OHDSI WebAPI war file from the OHDSI CI Nexus repository
#ENV WEBAPI_WAR_URL=http://repo.ohdsi.org:8085/nexus/content/repositories/snapshots/org/ohdsi/WebAPI/1.0.0-SNAPSHOT/$WEBAPI_WAR
#RUN wget $WEBAPI_WAR_URL \
#&& mv /usr/local/tomcat/webapps/WebAPI*.war /usr/local/tomcat/webapps/WebAPI.war
COPY WebAPI-2.3.0.war /usr/local/tomcat/webapps/WebAPI.war
# deploy latest released OHDSI Atlas web application
RUN wget https://github.com/OHDSI/Atlas/archive/released.zip \
&& unzip /usr/local/tomcat/webapps/released.zip \
&& mv /usr/local/tomcat/webapps/Atlas-released /usr/local/tomcat/webapps/atlas \
&& rm -f released.zip
# deploy latest released OHDSI Penelope web application
RUN wget https://github.com/OHDSI/Penelope/archive/master.zip \
&& unzip /usr/local/tomcat/webapps/master.zip \
&& mv /usr/local/tomcat/webapps/Penelope-master /usr/local/tomcat/webapps/penelope \
&& rm -f master.zip
# create directories for optional jdbc drivers and the log files
RUN mkdir -p /tmp/drivers /var/log/supervisor
# Copy the starschema bigquery JDBC driver
COPY bqjdbc.jar /usr/local/tomcat/lib/
# Copy licenses
RUN mkdir -p /ohdsi-deployment
COPY LICENSE /ohdsi-deployment/Broadsea-Webtools.LICENSE
COPY starschema.LICENSE /ohdsi-deployment/
# install supervisord configuration file
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# install Atlas local configuration file
COPY config-local.js /usr/local/tomcat/webapps/atlas/js/
# install the bash shell deploy script that supervisord will run whenever the container is started
COPY deploy-script.sh /usr/local/tomcat/bin/
RUN chmod +x /usr/local/tomcat/bin/deploy-script.sh
# run supervisord to execute the deploy script (which also starts the tomcat server)
CMD ["/usr/bin/supervisord"]