geopython / pycsw

pycsw is an OGC CSW server implementation written in Python. pycsw fully implements the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web]. Initial development started in 2010 (more formally announced in 2011). The project is certified OGC Compliant, and is an OGC Reference Implementation. pycsw allows for the publishing and discovery of geospatial metadata via numerous APIs (CSW 2/CSW 3, OpenSearch, OAI-PMH, SRU). Existing repositories of geospatial metadata can also be exposed, providing a standards-based metadata and catalogue component of spatial data infrastructures. pycsw is Open Source, released under an MIT license, and runs on all major platforms (Windows, Linux, Mac OS X). Please read the docs at https://pycsw.org/docs for more information.
https://pycsw.org
MIT License
209 stars 155 forks source link

docker compose fails with docker/compose/pycsw.yml #1002

Closed eemilhaa closed 3 months ago

eemilhaa commented 3 months ago

Description

docker compose up fails when using the pycsw config in docker/compose/pycsw.yml. This happens with geopython/pycsw:latest. The config file seems to have syntax issues (see logs below). I'll submit a pr to fix this as the issue seems simple enough.

Environment

Steps to Reproduce

cd docker/compose
PYCSW_DOCKER_IMAGE=latest docker compose up

Additional Information

Logs from docker compose up:

[+] Running 2/0
 ✔ Container pycsw  Created                                                                                                              0.0s 
 ✔ Container db     Created                                                                                                              0.0s 
Attaching to db, pycsw
db     | 
db     | PostgreSQL Database directory appears to contain a database; Skipping initialization
db     | 
db     | 2024-08-16 07:43:23.899 UTC [1] LOG:  starting PostgreSQL 12.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit
db     | 2024-08-16 07:43:23.900 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db     | 2024-08-16 07:43:23.900 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db     | 2024-08-16 07:43:23.908 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db     | 2024-08-16 07:43:23.937 UTC [22] LOG:  database system was shut down at 2024-08-16 07:05:21 UTC
db     | 2024-08-16 07:43:23.945 UTC [1] LOG:  database system is ready to accept connections
pycsw  | Traceback (most recent call last):
pycsw  |   File "/usr/local/bin/entrypoint.py", line 132, in <module>
pycsw  |     config = yaml_load(fh)
pycsw  |   File "/home/pycsw/pycsw/pycsw/ogc/api/util.py", line 147, in yaml_load
pycsw  |     return yaml.load(fh, Loader=EnvVarLoader)
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/__init__.py", line 81, in load
pycsw  |     return loader.get_single_data()
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/constructor.py", line 49, in get_single_data
pycsw  |     node = self.get_single_node()
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/composer.py", line 36, in get_single_node
pycsw  |     document = self.compose_document()
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/composer.py", line 55, in compose_document
pycsw  |     node = self.compose_node(None, None)
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/composer.py", line 84, in compose_node
pycsw  |     node = self.compose_mapping_node(anchor)
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/composer.py", line 133, in compose_mapping_node
pycsw  |     item_value = self.compose_node(node, item_key)
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/composer.py", line 84, in compose_node
pycsw  |     node = self.compose_mapping_node(anchor)
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/composer.py", line 133, in compose_mapping_node
pycsw  |     item_value = self.compose_node(node, item_key)
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/composer.py", line 84, in compose_node
pycsw  |     node = self.compose_mapping_node(anchor)
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/composer.py", line 127, in compose_mapping_node
pycsw  |     while not self.check_event(MappingEndEvent):
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/parser.py", line 98, in check_event
pycsw  |     self.current_event = self.state()
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/parser.py", line 428, in parse_block_mapping_key
pycsw  |     if self.check_token(KeyToken):
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/scanner.py", line 115, in check_token
pycsw  |     while self.need_more_tokens():
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/scanner.py", line 152, in need_more_tokens
pycsw  |     self.stale_possible_simple_keys()
pycsw  |   File "/usr/local/lib/python3.10/site-packages/yaml/scanner.py", line 291, in stale_possible_simple_keys
pycsw  |     raise ScannerError("while scanning a simple key", key.mark,
pycsw  | yaml.scanner.ScannerError: while scanning a simple key
pycsw  |   in "/etc/pycsw/pycsw.yml", line 109, column 9
pycsw  | could not find expected ':'
pycsw  |   in "/etc/pycsw/pycsw.yml", line 110, column 9
pycsw exited with code 1