Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add STAC catalog #297

Merged
merged 91 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
24ee7bf
add stac components to compose
Dec 7, 2022
148501f
added pgstac container healthcheck
Dec 7, 2022
e0c4231
moved stac to components
Dec 7, 2022
b182aa4
stac configs
Dec 7, 2022
0c024c5
stac magpie config
Dec 8, 2022
0aecb0f
remove stac extra_host
Dec 9, 2022
a41fbea
added Forwarded nginx header to twitcher
Dec 9, 2022
3cf6441
Merge branch 'master' into add_stac
Feb 17, 2023
4671626
specify ROUTER_PREFIX
Feb 17, 2023
fef2f1d
register stac-browser in nginx
Feb 17, 2023
ad3cbd5
added comment
Feb 21, 2023
3671d21
stac proxy redirect
Feb 22, 2023
de276cd
remove stac command
Feb 22, 2023
dfbfcdd
ignore
Feb 22, 2023
5ae391f
proxy for stac-browser
Feb 22, 2023
3840abe
added todo
Feb 22, 2023
2964165
added stac populator
Feb 23, 2023
1e34626
adding stac populator
Feb 23, 2023
74a05a3
stac asset populator
Feb 23, 2023
4d3c348
wip
Feb 23, 2023
394b36f
working asset generator timeout
Feb 23, 2023
dd07828
stac-populator env vars
Feb 23, 2023
9dbf1c9
stac-populator env var
Feb 23, 2023
be2c29d
renamed pgstac
Feb 23, 2023
800f060
fix stac crawling
Feb 23, 2023
bc5e2a2
added wait-for-it for stac-populator
Feb 23, 2023
8466780
stac-browser catalogUrl
Feb 23, 2023
079fcd2
stac-browser env vars
Feb 23, 2023
88ccb34
use POSTGRES_PAVICS_* env vars
Feb 23, 2023
ac90cbf
added comment
Feb 23, 2023
67ae5e6
added STAC to changelog
Feb 23, 2023
82f117c
added stac to components/readme
Feb 23, 2023
be43cb1
docs
Feb 23, 2023
1d311af
added stac always restart policy
Feb 23, 2023
4dea9bd
add stac healthcheck
Feb 24, 2023
862b41a
added sample stac usage
Feb 24, 2023
5a800d8
remove stac healthcheck
Feb 24, 2023
5481d2c
changes
Feb 24, 2023
4f8a526
merge master
May 23, 2023
472c70a
pr comments
May 23, 2023
4dce05b
pr comments
May 23, 2023
7bd3799
moved stac-populator to optional-components
May 23, 2023
017890a
stac-populator cmd
May 30, 2023
e5abe3a
readme for STAC
May 31, 2023
a354c1c
added comment for STAC proxy config
May 31, 2023
5290fa9
using PAVICS_FQDN_PUBLIC in stac-browser
May 31, 2023
5ac4dc6
added default.env for stac component
May 31, 2023
f9f72b0
changes.md
May 31, 2023
0cf71de
deactivated stac proxy timeouts
May 31, 2023
0adb3ac
use stac-populator:master image
May 31, 2023
8ba2867
stac-populator command
May 31, 2023
0dd82f5
removed stac-browser proxy timeout
May 31, 2023
ad8ffe4
changed stac-populator STAC_HOST
May 31, 2023
b20d46c
restrict STAC permissions
Jun 14, 2023
af3e85f
moved STAC magpie configs to appropriate directory
Jun 14, 2023
20aaf81
move STAC proxy config to appropriate directory
Jun 14, 2023
91d618f
removed stac link with proxy
Jun 14, 2023
32b9326
customizable STAC_ASSET_GENERATOR_TIMEOUT
Jun 14, 2023
7d90bf8
changelog
Jun 14, 2023
d6cd887
Merge branch 'master' into add_stac
Jun 15, 2023
bc4bc81
fix wait-for-it timeout
Jun 15, 2023
98b5779
stac readme
Jun 15, 2023
0254ded
[no ci] added stac-populator schema
Jun 15, 2023
e7638cc
[skip ci]
Jun 15, 2023
7931a2c
stac pr fixes
Jun 15, 2023
e96e658
readme fixes
Jun 15, 2023
1b52860
stac-populator required vars
Jun 15, 2023
9b979c6
stac extra vars
Jun 15, 2023
13a1fd7
readme fix
Jun 15, 2023
7d61811
fix stac_host
Jun 15, 2023
bcbbbd2
added canarie-api config for stac
Jun 19, 2023
7853c05
fix stac-populator component_dependencies
Jun 19, 2023
bcb05d4
fix canarie-api stac route
Jun 19, 2023
62378b6
git ignore stac.conf
Jun 20, 2023
72b162c
removed anonymous access to stac
Jun 20, 2023
f59dae4
use magpie config paths for stac
Jun 20, 2023
9ac43bf
Merge branch 'master' into add_stac
Jun 20, 2023
eed9a1a
added anonymous access to stac
Jun 20, 2023
5c9e109
[skip ci]
Jul 14, 2023
02c2903
move stac magpie permissions to stac-public-access optional-components
Jul 14, 2023
47af0fe
commit to trigger ci
Jul 14, 2023
340c418
added OPENAPI_URL and DOCS_URL env vars for stac
Jul 15, 2023
4b27449
env var
Jul 19, 2023
22a7d70
temporary disable canarie stac entry
Jul 19, 2023
8c831ca
fix env var
Jul 19, 2023
97f43fc
empty commit
Jul 27, 2023
9db96d7
reenabled canarie-api
Jul 27, 2023
9c4519b
removed generated file from template
Jul 27, 2023
5080393
stac docs
Jul 28, 2023
b6abd19
higher STAC_ASSET_GENERATOR_TIMEOUT value, to make sure stac-populato…
Jul 28, 2023
48b372f
removed extra string double quotes
Aug 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,30 @@
[Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matprov No bumpversion? FYI the release procedure https://github.com/bird-house/birdhouse-deploy/blob/master/birdhouse/README.rst#release-procedure

Planning on a quick subsequent PR?

------------------------------------------------------------------------------------------------------------------

[//]: # (list changes here, using '-' for each new entry, remove this when items are added)
## Changes
- Adds [STAC](https://github.com/crim-ca/stac-app) to the stack (optional) when ``./components/stac``
is added to ``EXTRA_CONF_DIRS``. For more details, refer to
[STAC Component](https://github.com/bird-house/birdhouse-deploy/blob/master/birdhouse/components/README.rst#STAC)
Following happens when enabled:

* Service ``stac`` (API) gets added with endpoints ``/twitcher/ows/proxy/stac`` and ``/stac``.

* STAC catalog can be explored via the ``stac-browser`` component, available under ``/stac-browser``.

* Image [crim-ca/stac-app](https://github.com/crim-ca/stac-app) is a STAC implementation based on
[stac-utils/stac-fastapi](https://github.com/stac-utils/stac-fastapi).

* Image [crim-ca/stac-browser](https://github.com/crim-ca/stac-browser) is a fork of
[radiantearth/stac-browser](https://github.com/radiantearth/stac-browser) in order to have the capacity to build
the Docker container. The image reference will change when the
[stac-browser PR related to Dockerfile](https://github.com/bird-house/birdhouse-deploy/issues/346) will have been
merged.

* Adds `Magpie` permissions and service for `stac` endpoints.

- Adds [stac-populator](https://github.com/crim-ca/stac-populator) to populate STAC catalog with sample collection
items via [CEDA STAC Generator](https://github.com/cedadev/stac-generator), employed in sample
[CMIP Dataset Ingestion Workflows](https://github.com/cedadev/stac-generator-example/tree/master/conf).

matprov marked this conversation as resolved.
Show resolved Hide resolved
[1.26.7](https://github.com/bird-house/birdhouse-deploy/tree/1.26.7) (2023-06-19)
------------------------------------------------------------------------------------------------------------------
Expand Down
37 changes: 37 additions & 0 deletions birdhouse/components/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,40 @@ define your custom values in ``env.local`` directly.

.. |cowbird-default| replace:: cowbird/default.env
.. _cowbird-default: ./cowbird/default.env


STAC
====

`STAC`_ is the common name of the REST API that implements the STAC specification, common representation of geospatial
information.

.. _STAC: https://stacspec.org/en

Usage
-----

The STAC API can be browsed via the ``stac-browser`` component. By default, the browser will point to the STAC API
exposed by the current stack instance. Once this component is enabled, STAC API will be accessible at
``https://<PAVICS_FQDN_PUBLIC>/stac`` endpoint and the STAC browser will be available at
``https://<PAVICS_FQDN_PUBLIC>/stac-browser`` endpoint. In order to make the STAC browser the default entrypoint,
define the following in the ``env.local`` file::

export PROXY_ROOT_LOCATION="return 302 https://\$host/stac-browser;"

Here is a sample search query using a CLI::

.. code-block:: shell

pip install pystac-client
stac-client search $PAVIS_FQDN/stac -q "variable_id=txgt_32" "scenario=ssp585"

Calls to the STAC API pass through Twitcher in order to validate authorization. Unauthenticated users will have
read-only access by default to STAC API resources while members of the `stac-admin` group can create and modify
resources. STAC Browser is not protected by any authorization mechanism.

How to Enable the Component
---------------------------

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``"./optional-components/stac"`` to ``EXTRA_CONF_DIRS``.
1 change: 1 addition & 0 deletions birdhouse/components/stac/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config/proxy/conf.extra-service.d/stac.conf
matprov marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "3.4"
services:
proxy:
volumes:
- ./components/stac/config/canarie-api/canarie_api_monitoring.py:${CANARIE_MONITORING_EXTRA_CONF_DIR}/stac_canarie_api_monitoring.py:ro
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
SERVICES['STAC'] = {
'info': {
'name': 'STAC',
'synopsis': 'STAC is the common name of the REST API that implements the STAC specification, common representation of geospatial information.',
'version': "",
'institution': 'CRIM',
'releaseTime': "2023-06-16T00:00:00Z",
'researchSubject': 'Any',
'supportEmail': '${SUPPORT_EMAIL}',
'category': 'Data Manipulation',
'tags': ['Catalog', 'Data', 'OGC']
},
'stats': {
'method': '.*',
'route': "/stac/.*"
},
'redirect': {
'doc': 'https://stac-utils.github.io/stac-fastapi/',
'releasenotes': 'https://github.com/crim-ca/sac-app/blob/master/CHANGES.rst',
'support': 'https://github.com/crim-ca/stac-app/issues',
'source': 'https://github.com/crim-ca/stac-app',
'tryme': 'https://${PAVICS_FQDN_PUBLIC}/stac/',
'licence': 'https://github.com/crim-ca/stac-app/blob/master/LICENSE',
'provenance': 'https://github.com/crim-ca/stac-app'
},
"monitoring": {
"STAC": {
'request': {
'url': 'http://stac:8000/stac'
}
}
}
}

# vi: tabstop=8 expandtab shiftwidth=4 softtabstop=4 syntax=python
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

location /stac {
# We need the first `/stac` for service resolution.
# We need the second `/stac` for API redirect in STAC (see `root-path` and `ROUTER_PREFIX`).
# See https://github.com/stac-utils/stac-fastapi/issues/427
# See https://github.com/crim-ca/stac-app/blob/main/stac_app.py#L60
proxy_pass https://${PAVICS_FQDN_PUBLIC}${TWITCHER_PROTECTED_PATH}/stac/stac;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_buffering off;
include /etc/nginx/conf.d/cors.include;
}

location /stac-browser/ {
# STAC API is protected behind Twitcher so we might not need to protect the browser as well.
# In case we encounter a valid use case in which we need to protect the browser, we might
# consider using Twitcher's verify capability to protect the route in an efficient manner.
proxy_pass http://stac-browser:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host localhost;
proxy_set_header X-Forwarded-Server localhost;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Origin localhost;
proxy_hide_header Access-Control-Allow-Origin;
proxy_redirect off;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "3.4"
services:
proxy:
volumes:
- ./components/stac/config/proxy/conf.extra-service.d:/etc/nginx/conf.extra-service.d/stac:ro
16 changes: 16 additions & 0 deletions birdhouse/components/stac/default.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export STAC_POSTGRES_USER=${POSTGRES_PAVICS_USERNAME}
export STAC_POSTGRES_PASSWORD=${POSTGRES_PAVICS_PASSWORD}
export STAC_PGUSER=${POSTGRES_PAVICS_USERNAME}
export STAC_PGPASSWORD=${POSTGRES_PAVICS_PASSWORD}
matprov marked this conversation as resolved.
Show resolved Hide resolved

# add any new variables not already in 'VARS' or 'OPTIONAL_VARS' that must be replaced in templates here
# single quotes are important in below list to keep variable names intact until 'pavics-compose' parses them
EXTRA_VARS='
$STAC_POSTGRES_USER
$STAC_POSTGRES_PASSWORD
$STAC_PGUSER
$STAC_PGPASSWORD
'
# extend the original 'VARS' from 'birdhouse/pavics-compose.sh' to employ them for template substitution
# adding them to 'VARS', they will also be validated in case of override of 'default.env' using 'env.local'
VARS="$VARS $EXTRA_VARS"
63 changes: 63 additions & 0 deletions birdhouse/components/stac/docker-compose-extra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: "3.4"

x-logging:
&default-logging
driver: "json-file"
options:
max-size: "50m"
max-file: "10"

services:
stac:
container_name: stac
image: ghcr.io/crim-ca/stac-app:main
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not using exact version for reproductibility?

Copy link
Collaborator

@mishaschwartz mishaschwartz Aug 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this first? crim-ca/stac-app#1

depends_on:
- stac-db
environment:
- POSTGRES_USER=${STAC_POSTGRES_USER}
- POSTGRES_PASS=${STAC_POSTGRES_PASSWORD}
- POSTGRES_DBNAME=postgis
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, is postgis hardcoded somewhere? Why not call the DB simply stac?

- POSTGRES_HOST_READER=stac-db
- POSTGRES_HOST_WRITER=stac-db
- POSTGRES_PORT=5432
- ROUTER_PREFIX=/stac
- OPENAPI_URL=/stac/api
- DOCS_URL=/stac/api.html
logging: *default-logging
restart: always

stac-browser:
container_name: stac-browser
image: ghcr.io/crim-ca/stac-browser:docker_image_push
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Versionned image for reproductibility?

environment:
- CATALOG_URL=https://${PAVICS_FQDN_PUBLIC}/stac/
- ROOT_PATH=/stac-browser/

stac-db:
container_name: stac-db
image: ghcr.io/stac-utils/pgstac:v0.6.10
environment:
- POSTGRES_USER=${STAC_POSTGRES_USER}
- POSTGRES_PASSWORD=${STAC_POSTGRES_PASSWORD}
- POSTGRES_DB=postgis
- PGUSER=${STAC_PGUSER}
- PGPASSWORD=${STAC_PGPASSWORD}
- PGHOST=localhost
- PGDATABASE=postgis
volumes:
- stac-db:/var/lib/postgresql/data
healthcheck:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to have a healthcheck here. The other 2 containers, would be nice to have some sort of healthcheck as well.

test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5

# extend proxy with endpoint and config for STAC API access
proxy:
matprov marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate fragment with existing file birdhouse/components/stac/config/proxy/docker-compose-extra.yml !

volumes:
- ./components/stac/conf.extra-service.d:/etc/nginx/conf.extra-service.d/stac:ro
links:
matprov marked this conversation as resolved.
Show resolved Hide resolved
- stac

volumes:
stac-db:
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
proxy_set_header X-Forwarded-Proto $real_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header Forwarded "proto=https;host=${PAVICS_FQDN}"; # Helps the STAC component to craft URLs containing the full PAVICS_FQDN
matprov marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better use PAVICS_FQDN_PUBLIC for anything public facing.

}
16 changes: 16 additions & 0 deletions birdhouse/optional-components/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,19 @@ See |geoserver_secured_pr|_. for more details.

.. _geoserver_secured_pr: https://github.com/bird-house/birdhouse-deploy/pull/242
.. |geoserver_secured_pr| replace:: Pull Request


Populate STAC catalog with sample data
--------------------------------------------------------

STAC Populator contains the workflow logic to ingest sample STAC item into the STAC catalog.

Once enabled in the stack, this component will run automatically on stack boot time in order to populate the catalog.
On stack initialization, STAC item generation workflows will run for ``STAC_ASSET_GENERATOR_TIMEOUT`` seconds in order
to populate the catalog with sample data. Change this timeout as needed, as there are no impact on the stack boot,
except time required to feed the catalog.

To enable this optional-component:

- Edit ``env.local`` (a copy of `env.local.example`_)
- Add ``"./optional-components/stac-populator"`` to ``EXTRA_CONF_DIRS``.
matprov marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
# add any component that this component requires to run
COMPONENT_DEPENDENCIES="
./config/magpie
./optional-components/stac-public-access
"
15 changes: 15 additions & 0 deletions birdhouse/optional-components/stac-populator/default.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export STAC_ASSET_GENERATOR_TIMEOUT=30
matprov marked this conversation as resolved.
Show resolved Hide resolved

# add any new variables not already in 'VARS' or 'OPTIONAL_VARS' that must be replaced in templates here
# single quotes are important in below list to keep variable names intact until 'pavics-compose' parses them
EXTRA_VARS='
$STAC_ASSET_GENERATOR_TIMEOUT
'
# extend the original 'VARS' from 'birdhouse/pavics-compose.sh' to employ them for template substitution
# adding them to 'VARS', they will also be validated in case of override of 'default.env' using 'env.local'
VARS="$VARS $EXTRA_VARS"

# add any component that this component requires to run
COMPONENT_DEPENDENCIES="
./components/stac
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3.4"

x-logging:
&default-logging
driver: "json-file"
options:
max-size: "50m"
max-file: "10"

services:
matprov marked this conversation as resolved.
Show resolved Hide resolved
# populates STAC catalog with sample collection items
stac-populator:
container_name: stac-populator
image: ghcr.io/crim-ca/stac-populator:master
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Versionned image for reproductibility?

environment:
- STAC_ASSET_GENERATOR_TIMEOUT=${STAC_ASSET_GENERATOR_TIMEOUT}
- STAC_HOST=http://stac:8000/stac # STAC API internally accessed to avoid Twitcher authentication
command: >
bash -c "./wait-for-it.sh stac:8000 -t 30 && ./populate.sh"
matprov marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noob question about the stac-populator: does this just populate once and exit or it stays in the background and listen for new data and repopulate?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another Noob question about the stac-populator: how does it knows which collection to crawl and populate the stac-db? Is the path https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/catalog/datasets/catalog.html hardcoded? This should be configurable.

Or are we crawling directly on disk? But then I do not see any volume-mount.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tlvu The pipeline for populating STAC is being handled in a separate repo (https://github.com/crim-ca/stac-populator). I think this is just for testing.

depends_on:
- stac
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config/magpie/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
providers:
# definition of STAC service for API access
stac:
url: http://stac:8000
title: STAC
public: true
c4i: false
type: api
sync_type: api

permissions:
- service: stac
permission: read
group: anonymous
action: create
- service: stac
permission: write
group: stac-admin
action: create
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# add any component that this component requires to run
COMPONENT_DEPENDENCIES="
./components/stac
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: "3.4"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire file should be in birdhouse/optional-components/stac-public-access/config/magpie/docker-compose-extra.yml to follow the new layout I think.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mishaschwartz Oh this one is a special case ! If this file move to birdhouse/optional-components/stac-public-access/config/magpie/docker-compose-extra.yml, then there is no file docker-compose-extra.yml at the root of this component birdhouse/optional-components/stac-public-access/ !

Would the "inner" docker-compose fragment file be discovered even if no file at the root of the component?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works... but if we want to follow the pattern we use elsewhere we should really add this to birdhouse/optional-components/stac-public-access/config/magpie/docker-compose-extra.yml so that it will only be set if magpie is enabled as well.

We're almost certainly going to make magpie a required component but it would be nicer to keep the pattern we've already established.

Thanks for finding that @tlvu

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes agreed. The new directory layout pattern is not only for looking nice and tidy, it's to allow 100% flexible deployment.

I think we need to document this pattern here https://github.com/bird-house/birdhouse-deploy/blob/master/birdhouse/README.rst and explain the proper reason behind it.

services:
magpie:
volumes:
- ./optional-components/stac-public-access/config/magpie/config.yml:${MAGPIE_PERMISSIONS_CONFIG_PATH}/stac-public-access.yml:ro
- ./optional-components/stac-public-access/config/magpie/config.yml:${MAGPIE_PROVIDERS_CONFIG_PATH}/stac-public-access.yml:ro
Loading