@@ -22,27 +22,33 @@ This repository contains a minimal Docker Compose setup for running
2222
2323### Environment Variables
2424
25- When deploying pygeoapi in different environments (local, Kubernetes, etc.), the following environment variables should be set:
25+ When deploying in different environments (local, Kubernetes, etc.), the following environment variables should be set:
26+
27+ #### Backend (pygeoapi):
2628
2729- `PYGEOAPI_SERVER_URL`: The external URL where pygeoapi will be accessible. This is used to generate correct links in the API responses.
2830 - For local development: `http://localhost:5000`
29- - For Kubernetes/production: Your domain, e.g., `https://your-domain.com`
31+ - For Kubernetes/production: Your domain, e.g., `https://your-domain.com/api`
32+
33+ #### Frontend:
34+
35+ - `API_BASE_URL`: The URL where the frontend will connect to the backend API.
36+ - For local development: Not needed (will default to `http://localhost:5000`)
37+ - For Docker Compose: `http://backend:5000`
38+ - For Kubernetes/production: `/api` (path to the backend service through the ingress)
3039
3140### Kubernetes Deployment
3241
3342To deploy to Kubernetes:
3443
35- 1. Edit the `k8s-pygeoapi.yaml` file to set the correct `PYGEOAPI_SERVER_URL` for your environment
36- 2. Apply the Kubernetes configuration:
37- ```bash
38- kubectl apply -f k8s-pygeoapi.yaml
39- ```
44+ 1. Update domain and path settings in `k8s-deployment.yaml`
45+ 2. Apply the configuration:
4046
41- The Kubernetes deployment includes:
47+ ```bash
48+ kubectl apply -f k8s-deployment.yaml
49+ ```
4250
43- - A Deployment for pygeoapi
44- - A Service to expose pygeoapi within the cluster
45- - An Ingress resource (optional) to expose pygeoapi externally
51+ This will deploy both the frontend and backend services with the proper configuration.
4652
4753The backend Docker image now generates the OpenAPI document at build
4854time and exposes it via the `PYGEOAPI_OPENAPI` environment variable.
0 commit comments