Docker image to run the Konakart Community Edition J2EE tomcat application server exposing JMX to Prometheus exporter metrics and java options as env. variables.
Konakart Community Edition : a java based shopping cart software solution for online retailers. https://www.konakart.com/.
JMX to Prometheus exporter: a collector that can configurably scrape and expose mBeans of a JMX target. https://github.com/prometheus/jmx_exporter
The version number of this images is composed of 3 version numbers:
- the first is the version of the Konakart Community Edition
- the second is the JVM
- the third is the img version itself
konakart_as_tomcat
- Find Images of this repo on docker hub
- Find repo of these images on github
In addition to the standard Konakart Community Edition tomcat set-up:
- JMX to Prometheus exporter metrics on port 9404
- JVM_OPTS as env. variable
- a set of env. variables to ease the database configuration
- Konakart Community Edition 9600, Java 17, Tomcat 9.0.31.0, JMX to Prometheus exporter 0.18, db connection parameters via env. variables
latest
,9.6.0.0-17-0.2
- Konakart Community Edition 9600, Java 11, Tomcat 9.0.31.0, JMX to Prometheus exporter 0.18, db connection parameters via env. variables
9.6.0.0-11-0.2
- Konakart Community Edition 9401, Java 11 hotspot, Tomcat 9.0.31.0, JMX to Prometheus exporter 0.15, db connection parameters via env. variables
9.4.0.1-java11-0.1
- Konakart Community Edition 9401, Java 11 openj9, Tomcat 9.0.31.0, JMX to Prometheus exporter 0.15, db connection parameters via env. variables
9.4.0.1-java11-openj9-0.1
- Konakart Community Edition 9401, Java 8 hotspot, Tomcat 9.0.31.0, JMX to Prometheus exporter 0.15, db connection parameters via env. variables
9.4.0.1-java8-0.1
- Konakart Community Edition 9401, Java 8 openj9, Tomcat 9.0.31.0, JMX to Prometheus exporter 0.15, db connection parameters via env. variables
9.4.0.1-java8-openj9-0.1
- Konakart Community Edition 9401, Java 11 hotspot, Tomcat 9.0.31.0, JMX to Prometheus exporter 0.15, db connection parameters via file mount
9.4.0.1-java11
- Konakart Community Edition 9401, Java 11 openj9, Tomcat 9.0.31.0, JMX to Prometheus exporter 0.15, db connection parameters via file mount
9.4.0.1-java11-openj9
- Konakart Community Edition 9401, Java 8 hotspot, Tomcat 9.0.31.0, JMX to Prometheus exporter 0.15, db connection parameters via file mount
9.4.0.1-java8
- Konakart Community Edition 9401, Java 8 openj9, Tomcat 9.0.31.0, JMX to Prometheus exporter 0.15, db connection parameters via file mount
9.4.0.1-java8-openj9
The Konakart Community Edition provided in this image requires an external database to be executed that can be easily connected thanks to the dedicated env. variables.
To ease the Konakart deployment this repo provides the following pre-configure database images (konakart demo data):
konakart_db_mysql
: Konakart Community Edition database running on MySQL, additional info herekonakart_db_postgres
: Konakart Community Edition database running on PosgreSQL, additional info here
Custom JVM_OPTS
can be set using the JAVA_OPTS
env. variable (dafeult "-Xmx1400m -Xms400m")
By default this image uses the following database connections parameters:
torque.database.store1.adapter=mysql
torque.dsfactory.store1.connection.driver=com.mysql.jdbc.Driver
torque.dsfactory.store1.connection.url=jdbc:mysql://konakart_db_mysql:3306/konakart?zeroDateTimeBehavior\=convertToNull\&useSSL\=false
torque.dsfactory.store1.connection.user=konakart
torque.dsfactory.store1.connection.password=konakart
that are intended to be used for an OOB deployment based on the chiabre/konakart_db_mysql
image
docker network create -d overlay --attachable konakart
docker run --rm -d --name konakart_db_mysql --net konakart -p 3306:3306/tcp chiabre/konakart_db_mysql
docker run --rm -d --name konakart_as --net konakart -p 9404:9404/tcp -p 8780:8780/tcp chiabre/konakart_as_tomcat
to modify one of the connections parameter refer to the custom database section
To use the konakart_db_postgres
img add the env. variables DB_ADAPTER="postgresql"
,DB_DRIVER="org.postgresql.Driver"
, and DB_URL="jdbc:postgresql://konakart_db_postgres:5432/konakart"
to the docker run command as in the following example
docker network create -d overlay --attachable konakart
docker run --rm -d --name konakart_db_postgres --net konakart -p 5432:5432/tcp chiabre/konakart_db_postgres
docker run --rm -d --name konakart_as --net konakart -e DB_ADAPTER="postgresql" -e DB_DRIVER="org.postgresql.Driver" -e DB_URL="jdbc:postgresql://konakart_db_postgres:5432/konakart" -p 9404:9404/tcp -p 8780:8780/tcp chiabre/konakart_as_tomcat
As per [Konakart documentation] (https://www.konakart.com/docs/DatabaseNotes.html) the database connection parameters are managed in the konakart.properties
and konakartadmin.properties
files.
Changes to the default configuration can be managed via the following env. variables:
DB_ADAPTER
DB_DRIVER
DB_URL
DB_USER
DB_PWD
that will be applied in the konakart.properties
and konakartadmin.properties
files as follow:
torque.database.store1.adapter = ${env:DB_ADAPTER}
torque.dsfactory.store1.connection.driver = ${env:DB_DRIVER}
torque.dsfactory.store1.connection.url = ${env:DB_URL}
torque.dsfactory.store1.connection.user = ${env:DB_USER}
torque.dsfactory.store1.connection.password= ${env:DB_PWD}
Konakart store ui will be available on port 8780
:
- http://[KONAKART_SERVER]:8780
Prometheus JMX exporter metrics will be available on port 9404
:
- http://[KONAKART_SERVER]:9404/metrics/
Konakart admin ui will be available at the following url:
- http://[KONAKART_SERVER]:8780/konakartadmin/
(login using "admin@konakart.com" as the username and "princess" as the password)
The Konakart Community Edition provided in this image requires an external database to be executed.
To ease the Konakart deployment this repo provides 2 database images:
konakart_db_mysql
: Konakart Community Edition database running on MySQL, additional info herekonakart_db_postgres
: Konakart Community Edition database running on PosgreSQL, additional info here
To use custom the JVM_OPTS
use the JAVA_OPTS
ENV. variable
By default this image uses the following database connections parameters:
- url =
jdbc:mysql://konakart_db_mysql:3306/konakart?zeroDateTimeBehavior=convertToNull&useSSL=false
- user =
konakart
- password =
konakart
that are intended to be used for an OOB deployment based on the following deployment options
docker run --rm -d --name konakart_db_mysql -p 3306:3306/tcp chiabre/konakart_db_mysql
docker run --rm -d --name konakart_as -p 9404:9404/tcp -p 8780:8780/tcp chiabre/konakart_as_tomcat
docker run --rm -d --name konakart_db_postgres -p 5432:5432/tcp chiabre/konakart_db_postgres
docker run --rm -d --name konakart_as -v ${PWD}/postgres/konakartadmin.properties:/opt/konakart/webapps/konakartadmin/WEB-INF/classes/konakartadmin.properties -v ${PWD}/postgres/konakart.properties:/opt/konakart/webapps/konakart/WEB-INF/classes/konakart.properties -p 9404:9404/tcp -p 8780:8780/tcp chiabre/konakart_as_tomcat
To connect to a different database:
- set- as per [Konakart documentation] (https://www.konakart.com/docs/DatabaseNotes.html) - the connections parameters in the
konakart.properties
andkonakartadmin.properties
files (samples of MySQL and postreSQL configurations provided the mysql and posgres folders). - mount the 2 files in the following directories:
konakart.properties
->/opt/konakart/webapps/konakartadmin/WEB-INF/classes/konakartadmin.properties
konakartadmin.properties
->/opt/konakart/webapps/konakart/WEB-INF/classes/konakart.properties