Database configuration¶
PostgreSQL configuration for source/Debian-package istSOS installation¶
Decide where to install the PostgreSQL database. Most of the times installing the database on the same machine is ok.
Install PostgreSQL and PostGIS
sudo apt install postgresql postgis
Change the postgreSQL password
sudo -u postgres psql -c "alter user postgres password 'postgres';"
Note
replace the example password with something stronger if you like
Create the istSOS database
sudo -u postgres createdb -E UTF8 istsos
sudo -u postgres psql -d istsos -c 'CREATE EXTENSION postgis'
Now your istSOS server is ready to be used.
PostgreSQL configuration for docker-compose installation¶
PostgreSQL is ready and configured in the istSOS docker-compose version. You should only set database parameters on istSOS database page.
Launch administration page
If everything has gone well, you should see the administration page at this address:
Configure postgreSQL on istSOS
To connect istSOS to postgreSQL, click on Database section and set database parameters. If you don’t change postgres parameters in docker-compose.yml you should edit only the host field with the name of the docker-compose service: istsos2_istsos-db_1. Test connection and press submit.
Check running database service
Eventually edit host field using the listed postgres service.
docker ps | grep istsos-db
Change postgreSQL password
If you like, you can replace the example password with something stronger editing the POSTGRES_PASSWORD variable in the docker-compose.yml .
Using local or remote postgreSQL
Feel free to use your local or remote postgreSQL, you should only comment or delete the istsos-db service section in the docker-compose.yml and set the right database parameters in the database page.