[Lizmap] Configure Lizmap to use PostgreSQL for authdb
Zizi Jama
mazizi.jama at gmail.com
Thu Jan 6 03:54:06 PST 2022
Hello,
I am using this repo https://github.com/3liz/lizmap-docker-compose
I am aware that it says it is for testing.
I am trying to use PostgreSQL as the auth db instead of sqlite.
I have made changes to profiles.ini.php
[jdb]
; name of the default profile to use for any connection
default=jauth
jacl2_profile=jauth
;lizlog=jauth
[jdb:jauth]
;driver=sqlite3
;database="var:db/jauth.db"
driver=pgsql
host=postgis
service=lizmapdb
search_path="lizmap,public"
[jdb:lizlog]
;driver=sqlite3
;database="var:db/logs.db"
driver=pgsql
host=postgis
service=lizmapdb
search_path="lizmap,public"
and here is the content of pg_service.conf
[lizmapdb]
host=postgis
port=5432
dbname=lizmap
user=lizmap
password=lizmap1234!
In the logs for my postgis container I get the following error message:
2022-01-06 10:12:19.654 UTC [1168] lizmap at lizmap ERROR: relation
"jlx_user" does not exist at character 350
2022-01-06 10:12:19.654 UTC [1168] lizmap at lizmap STATEMENT: SELECT
"usr"."usr_login" as "login", "usr"."usr_email" as "email",
"usr"."usr_password" as "password", "usr"."firstname", "usr"."lastname",
"usr"."organization", "usr"."phonenumber", "usr"."street",
"usr"."postcode", "usr"."city", "usr"."country", "usr"."comment",
"usr"."status", "usr"."keyactivate", "usr"."request_date",
"usr"."create_date" FROM "jlx_user" AS "usr" WHERE "usr"."usr_login" =
'admin' LIMIT 1 OFFSET 0
It seems to me the issue is that the relation jlx_user is not created in
the postgis container
I also notice that the file pgsql.dbconnection.php is not created
I also see a similar error from the lizmap container
2022-01-06 11:15:21 [403] invalid query (ERROR: relation "jlx_user"
does not exist
LINE 1: ...", "usr"."request_date", "usr"."create_date" FROM "jlx_user"...
^(SELECT
"usr"."usr_login" as "login", "usr"."usr_email" as "email",
"usr"."usr_password" as "password", "usr"."firstname", "usr"."lastname",
"usr"."organization", "usr"."phonenumber", "usr"."street",
"usr"."postcode", "usr"."city", "usr"."country", "usr"."comment",
"usr"."status", "usr"."keyactivate", "usr"."request_date",
"usr"."create_date" FROM "jlx_user" AS "usr" WHERE "usr"."usr_login" =
'admin' LIMIT 1 OFFSET 0))
/www/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php 187
Is my understanding not correct if one changes profiles.ini.php to use
PostgreSQL as the auth db I should not be getting the above errors.
Is it a case of me missing something in my setup?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/lizmap/attachments/20220106/d30ced41/attachment.html>
More information about the Lizmap
mailing list