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
  1. 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

  2. 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

  3. 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)

  4. Create the steps table by using <flogo_flow_state_manager.tar>\config\postgres\steps.sql.

    Note: If you are running the steps.sql script in a terminal, convert the script content to a single continuous line.
  5. Create the flowstate table by using <flogo_flow_state_manager.tar>\config\postgres\flowstate.sql.

    Note: If you are running the flowstate.sql script in a terminal, convert the script content to a single continuous line.