Configuring the PostgreSQL Database
All execution data from the Flogo app is stored in the PostgreSQL database. Set up the PostgreSQL database for accepting data from the Flogo app as follows:
- Procedure
-
Start the PostgreSQL service as docker container. For example:
docker run -d --name my_postgres -v my_dbdata1:/var/lib/postgresql/data -p 54320:5432 -e POSTGRES_PASSWORD=<password> -e POSTGRES_USER=<user> postgres
-
Start the PGAdmin portal as a Docker container:
docker run -p 9990:80 -e PGADMIN_DEFAULT_EMAIL=<email address> -e PGADMIN_DEFAULT_PASSWORD=<pgadmin_password> -d dpage/pgadmin4
-
Configure the PostgreSQL server in the PGAdmin admin portal with the following details. Note that you must use the same parameter values while configuring
config.json
for Flogo Flow State Manager.-
Host
: IP of the local machine -
PORT
: 54320 (same host and port used while starting PostgreSQL service as docker container) -
User
:<user>
(configured while starting PostgreSQL server) -
Password
:<password>
(configured while starting PostgreSQL server) -
Maintenance database: same as
<user>
(if not specifically mentioned while starting PostgreSQL server)
-
-
Create the
steps
table by using<flogo_flow_state_manager.tar>\config\postgres\steps.sql
.Note: If you are running thesteps.sql
script in a terminal, convert the script content to a single continuous line. -
Create the
flowstate
table by using<flogo_flow_state_manager.tar>\config\postgres\flowstate.sql
.Note: If you are running theflowstate.sql
script in a terminal, convert the script content to a single continuous line.