Installation
Using provided Docker images, components can be easily deployed in a local environment or in any cloud provider, such as Azure by Microsoft or Amazon’s AWS.
Database Setup
Backend services of Mobile In-App Protection use PostgreSQL database as the primary datastore type and Redis as a short term memory for caching and streaming.
PostgreSQL Setup
The Docker images automatically keep the database schema up-to-date using Liquibase. Whenever you install the application or update it to a new version, the container updates the DB schema.
Install PostgreSQL
Download and install the current version of PostgreSQL:
Start the database and connect to it using your preferred database tool.
Create User
Start by creating a user in the database and by setting the user a strong password.
Tip: You can generate a strong password locally on your computer using openssl rand -base64 12.
CREATE USER username;
ALTER USER username WITH PASSWORD '$PASSWORD$';
Create Database
Now, let’s create the mlw database to which the data will be stored.
CREATE DATABASE mlw;
GRANT ALL PRIVILEGES ON DATABASE mlw TO username;
You can assign more granular privileges instead of using ALL PRIVILEGES, if required for security reasons.
Redis Setup
Download and install the current version of Redis:
and start the Redis Server.
Pull the Docker Image
To deploy the Docker image, you need to log in to our Artifactory repository and pull the Docker images:
docker login wultra.jfrog.io
docker pull wultra.jfrog.io/wultra-docker/mlw-init:${VERSION}
docker pull wultra.jfrog.io/wultra-docker/mlw-device-api:${VERSION}
docker pull wultra.jfrog.io/wultra-docker/mlw-console-api:${VERSION}
docker pull wultra.jfrog.io/wultra-docker/mlw-console-web:${VERSION}
Database Initialization
The mlw-init image is responsible for initializing the database schema using Liquibase. Before running this
container, ensure the following environment variables are properly configured:
DATASOURCE_URL=jdbc:postgresql://host.docker.internal:5432/mlw
DATASOURCE_USERNAME=$USERNAME$
DATASOURCE_PASSWORD=$PASSWORD$
Note that the mlw-init container is intended for one-time execution only. It performs database initialization and then exits. It does not need to run continuously.
Running Application Services
Once the database has been successfully initialized, you can proceed to run the remaining services. Prepare the
env.list file with all the environment variables that are required for the container launch. The minimal requirement
is to set following properties:
DATASOURCE_URL=r2dbc:postgresql://host.docker.internal:5432/mlw
DATASOURCE_USERNAME=$USERNAME$
DATASOURCE_PASSWORD=$PASSWORD$
REDIS_URL=redis://host.docker.internal:6379
See Configuration Properties for the full list of available configuration.
Set The Right Database URL
Backend components uses Reactive Relational Database Connectivity (R2DBC). Make sure to provide a valid configuration
database connection string (starting with r2dbc: prefix). Be especially careful when working on localhost! From
the Docker container perspective, localhost is in the internal network. To connect to your host’s localhost, use
host.docker.internal host name.
Run the mlw-device-api:${VERSION}, mlw-console-api:${VERSION}
and mlw-console-web:${VERSION} images, then continue to Configuration section.