Spaces:
Running
Running
Add env variables
Browse files- Dockerfile +14 -3
- README.md +12 -0
Dockerfile
CHANGED
|
@@ -5,9 +5,20 @@ ENV TITILER_API_CORS_ORIGINS=*
|
|
| 5 |
ENV TITILER_API_CORS_ALLOW_METHODS=GET,POST,OPTIONS
|
| 6 |
|
| 7 |
# Proxy settings for HTTPS detection
|
| 8 |
-
ENV FORWARDED_ALLOW_IPS=*
|
| 9 |
-
ENV TITILER_API_ROOT_PATH=""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
EXPOSE 7860
|
| 12 |
|
| 13 |
-
CMD ["uvicorn", "titiler.application.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--proxy-headers", "--forwarded-allow-ips", "
|
|
|
|
| 5 |
ENV TITILER_API_CORS_ALLOW_METHODS=GET,POST,OPTIONS
|
| 6 |
|
| 7 |
# Proxy settings for HTTPS detection
|
| 8 |
+
# ENV FORWARDED_ALLOW_IPS=*
|
| 9 |
+
# ENV TITILER_API_ROOT_PATH=""
|
| 10 |
+
|
| 11 |
+
ENV CPL_TMPDIR=/tmp
|
| 12 |
+
ENV GDAL_CACHEMAX=75%
|
| 13 |
+
ENV GDAL_INGESTED_BYTES_AT_OPEN=32768
|
| 14 |
+
ENV GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR
|
| 15 |
+
ENV GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=YES
|
| 16 |
+
ENV GDAL_HTTP_MULTIPLEX=YES
|
| 17 |
+
ENV GDAL_HTTP_VERSION=2
|
| 18 |
+
ENV PYTHONWARNINGS=ignore
|
| 19 |
+
ENV VSI_CACHE=TRUE
|
| 20 |
+
ENV VSI_CACHE_SIZE=536870912
|
| 21 |
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
+
CMD ["uvicorn", "titiler.application.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--proxy-headers", "--forwarded-allow-ips='*'", "--root-path=/api/v1/titiler"]
|
README.md
CHANGED
|
@@ -13,3 +13,15 @@ license: mit
|
|
| 13 |
# titiler-endpoint
|
| 14 |
|
| 15 |
A TiTiler demo endpoint
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# titiler-endpoint
|
| 14 |
|
| 15 |
A TiTiler demo endpoint
|
| 16 |
+
|
| 17 |
+
To build the image:
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
docker build -t giswqs/titiler-endpoint:latest .
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
To run the image:
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
docker run --platform=linux/amd64 -p 7860:7860 --rm -it giswqs/titiler-endpoint
|
| 27 |
+
```
|