This repository demonstrates how to set up a STAC browser with custom theming tailored to the APEx branding. The browser is built on an existing open-source repository that provides a graphical user interface for navigating an existing STAC catalog. For the APEx deployment, we've applied a custom theme to personalize the browser's appearance and user experience.
To create a new theme, we recommend following the theming guide by cloning and running the code from original repository. Once you've created the new theme locally, you can proceed to the next step, where we'll build the Docker image.
To create an automated build for your new theme, you can copy the existing .github/workflows/build_apex.yml
file and
modify the following fields:
paths
: This should point to your new theme to ensure that a new build is triggered only when changes are made to your theme.theme
: This should contain the name of your theme.
By doing this, a new Docker image will be built every time a change is made to the corresponding theme.
Follow these steps to build a new Docker image with your custom theme:
- Create a new folder in the
themes
directory of this repository. - Copy the files that need to be overwritten to apply your theme to the original STAC browser code. Be sure to maintain the same folder structure as the base repository.
- Run the following command to build the Docker container and apply your custom theme:
sh scripts/build.sh <THEME> <VERSION>
Parameter | Description |
---|---|
THEME | Name of the theme that should be applied. This is the name of the folder in step 1. |
VERSION | (Optional) Version of the original STAC browser code to apply. If not specified, it will automatically use the latest version. |
docker run --rm -p 8080:8080 \
-e SB_catalogUrl=<CATALOGUE_URL> \
-e SB_catalogTitle=<TITLE> \
--name apex-stac-browser apex-apex-stac-browser
Parameter | Description |
---|---|
CATALOGUE URL | HTTPS URL of STAC catalogue to visualize in the browser |
TITLE | Name of the catalogue to show in the browser |
More information and additional parameters are available on the STAC browser page.