diff --git a/cfl/README.md b/cfl/README.md
index 72ad4aa9..39cc3e2a 100644
--- a/cfl/README.md
+++ b/cfl/README.md
@@ -5,13 +5,14 @@ The distribution project consists of docker compose configuration files and reso
(OpenMRS Web Application, modules and other).
The project contains **.env.example** file which contains the configuration of an environment, the committed version
- configures CFL distribution to run on your local docker, where both application and database docker containers are running.
+ configures CFL distribution to run on your local docker, where both application and database docker containers are
+ running.
-The docker compose configuration files, with suffix .yml, should stay unchanged - with an exception of docker image
- versioning.
-
-**Increment proper version number in docker-compose.run.yml and docker-compose.build.yml when you make any
- change in this project**
+The CFL distribution forgoes usage of database dump, in favor of 'initial startup'.
+The 'initial startup' is the first start of an application, during which empty database has tables created and initial
+ data loaded in. This approach removes a burden of synchronizing DB dump with initial data of the CfL application,
+ at the expense of the longer initial startup - depending on the server's performance, it may take up to few hours, the most
+ of time is taken by the OCL concepts import (over 50000 concepts).
## Requirements
- Docker engine
@@ -24,8 +25,15 @@ The project provides utility script to start OpenMRS application docker containe
Run script:
```runInDevMode.sh```
+The docker compose configuration files, should stay unchanged - with an exception of docker image versioning.
+
+**Increment proper version number in docker-compose.run.yml and docker-compose.build.yml when you make any
+ change in this project**
+
## Production
+Review AWS considerations and Serving CfL over HTTP below.
+
Build CFL distribution image using ``docker-compose.build.yml``.
```
@@ -37,14 +45,27 @@ Save CFL distribution image into archive.
```
sudo docker save openmrscorecfl:X.Y.Z | gzip > openmrscorecfl_X.Y.Z.tar.gz
```
+Where X.Y.Z is the version number from `docker-compose.run.yml` web image name's suffix.
Distribute the created image together with ``docker-compose.run.yml`` file.
-The ``.env`` file has to be created during installation, each environment has individual configuration.
+The ``.env`` file has to be created during the installation, each environment has individual configuration.
### Run production
Configure ``.env`` accordingly to the production environment.
+| Property | Value | Description
+| --------------------- | -----------------------| -----------
+| INITIAL_STARTUP | true or false | Whether the next startup should create the database tables and load the initial data. **This must be true only for a first startup on given DB.**
+| TOMCAT_PORT | port number, eg.: 80 | Specifies a TPC port under which docker should expose CfL web application.
+| DB_HOST | URL | Specifies connection URL for database. Leave a default `db` for dev mode.
+| DB_USERNAME | DB username | Specifies user that OpenMRS will use to connect to database.
+| DB_PASSWORD | DB password | Specifies password that OpenMRS will use to connect to database.
+| MYSQL_DEV_PORT | port number, eg.: 3306 | If started in dev mode, specifies a TPC port under which docker should expose database.
+| TOMCAT_DEV_PORT | port number, eg.: 8080 | When Debugging is enabled, specifies a TPC port under which docker should expose CfL web application.
+| TOMCAT_DEV_DEBUG_PORT | port number, eg 1044 | When Debugging is enabled, specifies a TPC port under which docker should expose Java debug port of CfL web application.
+| DB_ROOT_PASSWORD | DB root password | If started in dev mode, specifies `root` user password for the created database.
+
Load CFL distribution image.
```
@@ -66,3 +87,38 @@ Inspect logs
```
sudo docker logs -f --tail 500 cfl_web_1
```
+
+### AWS considerations
+
+When running Connect for Life in AWS environments, you must ensure that RDS database has `log_bin_trust_function_creators
+` parameter (in database server's parameter group) set to **1**.
+This is required to load database functions used in the Connect for Life.
+
+The `openmrs` schema and user used by OpenMRS, must be pre-created before Connect for Life startup.
+The schema must created with **UTF8** character set and **utf8_general_ci** collation.
+
+### Serving CfL over HTTP
+
+The Connect for Life is by default configured to be hidden by a proxy or firewall which exposes CFL over HTTPS.
+To make Connect for Life work over regular HTTP, for connection other then from localhost, you need to modify `cfl/web
+/config/tomcat/web.xml` file.
+Remove `cookie-config` element from the `session-config`.
+
+#### Default config
+```
+
+ 30
+
+ true
+ true
+
+
+```
+
+#### HTTP config
+
+```
+
+ 30
+
+```
diff --git a/cfl/docker-compose.build.yml b/cfl/docker-compose.build.yml
index 200bce97..6c16faa1 100644
--- a/cfl/docker-compose.build.yml
+++ b/cfl/docker-compose.build.yml
@@ -3,4 +3,4 @@ version: '2'
services:
web:
build: web
- image: openmrscorecfl:5.0.0
+ image: openmrscorecfl:6.0.0
diff --git a/cfl/docker-compose.db.yml b/cfl/docker-compose.db.yml
index e37683f0..fc59b697 100644
--- a/cfl/docker-compose.db.yml
+++ b/cfl/docker-compose.db.yml
@@ -3,7 +3,8 @@ version: '2'
services:
db:
image: mysql:5.7
- command: "mysqld --character-set-server=utf8 --collation-server=utf8_general_ci"
+ command: mysqld --sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" --character-set-server=utf8 --collation-server=utf8_general_ci
+ restart: always
environment:
MYSQL_DATABASE: openmrs
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
@@ -11,6 +12,7 @@ services:
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- db-data:/var/lib/mysql
+ - ./db-init-data:/docker-entrypoint-initdb.d
ports:
- "${MYSQL_DEV_PORT}:3306"
diff --git a/cfl/docker-compose.run.yml b/cfl/docker-compose.run.yml
index db28b02e..3eebb680 100644
--- a/cfl/docker-compose.run.yml
+++ b/cfl/docker-compose.run.yml
@@ -2,7 +2,8 @@ version: '2'
services:
web:
- image: openmrscorecfl:5.0.0
+ image: openmrscorecfl:6.0.0
+ restart: always
logging:
driver: "local"
environment:
diff --git a/cfl/web/Dockerfile b/cfl/web/Dockerfile
index 0e860c2b..714e1235 100644
--- a/cfl/web/Dockerfile
+++ b/cfl/web/Dockerfile
@@ -1,4 +1,4 @@
-FROM tomcat:7-jre8
+FROM tomcat:8.5.82-jdk8
RUN rm -rf /usr/local/tomcat/webapps/ROOT
ADD ./ROOT /usr/local/tomcat/webapps/ROOT
diff --git a/cfl/web/cfl-modules/callflows-1.1.9.omod b/cfl/web/cfl-modules/callflows-1.1.11.omod
similarity index 92%
rename from cfl/web/cfl-modules/callflows-1.1.9.omod
rename to cfl/web/cfl-modules/callflows-1.1.11.omod
index 91e91914..31e74a8f 100644
Binary files a/cfl/web/cfl-modules/callflows-1.1.9.omod and b/cfl/web/cfl-modules/callflows-1.1.11.omod differ
diff --git a/cfl/web/cfl-modules/cfl-1.3.5.omod b/cfl/web/cfl-modules/cfl-1.4.0.omod
similarity index 90%
rename from cfl/web/cfl-modules/cfl-1.3.5.omod
rename to cfl/web/cfl-modules/cfl-1.4.0.omod
index 3a4021d2..7f99880b 100644
Binary files a/cfl/web/cfl-modules/cfl-1.3.5.omod and b/cfl/web/cfl-modules/cfl-1.4.0.omod differ
diff --git a/cfl/web/cfl-modules/cflcharts-1.0.1.omod b/cfl/web/cfl-modules/cflcharts-1.1.0.omod
similarity index 63%
rename from cfl/web/cfl-modules/cflcharts-1.0.1.omod
rename to cfl/web/cfl-modules/cflcharts-1.1.0.omod
index 9ca7aca6..6d9db435 100644
Binary files a/cfl/web/cfl-modules/cflcharts-1.0.1.omod and b/cfl/web/cfl-modules/cflcharts-1.1.0.omod differ
diff --git a/cfl/web/cfl-modules/cflcore-1.9.3.omod b/cfl/web/cfl-modules/cflcore-1.10.0.omod
similarity index 93%
rename from cfl/web/cfl-modules/cflcore-1.9.3.omod
rename to cfl/web/cfl-modules/cflcore-1.10.0.omod
index cffacaa6..4520867a 100644
Binary files a/cfl/web/cfl-modules/cflcore-1.9.3.omod and b/cfl/web/cfl-modules/cflcore-1.10.0.omod differ
diff --git a/cfl/web/cfl-modules/etllite-1.1.8.omod b/cfl/web/cfl-modules/etllite-1.1.10.omod
similarity index 83%
rename from cfl/web/cfl-modules/etllite-1.1.8.omod
rename to cfl/web/cfl-modules/etllite-1.1.10.omod
index 62314434..432b04c0 100644
Binary files a/cfl/web/cfl-modules/etllite-1.1.8.omod and b/cfl/web/cfl-modules/etllite-1.1.10.omod differ
diff --git a/cfl/web/cfl-modules/messages-1.5.8.omod b/cfl/web/cfl-modules/messages-1.6.0.omod
similarity index 80%
rename from cfl/web/cfl-modules/messages-1.5.8.omod
rename to cfl/web/cfl-modules/messages-1.6.0.omod
index 378c7eaf..2cdaf732 100644
Binary files a/cfl/web/cfl-modules/messages-1.5.8.omod and b/cfl/web/cfl-modules/messages-1.6.0.omod differ
diff --git a/cfl/web/cfl-modules/sms-1.2.7.omod b/cfl/web/cfl-modules/sms-1.2.11.omod
similarity index 58%
rename from cfl/web/cfl-modules/sms-1.2.7.omod
rename to cfl/web/cfl-modules/sms-1.2.11.omod
index 28330f9b..eb1bd90f 100644
Binary files a/cfl/web/cfl-modules/sms-1.2.7.omod and b/cfl/web/cfl-modules/sms-1.2.11.omod differ
diff --git a/cfl/web/cfl-modules/visits-1.3.8.omod b/cfl/web/cfl-modules/visits-1.4.0.omod
similarity index 76%
rename from cfl/web/cfl-modules/visits-1.3.8.omod
rename to cfl/web/cfl-modules/visits-1.4.0.omod
index 01633fc9..21c60167 100644
Binary files a/cfl/web/cfl-modules/visits-1.3.8.omod and b/cfl/web/cfl-modules/visits-1.4.0.omod differ
diff --git a/cfl/web/config/tomcat/server.xml b/cfl/web/config/tomcat/server.xml
index 6c49370b..cc10504e 100644
--- a/cfl/web/config/tomcat/server.xml
+++ b/cfl/web/config/tomcat/server.xml
@@ -1,4 +1,4 @@
-
+
-
+
-
-
@@ -63,10 +61,10 @@
-->
-
+
+
+
-
-
+
-
+
diff --git a/cfl/web/config/tomcat/web.xml b/cfl/web/config/tomcat/web.xml
index 581145d9..b9c50711 100644
--- a/cfl/web/config/tomcat/web.xml
+++ b/cfl/web/config/tomcat/web.xml
@@ -1,4 +1,4 @@
-
+
-
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
+ version="3.1">
@@ -48,6 +48,11 @@
+
+
+
+
+
@@ -99,6 +104,13 @@
+
+
+
+
+
+
+
default
@@ -138,9 +150,9 @@
-
+
-
+
@@ -238,6 +250,11 @@
+
+
+
+
+
@@ -355,7 +372,7 @@
-
+
@@ -526,7 +543,7 @@
-
+
@@ -576,7 +593,6 @@
-
httpHeaderSecurity
/*
@@ -627,6 +643,7 @@
+
123
@@ -4237,6 +4254,10 @@
wad
application/x-doom
+
+ wasm
+ application/wasm
+
wav
audio/x-wav
@@ -4642,10 +4663,6 @@
z
application/x-compress
-
- Z
- application/x-compress
-
z1
application/x-zmachine
diff --git a/cfl/web/owa/cfl.zip b/cfl/web/owa/cfl.owa
similarity index 54%
rename from cfl/web/owa/cfl.zip
rename to cfl/web/owa/cfl.owa
index 8b265bbb..b520cc2a 100644
Binary files a/cfl/web/owa/cfl.zip and b/cfl/web/owa/cfl.owa differ
diff --git a/cfl/web/startup.sh b/cfl/web/startup.sh
index f758d196..286929d1 100644
--- a/cfl/web/startup.sh
+++ b/cfl/web/startup.sh
@@ -45,7 +45,7 @@ mkdir -p ~/modules
# Create OpenMRS installation script - see setenv.sh
cat > /usr/local/tomcat/openmrs-server.properties << EOF
install_method=auto
-connection.url=jdbc\:mysql\://${DB_HOST}\:3306/${DB_DATABASE}?autoReconnect\=true&sessionVariables\=default_storage_engine\=InnoDB&useUnicode\=true&characterEncoding\=UTF-8
+connection.url=jdbc\:mysql\://${DB_HOST}\:3306/${DB_DATABASE}?autoReconnect\=true&sessionVariables\=default_storage_engine\=InnoDB&useUnicode\=true&characterEncoding\=UTF-8&useSSL\=false
connection.username=${DB_USERNAME}
connection.password=${DB_PASSWORD}
has_current_openmrs_database=true