-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
97 lines (79 loc) · 3.47 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#
# Copyright © 2017 Logistimo.
#
# This file is part of Logistimo.
#
# Logistimo software is a mobile & web platform for supply chain management and remote temperature monitoring in
# low-resource settings, made available under the terms of the GNU Affero General Public License (AGPL).
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
# for more details.
#
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <http://www.gnu.org/licenses/>.
#
# You can be released from the requirements of the license by purchasing a commercial license. To know more about
# the commercial license, please contact us at opensource@logistimo.com
#
FROM tomcat:7-jre8
MAINTAINER dockers@logistimo.com
ARG warname
ENV TOMCAT_HOME /usr/local/tomcat
RUN rm -rf $TOMCAT_HOME/webapps/* \
&& apt-get update \
&& apt-get install -y gettext-base
ADD modules/web/target/$warname $TOMCAT_HOME/webapps/
RUN wget -P $TOMCAT_HOME/lib/ http://central.maven.org/maven2/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2.jar \
&& wget -P $TOMCAT_HOME/lib/ http://central.maven.org/maven2/redis/clients/jedis/2.5.2/jedis-2.5.2.jar \
&& wget -P $TOMCAT_HOME/lib/ http://central.maven.org/maven2/com/bluejeans/tomcat-redis-session-manager/2.0.0/tomcat-redis-session-manager-2.0.0.jar
ADD dockerfiles/context.xml $TOMCAT_HOME/conf/
RUN unzip -o $TOMCAT_HOME/webapps/$warname \
-d $TOMCAT_HOME/webapps/ROOT/ \
&& rm -rf $TOMCAT_HOME/webapps/$warname
ENV MYSQL_HOST_URL="jdbc:mariadb://localhost/logistimo?useUnicode=true&characterEncoding=UTF-8" \
MYSQL_USER=logistimo \
MYSQL_PASS=logistimo \
MYSQL_DATABASE=logistimo \
REDIS_HOST=localhost \
SENTINEL_HOST= \
SENTINEL_MASTER= \
HADOOP_HOST=localhost \
MEDIA_HOST_URL=http://localhost:50070/webhdfs/v1 \
ZKR_HOST=localhost:2181 \
LOGI_HOST=localhost \
ACTIVEMQ_HOST=tcp://localhost:61616 \
TASK_SERVER=true \
TASK_URL=http://localhost:8080 \
TASK_QUEUE_TYPE=simple \
TASK_EXPORT=true \
EMAIL_HOST=localhost \
EMAIL_PORT=25 \
EMAIL_FROMADDRESS=service@logistimo.com \
EMAIL_FROMNAME=Logistimo\ Service \
TASK_PORT=8080 \
CALLISTO_HOST_URL=http://localhost:8090 \
LOCAL_ENV=true \
JAVA_XMS=1024m \
JAVA_XMX=1024m \
LOC_URL=http://localhost:9090 \
APPROVAL_URL=http://localhost:6400 \
CON_MAX_IDLE=50 \
CON_MIX_IDLE=20 \
CON_MAX_ACTIVE=150 \
CON_MAX_WAIT=1000 \
CACHE_TYPE=none \
STATUS_FILE= \
JMX_AGENT_PORT=8088
ENV JAVA_OPTS $JAVA_OPTS
ENV WEB_APP_VER $WEB_APP_VER
RUN cd $TOMCAT_HOME && wget http://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.7/jmx_prometheus_javaagent-0.7.jar
ADD dockerfiles/jmx_exporter.json $TOMCAT_HOME/jmx_exporter.json
COPY dockerfiles/docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 8080-8090
CMD ["/docker-entrypoint.sh"]