-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into docs/getting-started-nb
- Loading branch information
Showing
22 changed files
with
714 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/<!-- <script defer="defer" src=".\/config.js"><\/script> -->/<script defer="defer" src=".\/config.js"><\/script>/g' public/index.html | ||
RUN npm run build | ||
|
||
|
||
FROM nginx:1-alpine-slim | ||
|
||
COPY --from=build-step /app/dist /usr/share/nginx/html | ||
COPY --from=build-step /app/config.schema.json /etc/nginx/conf.d/config.schema.json | ||
|
||
# change default port to 8085 | ||
RUN apk add jq pcre-tools && \ | ||
sed -i 's/\s*listen\s*80;/ listen 8085;/' /etc/nginx/conf.d/default.conf && \ | ||
sed -i 's/\s*location \/ {/ location \/ {\n try_files $uri $uri\/ \/index.html;/' /etc/nginx/conf.d/default.conf | ||
|
||
EXPOSE 8085 | ||
|
||
STOPSIGNAL SIGTERM | ||
|
||
# override entrypoint, which calls nginx-entrypoint underneath | ||
COPY --from=build-step /app/docker/docker-entrypoint.sh ./docker-entrypoint.d/40-stac-browser-entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module.exports = { | ||
catalogUrl: "http://0.0.0.0:8081", | ||
catalogTitle: "eoAPI STAC Browser", | ||
allowExternalAccess: true, // Must be true if catalogUrl is not given | ||
allowedDomains: [], | ||
detectLocaleFromBrowser: true, | ||
storeLocale: true, | ||
locale: "en", | ||
fallbackLocale: "en", | ||
supportedLocales: [ | ||
"de", | ||
"es", | ||
"en", | ||
"fr", | ||
"it", | ||
"ro" | ||
], | ||
apiCatalogPriority: null, | ||
useTileLayerAsFallback: true, | ||
displayGeoTiffByDefault: false, | ||
buildTileUrlTemplate: ({href, asset}) => "http://0.0.0.0:8082/cog/tiles/{z}/{x}/{y}@2x?url=" + encodeURIComponent(asset.href.startsWith("/vsi") ? asset.href : href), | ||
stacProxyUrl: null, | ||
pathPrefix: "/", | ||
historyMode: "history", | ||
cardViewMode: "cards", | ||
cardViewSort: "asc", | ||
showThumbnailsAsAssets: false, | ||
stacLint: true, | ||
geoTiffResolution: 128, | ||
redirectLegacyUrls: false, | ||
itemsPerPage: 12, | ||
defaultThumbnailSize: null, | ||
maxPreviewsOnMap: 50, | ||
crossOriginMedia: null, | ||
requestHeaders: {}, | ||
requestQueryParameters: {}, | ||
preprocessSTAC: null, | ||
authConfig: null | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.