Skip to main content

Fluent Manager Database Self Hosting

Hosting the database seperately without using the provided container image may be desirable as some users will want a database hosting solution with robust high availability features and automatic backups provided by AWS and Azure. This can be done easily by just making some changes during the deployment process.

Setting up your database

Your database must be PostgreSQL. We recomend using either "AWS RDS for PostgreSQL" or "Azure Database for PostgreSQL flexible server". Once you've created your server you just need to make sure it has a database named fluent with a schema named manager. The Fluent Manager application will handle creating all of the necessary tables in this schema once it's connected.

You'll need to make sure you've created a user with full CRUD permissions on this database and schema. This is the user the Manager application will be using to connect to the database.

Configuring Manager to use your new database

Start out by following steps 1, 2, and 3 of our standard deployment process using docker compose. Once you've completed step 3 you'll need to make some changes to the generated .env and docker-compose.yml files.

In .env update the following values:

FLUENT_MANAGER_DATABASE_URL={the host name or ip address for your PostgreSQL database}
FLUENT_MANAGER_DATABASE_PASSWORD={the password for the user you're using to connect to the PostgreSQL database}
FLUENT_MANAGER_DATABASE_USERNAME={the user you're using the connect to the PostgreSQL database}
POSTGRES_PASSWORD={the password for the user you're using to connect to the PostgreSQL database}
POSTGRES_USER={the user you're using the connect to the PostgreSQL database}

In docker-compose.yml you can make the following deletions:

  • Delete the db section of `services. It looks something like this:
  db:
container_name: fluent-manager-db-manager-x.y.z-prod-release
restart: always
image: public.ecr.aws/apryse/fluent-manager-db:x.y.z
volumes: ['fluent-manager-db-manager-25.2.0.4-prod-release:/var/lib/postgresql/data']
env_file: .env
logging:
driver: json-file
options: {max-size: 50m, max-file: '3'}
  • Delete the volumes section that sets up the volume mount for the db contaienr. It looks something like this:
volumes:
fluent-manager-db-manager-25.2.0.4-prod-release: {name: fluent-manager-db-manager-25.2.0.4-prod-release}
  • Delete the depends_on reference that the backend container has to the db container. It looks something like this:
depends_on: [db]

Once you've made these changes you can continue with the standard deployment process using docker compose

Updating Your Manager Installation

When you've installed the Manager this way we can no longer update using a simple kotlin kotlin fluent-deploy-docker-compose-w.x.y.z.main.kts update, but we can still update the manager pretty simply.

Obtain The Kotlin Compose Script for the new version

Download .\fluent-deploy-docker-compose-w.x.y.z.main.kts for the version you want to update to from JFrog and place it in the directory with your docker-compose.yml and .env files.

Update version number in docker-compose.yml file

  • In your docker-compose-yml file locate the following lines
image: public.ecr.aws/apryse/fluent-manager-frontend:{{old version number}}

and

image: public.ecr.aws/apryse/fluent-manager-frontend:{{old version number}}
  • Update {{old version number}} with your new version number

Take down your existing Manager installation

  • Run the command kotlin fluent-deploy-docker-compose-w.x.y.z.main.kts undeploy
    • This will take down your existing Manager deployment, so that we're ready to deploy the new version.

Deploy your new version of Manager

  • Run the command kotlin fluent-deploy-docker-compose-w.x.y.z.main.kts deploy
    • This will publish the new version of Manager