Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add park-api layer to geoserver #38

Merged
merged 2 commits into from
Nov 15, 2023
Merged

Add park-api layer to geoserver #38

merged 2 commits into from
Nov 15, 2023

Conversation

hbruch
Copy link
Collaborator

@hbruch hbruch commented Nov 13, 2023

This PR

  • adds a new parking_sites wms/wfs layer
  • defines a default style mdbw_parking_sites_default which color codes parking_sites according to their remaining capacity/open state
  • explicitly sets TIMEZONE for geoserver

Note: there is an upcoming pgbouncer PR. We should agree if all db connections should be handled via pgbouncer or only those which take a huge benefit.

# to provide env variables, see https://docs.geoserver.org/stable/en/user/datadirectory/configtemplate.html
# kartoza/geoserver maps PROXY_BASE_URL_PARAMETRIZATION to ALLOW_ENV_PARAMETRIZATION, see https://github.com/kartoza/docker-geoserver/blob/844c7a26acd1687358c821ea73117a721f25f7b6/scripts/entrypoint.sh#L72
- PROXY_BASE_URL_PARAMETRIZATION=true
# The following parameters are *not* picked up by kartoza/geoserver, but instead passed through as "regular" env vars, and then read by Geoserver whenever one of the config files references them.
- IPL_POSTGRES_PASSWORD=${IPL_POSTGRES_PASSWORD}
- IPL_GTFS_DB_POSTGRES_PASSWORD=${IPL_GTFS_DB_POSTGRES_PASSWORD}
- PARK_API_POSTGRES_PASSWORD=${PARK_API_POSTGRES_PASSWORD?'missing/empty env var $PARK_API_POSTGRES_PASSWORD}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ?' syntax is not explained in the current Compose interpolation spec. It this a typo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. It ahould read like this, shouldn't it?

Suggested change
- PARK_API_POSTGRES_PASSWORD=${PARK_API_POSTGRES_PASSWORD?'missing/empty env var $PARK_API_POSTGRES_PASSWORD}
- PARK_API_POSTGRES_PASSWORD=${PARK_API_POSTGRES_PASSWORD:?'missing/empty env var $PARK_API_POSTGRES_PASSWORD'}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ' around the error message don't help, because it's Docker Compose interpolating $… here, and it ignores sh-like plain strings. We should at least do the following, and maybe (not sure about the implications) also add ':

Suggested change
- PARK_API_POSTGRES_PASSWORD=${PARK_API_POSTGRES_PASSWORD?'missing/empty env var $PARK_API_POSTGRES_PASSWORD}
- PARK_API_POSTGRES_PASSWORD=${PARK_API_POSTGRES_PASSWORD:?missing/empty env var $$PARK_API_POSTGRES_PASSWORD}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I copied this from the interpolations above. I suggest to create an issue to clean these up, too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot review the SLD files because I don't know how they work and their gotchas.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They have some gotchas, indeed. e.g. SLD-producing/consuming software like geoserver or qgis often define some custom functions (e.g. if_then_else (geoserver) or coalesce(qgis), which others don't).
Geoserver provides a validation function to check before storing, but most checks currently need to be done by visual inspection of rendering results.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Geoserver provides a validation function to check before storing, but most checks currently need to be done by visual inspection of rendering results.

Can we integrate this in the CI run? Maybe after tomorrow's meeting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss this separately

@derhuerst

This comment was marked as off-topic.

@derhuerst derhuerst merged commit 9da07ec into main Nov 15, 2023
2 checks passed
@derhuerst derhuerst deleted the park-api-geoserver branch November 15, 2023 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants