Docker mapstore2:v2024.01.02-stable

161 views
Skip to first unread message
Assigned to lorenzo...@geosolutionsgroup.com by me

Luiz Motta

unread,
Aug 12, 2024, 3:57:09 AM8/12/24
to mapstore-users
Hi,

I'm using the docker image "geosolutionsit/mapstore2:v2024.01.02-stable" and I'd like the data created by users to remain permanent so that it can be used in other runs.

Below is the command used to run the image:

docker run --name mapstore \
-v ./volume:/usr/local/tomcat/datadir \
-d -p 8080:8080 \
geosolutionsit/mapstore2:v2024.01.02-stable

When creating a user in MapStore, a file is not generated in the volume (/usr/local/tomcat/datadir ).

Which directory should I use in the image to store the data (Map, Dashboard, Users,...) that I create in MapStore ? 

docker run --name mapstore \
-v ./volume:[???] \
-d -p 8080:8080 \
geosolutionsit/mapstore2:v2024.01.02-stable

Best Regards,
Luiz Motta

Lorenzo Natali

unread,
Aug 12, 2024, 3:59:55 AM8/12/24
to mapstore-users
Hi, 
by default the docker image uses the H2 database. Anyway this is not suggested to be used for production purposes.
In order to define what database use, you have to create in the datadir a file called geostore-datasource-ovr.properties
More information here

Luiz Motta

unread,
Aug 19, 2024, 4:27:57 AM8/19/24
to mapstor...@googlegroups.com
Thanks Lorenzo,

Sorry for jumping the gun on the email.
I ended up finding the information I needed.

At the moment I'm having trouble registering  Mapstore data in Postgresql (Ex.: g_users table).

I followed the instructions in reference [1] on a database I already had.

Attached are the files with the container definitions and the Log file.

In the Log file we can see that the argument with "geostore-ovr.properties" has been passed (line 30).
But MapStore is still using H2 (line 58).

In the attached figures, you can see that the MapStore container is able to connect to the DB with the user "geostore".

Please check what I'm doing wrong. Thank you in advance for your attention.

image.png

image.png



--
You received this message because you are subscribed to a topic in the Google Groups "mapstore-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapstore-users/oikTbLrbS7E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapstore-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapstore-users/f5d2f9ad-fe91-4f45-95cd-4096f9862db8n%40googlegroups.com.
docker-compose.yml
env
postgis_mapstore2.log
geostore-ovr.properties

Lorenzo Natali

unread,
Sep 2, 2024, 5:48:59 AM9/2/24
to mapstore-users
Hi,
I noticed only now that we stopped sharing the emails with the mailing list.

In order to help other people with the same issue, I share my solution, that Luis said it worked.

[...] we usually use datadir.location tava prop, instead of geostore-ovr
like this:
"-Ddatadir.location=/usr/local/tomcat/datadir"

The datadir is usually better because it relies on file names conventions:
Datadir recognizes a file in the folder named this way:
- "geostore-datasource-ovr.properties"

So if you put in the volume a file with that name, it will work. 

See more about datadir here:

---

Hope this help people with same issue to solve the problem.

Thank you Luis to share your problem and for using MapStore.

Luiz Motta

unread,
Sep 3, 2024, 4:58:15 AM9/3/24
to mapstore-users
Hi,

Attached is a guide to help you use “Mapstore + PostgreSQL/PostGIS + Geoserver”.

I ihope the guide is useful for other users.

LuiZ
mapstore2_stack.pdf
Reply all
Reply to author
Forward
0 new messages