Deploy custom configuration on docker instance

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

Scott Whittaker

unread,
Jul 3, 2024, 5:40:19 AMJul 3
to mapstore-developers
Hi, 

I've created a custom theme and landing page overrides on a local installation. I have another production instance running from a docker-compose file.

From my local build I uploaded my mapstore.war file to the production server and mapped it as a volume into the docker image:

services:
  mapstore:
    image: geosolutionsit/mapstore2:2024.01.01
    restart: unless-stopped
    command: ["wait-for-postgres", "postgres", "5432", "geostore", "secretpassword", "catalina.sh", "run"]
    volumes:
      - ./mapstore.war:/usr/local/tomcat/webapps/mapstore.war

This is basically working. My custom theme is loaded, along with the CSS and images and overrides from localConfig.json.

However the translation text changes are not loaded in. I have inspected the container and determined that the custom data.en-US.json is indeed present in

webapps/mapstore/translations/data.en-US.json

The translation file is included by js/app.jsx on my local build copy, but this file does not seem to be present in the docker container.

js/app.jsx also maps the configs/localConfig.json file, which is present at
webapps/mapstore/configs/localConfig.json
and the overrides from that file are being used.

So why isn't the translation file being loaded? And more importantly, how do I get it to load? Do I need to set an environment variable in the docker-compose.yml or something?

Thanks,

Scott

Scott Whittaker

unread,
Jul 4, 2024, 3:59:04 AM (13 days ago) Jul 4
to mapstore-developers
Never mind, it seems to be working now!

Scott Whittaker

unread,
Jul 4, 2024, 3:59:10 AM (13 days ago) Jul 4
to mapstore-developers
The issue is some kind of browser caching. It shows up correctly in a fresh browser but a force refresh doesn't work on the old one.

Thanks,

Scott

On Wednesday, July 3, 2024 at 9:40:19 PM UTC+12 Scott Whittaker wrote:
Reply all
Reply to author
Forward
0 new messages