Following the security best practices for PostgreSQL, you are able to modify the database schema on IirusRisk, since version 4.18.
This article will show an example of how to configure this change.
We can start by backing up the current DB:
pg_dump -U iriusprod -h 127.0.0.1 iriusprod > /tmp/"db_$(date +"%m%d%Y").dump"
In case that you want to check the current schema, you can use this command:
sudo -u postgres psql -d iriusprod --command "\dn+" 2> /dev/null
Then, we will stop the stack, and modify the default schema, for example like this:
cd docker
docker-compose down
sudo -u postgres psql -d iriusprod --command "ALTER SCHEMA public RENAME TO production;" 2> /dev/null
After this, we would need to add the new -DIRIUS_DB_SCHEMA to the tomcat environment variables with JAVA_OPTS or CATALINA_OPTS:
- JAVA_OPTS=-DIRIUS_DB_SCHEMA=production
Once done, we can start the stack again.
docker-compose up -d
Comments
0 comments
Article is closed for comments.