Database Setup
PowerAuth Cloud uses PostgreSQL database as the primary datastore type. While it is possible to configure the images to use other database engine as well (Oracle, MySQL, etc.), we recommend PostgreSQL as the stable, performant and open choice.
Install PostgreSQL
To get started, download and install the current version of PostgreSQL:
Start the database and connect to it using your preferred database tool.
Tip: We use DataGrip by JetBrains for any database related tasks. It allows easy data editing for all popular database engines and contains a powerful SQL console for even the most complex database tasks.
Create User
Start by creating the powerauth
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 powerauth;
ALTER USER powerauth WITH PASSWORD '$PASSWORD$';
Create Database
Now, let’s create the powerauth
database to which we will store the data.
CREATE DATABASE powerauth;
GRANT ALL PRIVILEGES ON DATABASE powerauth TO powerauth;
Install Helper Extensions
There are several PostgreSQL database extensions that may come in handy later. Installation of those is optional.
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- includes uuid_generate_v4()
This is everything you need at this moment. Once the database is up and running with the right user and database, you can launch the Docker container. The Docker container uses Liquibase to create the schema automatically.