GeoNode / geoserver-docker

Base image for geoserver in docker
89 stars 83 forks source link

Layer Preview(OpenLayers) with wrong url #77

Open shan1iu opened 3 years ago

shan1iu commented 3 years ago

i was trying to preview the new added layer with OpenLayers format but the redirect url starts with genode instead of localhost:8080 hence the openlayer js&css is not loaded correctly

http://geonode/geoserver/.... expected: http://localhost:8080/geoserver/....

i am using docker-compose and here's my yml file

version: "3.8"
services:
  geoserver:
    image: "geonode/geoserver"
    ports:
      - "8080:8080"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "./geoserver/data/:/geoserver_data/data"
SteveTarter commented 3 years ago

You need to change an internal Geoserver setting, the "Proxy Base URL", which you can find in General Settings.

ChangeGeoserverContext