Skip to content

Commit

Permalink
Enable to host.docker.internal as alias for localhost for external …
Browse files Browse the repository at this point in the history
…table UR
  • Loading branch information
index-git committed Jul 4, 2023
1 parent 06dfc6d commit ede2b25
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
- [#815](https://github.com/LayerManager/layman/issues/815) Propagate [`LAYMAN_PROXY_SERVER_NAME`](doc/env-settings.md#LAYMAN_PROXY_SERVER_NAME) value to GeoServer environment variable [GEOSERVER_CSRF_WHITELIST](https://docs.geoserver.org/latest/en/user/security/webadmin/csrf.html).
- [#847](https://github.com/LayerManager/layman/issues/847) Fix publishing external table layers with `@` in the username or the password.
- [#764](https://github.com/LayerManager/layman/issues/764), [#860](https://github.com/LayerManager/layman/issues/860) Layman accepts QML styles with labels without symbology and with point clustering.
- [#857](https://github.com/LayerManager/layman/issues/857) Endpoints [POST Workspace Layers](doc/rest.md#post-workspace-layers) and [PATCH Workspace Layer](doc/rest.md#patch-workspace-layer) accepts `host.docker.internal` in `external_table_uri` parameter to reach `localhost` of host server.
## v1.20.1
2023-04-11
Expand Down
1 change: 1 addition & 0 deletions doc/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ Body parameters:
- [connection URI](https://www.postgresql.org/docs/15/libpq-connect.html#id-1.7.3.8.3.6) is required, usual format is `postgresql://<username>:<password>@<host>:<port>/<dbname>?schema=<schema_name>&table=<table_name>&geo_column=<geo_column_name>`
- `host` part and query parameters `schema` and `table` are mandatory
- URI scheme is required to be `postgresql`
- `host.docker.internal` can be used to reach `localhost` of host server
- if `geo_column` is not specified, first geometry column of the table by alphabetic order is used
- published table is required to have one-column primary key
- names of schema, table and all columns of the table are required to match regular expression `^[a-zA-Z_][a-zA-Z_0-9]*$`
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
env_file:
- .env
extra_hosts:
- "host.docker.internal:host-gateway"
- ${EXTRA_HOST1}
- ${EXTRA_HOST2}
volumes:
Expand All @@ -40,6 +41,7 @@ services:
- C_FORCE_ROOT=true
- LAYMAN_SKIP_REDIS_LOADING=true
extra_hosts:
- "host.docker.internal:host-gateway"
- ${EXTRA_HOST1}
- ${EXTRA_HOST2}
volumes:
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.deps.demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ services:
build:
context: deps/qgis/docker
dockerfile: Dockerfile
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./deps/qgis/data:/qgis/data:ro
restart: on-failure
Expand All @@ -30,6 +32,8 @@ services:

geoserver:
image: docker.osgeo.org/geoserver:2.21.2
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./deps/geoserver/data:/opt/geoserver_data/
restart: on-failure
Expand Down

0 comments on commit ede2b25

Please sign in to comment.