<commit_before># Building and Installing OE2

## Docker Setup

The included Dockerfile will build an image with OE2. The build is configured
with a couple of test layers.

To run, simply build the image `docker build -t onearth_2 .`, and then start a
container using that image. Make sure to expose port 80 on the container to
access the image server.

## Configuration Options

Several environment variables may be set to specify the location of configuration items.

* **REDIS_HOST**: Redis endpoint URL
* **S3_URL**: http URL to the S3 bucket containing MRFs
* **EMPTY_TILES_URL**: URL to S3 bucket or web link containing empty tiles
* **LEGENDS_URL**: URL to S3 bucket or web link containing legend images
* **COLORMAPS_URL**: URL to S3 bucket or web link containing colormaps
* **STYLESHEETS_URL**: URL to S3 bucket or web link containing stylesheets

### Test Layers

`localhost/mrf_endpoint/static_test/default/tms/{level}/{row}/{col}.jpg` --
Tests functionality of mod_mrf. Layer is a static layer without a TIME
dimension.

`localhost/mrf_endpoint/date_test/default/{time}/tms/{level}/{row}/{col}.jpg` --
Same as previous, except this layer exists with the period
2015-01-01/2017-01-01/P1Y. Default date is 2015-01-01

`localhost/reproject_endpoint/static_test/default/tms/{level}/{row}/{col}.jpg`
-- Tests functionality of mod_reproject, reprojecting the static layer served by
mod_mrf.

`localhost/reproject_endpoint/date_test/default/{time}/tms/{level}/{row}/{col}.jpg`
-- Same as previous, with a TIME dimension.

The OnEarth Time Service is also available at `localhost/time_service/time?`

## Notes

The date-snapping service also determines the filenames mod_mrf will look for
when trying to find data for a specific date. Currently, it formats them as
`{layer}{UNIX_epoch}.(idx|pjg)`.
<commit_msg>GITC-741 Updated README for Docker container deployment<commit_after># Building and Deploying OE2

## Docker Setup

OnEarth uses Docker images for its services. The main OnEarth Docker image
contains WMTS/TWMS and GetCapabilities services and is configured with several
test layers. It requires the Time Service, which is a separate Docker image,
in order to support time dynamic layers. A WMS Service is also available as a
separate Docker image.

To build the Docker images and deploy the OnEarth stack, run:
`deploy_oe2_containers.sh`

Alternatively, you can run each Docker image individually by building the
image: `docker build -t onearth_2 .`, and then starting a container using 
that image. Make sure to expose the appropriate ports (e.g., port 80) on the 
container to access the image server.

## Configuration Options

Several environment variables may be set to specify the location of configuration items.

* **REDIS_HOST**: Redis endpoint URL
* **S3_URL**: http URL to the S3 bucket containing MRFs
* **EMPTY_TILES_URL**: URL to S3 bucket or web link containing empty tiles
* **LEGENDS_URL**: URL to S3 bucket or web link containing legend images
* **COLORMAPS_URL**: URL to S3 bucket or web link containing colormaps
* **STYLESHEETS_URL**: URL to S3 bucket or web link containing stylesheets

### Test Layers

`localhost/mrf_endpoint/static_test/default/tms/{level}/{row}/{col}.jpg` --
Tests functionality of mod_mrf. Layer is a static layer without a TIME
dimension.

`localhost/mrf_endpoint/date_test/default/{time}/tms/{level}/{row}/{col}.jpg` --
Same as previous, except this layer exists with the period
2015-01-01/2017-01-01/P1Y. Default date is 2015-01-01

`localhost/reproject_endpoint/static_test/default/tms/{level}/{row}/{col}.jpg`
-- Tests functionality of mod_reproject, reprojecting the static layer served by
mod_mrf.

`localhost/reproject_endpoint/date_test/default/{time}/tms/{level}/{row}/{col}.jpg`
-- Same as previous, with a TIME dimension.

The OnEarth Time Service is also available at `localhost/time_service/time?`

## Notes

The date-snapping service also determines the filenames mod_mrf will look for
when trying to find data for a specific date. Currently, it formats them as
`{layer}{UNIX_epoch}.(idx|pjg)`.

{'fraction_non_alphanumeric': 0.08923303834808259, 'fraction_numerical': 0.018436578171091445, 'mean_word_length': 4.821173104434907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1018567', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1178, 'n_words': 494}