diff --git a/docker-compose.custom.yml b/docker-compose.custom.yml index 8e257f16..64343bc8 100644 --- a/docker-compose.custom.yml +++ b/docker-compose.custom.yml @@ -1,6 +1,18 @@ version: '3' services: + stac-browser: + profiles: + - gunicorn + build: + context: dockerfiles + dockerfile: Dockerfile.browser + ports: + - "${MY_DOCKER_IP:-127.0.0.1}:8085:8085" + depends_on: + - stac + - database + - raster stac: container_name: eoapi.stac profiles: diff --git a/docker-compose.yml b/docker-compose.yml index a29863d4..f43fec00 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,19 @@ version: '3' services: + + # change to official image when available https://github.com/radiantearth/stac-browser/pull/386 + stac-browser: + build: + context: dockerfiles + dockerfile: Dockerfile.browser + ports: + - "${MY_DOCKER_IP:-127.0.0.1}:8085:8085" + depends_on: + - stac-fastapi + - titiler-pgstac + - database + stac-fastapi: # Note: # the official ghcr.io/stac-utils/stac-fastapi-pgstac image uses python 3.8 and uvicorn diff --git a/dockerfiles/Dockerfile.browser b/dockerfiles/Dockerfile.browser new file mode 100644 index 00000000..0aa9932d --- /dev/null +++ b/dockerfiles/Dockerfile.browser @@ -0,0 +1,34 @@ +# Copyright Radiant Earth Foundation + +FROM node:lts-alpine3.18 AS build-step +ARG DYNAMIC_CONFIG=true + +WORKDIR /app + +RUN apk add --no-cache git +RUN git clone https://github.com/radiantearth/stac-browser.git . +# remove the default config.js +RUN rm config.js +RUN npm install +# replace the default config.js with our config file +COPY ./browser_config.js ./config.js +RUN \[ "${DYNAMIC_CONFIG}" == "true" \] && sed -i 's//