Open Youssef-Harby opened 3 hours ago
I made a workaround for now to make it works in the docker compose file :
pygeoapi:
container_name: pygeoapi
image: geopython/pygeoapi:latest
volumes:
- ./pygeoapi-config.yml:/pygeoapi/local.config.yml
- ./openapi-auth.yml:/pygeoapi/openapi.yml:ro
ports:
- 80
environment:
- SCRIPT_NAME=/api
- PYGEOAPI_CONFIG=/pygeoapi/local.config.yml
- PYGEOAPI_OPENAPI=/pygeoapi/openapi.yml
depends_on:
- redis
- caddy
- authelia
networks:
- caddy
entrypoint: []
command: gunicorn --workers 4 --worker-class gevent --timeout 6000 --name pygeoapi --bind 0.0.0.0:80 pygeoapi.flask_app:APP
Is your feature request related to a problem? Please describe.
Yes, when I mount a custom
openapi.yml
into thegeopython/pygeoapi
Docker image, it gets overwritten by theentrypoint.sh
script, which always generates a newopenapi.yml
at startup.Describe the solution you'd like
Modify the entrypoint.sh script to check if an
openapi.yml
orPYGEOAPI_OPENAPI
already exists before generating one. If a custom file is present, the script should skip the generation step.Additional context
Allowing custom
openapi.yml
files to persist enhances flexibility. I'm willing to submit a PR with the necessary changes.