Commit 5807a435 authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch '16-build-docker-image' into 'master'

Added Dockerfile to build image from last stable build at https://jenkins.demo.genesys-pgr.org/

See merge request !3
parents b14cf407 74f5f10a
#
# Build Genesys server on top of jetty-alpine
#
FROM jetty:9.4-alpine
LABEL maintainer "Matija Obreza <matija.obreza@croptrust.org>"
ENV USER=jetty
ENV GENESYS_DATA=/data/genesys
ENV JETTY_BASE=/var/lib/jetty/
ENV GENESYS_WAR='https://jenkins.demo.genesys-pgr.org/job/genesys-server/lastStableBuild/org.genesys-pgr$genesys2-server/artifact/org.genesys-pgr/genesys2-server/2.0/genesys2-server-2.0.war'
WORKDIR ${JETTY_BASE}
RUN mkdir -p $GENESYS_DATA \
&& chown ${USER}.${USER} ${GENESYS_DATA}
# RUN echo 'Copying genesys-server webapps ...'
COPY webapps ${JETTY_BASE}/webapps
# RUN echo "Downloading ${GENESYS_WAR}"
ADD ${GENESYS_WAR} ${JETTY_BASE}/webapps/genesys2-server.war
# RUN echo 'Copying genesys.properties to ' ${JETTY_BASE}
COPY genesys.properties ${JETTY_BASE}/resources/genesys.properties
# list image contents
RUN chmod go+r ${JETTY_BASE}/webapps/genesys2-server.war \
&& find ${JETTY_BASE} -exec ls -la {} \;
VOLUME /data/genesys
#
# Basic genesys properties
# You should use envirnment variables to override Genesys configuration defaults
#
base.host=docker.local
base.hostname=${base.host}:8080
base.url=https://${base.hostname}
base.cookie-secure=true
base.cookie-http-only=true
robots.allow=false
db.url=jdbc:mysql://some-server/genesys?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
db.driverClassName=com.mysql.jdbc.Driver
db.username=genesys
db.password=
db.showSql=false
db.hbm2ddl=true
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
download.files.dir=/data/genesys/temp
file.repository.dir=/data/genesys/persistent/repository
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<!-- This web.xml format file is an override file that is applied to the test webapp AFTER
it has been configured by the default descriptor and the WEB-INF/web.xml descriptor -->
<!-- Add or override context init parameter -->
<!-- <context-param>
<param-name>spring.profiles.active</param-name>
<param-value>dev</param-value>
</context-param> -->
</web-app>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.eclipse.org/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/</Set>
<Set name="war"><Property name="jetty.webapps" default="."/>/genesys2-server.war</Set>
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="overrideDescriptor"><Property name="jetty.webapps" default="."/>/genesys2-server.d/override-web.xml</Set>
</Configure>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment