From 5eaf5057d655b94163f649968e2cbdec0ecea3a9 Mon Sep 17 00:00:00 2001 From: emileten Date: Sat, 11 Nov 2023 19:07:16 +0900 Subject: [PATCH 1/5] add stac browser to docker deployment, change tiler in aws deployment to our tiler --- docker-compose.custom.yml | 9 +++++ docker-compose.yml | 10 +++++ dockerfiles/Dockerfile.browser | 34 ++++++++++++++++ dockerfiles/browser_config.js | 39 +++++++++++++++++++ infrastructure/aws/cdk/app.py | 1 + infrastructure/aws/cdk/stac_browser_config.js | 39 +++++++++++++++++++ infrastructure/aws/requirements-cdk.txt | 2 +- 7 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 dockerfiles/Dockerfile.browser create mode 100644 dockerfiles/browser_config.js create mode 100644 infrastructure/aws/cdk/stac_browser_config.js diff --git a/docker-compose.custom.yml b/docker-compose.custom.yml index 8e257f1..e1a0b4c 100644 --- a/docker-compose.custom.yml +++ b/docker-compose.custom.yml @@ -259,6 +259,15 @@ services: volumes: - ./.pgdata:/var/lib/postgresql/data + stac-browser: + build: + context: dockerfiles + dockerfile: Dockerfile.browser + ports: + - "${MY_DOCKER_IP:-127.0.0.1}:8084:8080" + depends_on: + - stac + networks: default: name: eoapi-network diff --git a/docker-compose.yml b/docker-compose.yml index a29863d..f7764dd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -132,6 +132,16 @@ services: volumes: - ./.pgdata:/var/lib/postgresql/data + # 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}:8084:8080" + depends_on: + - stac-fastapi + networks: default: name: eoapi-network diff --git a/dockerfiles/Dockerfile.browser b/dockerfiles/Dockerfile.browser new file mode 100644 index 0000000..f564524 --- /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//