Skip to content

Commit

Permalink
Make version envvar optional -- breaks dev override
Browse files Browse the repository at this point in the history
The mandatory variable check runs even if the string with the mandatory
variable check is overridden by another compose file. This seems like a
flaw in docker-compose's behavior -- overrides should come first, then
evaluation, right? I'm sure there's a good reason things are the way
they are.
  • Loading branch information
mfisher87 committed Jul 26, 2023
1 parent 8c8c1a7 commit bccb93b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions doc/contributor/how-to/run-qgreenland.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,23 @@ The source code looks at these envvars, if set:

#### Mandatory Docker Compose envvars

* `QGREENLAND_VERSION`: The `nsidc/qgreenland` docker image tag to use.


#### Optional Docker Compose envvars

Our source code expects to run in a container and has hard-coded path constants. We
should move these envvars and defaults into the source code, but for now they're for
configuring the compose stack to route directories on the host to the hard-coded
container locations.

* `QGREENLAND_VERSION`: The `nsidc/qgreenland` docker image tag to use. Defaults to
`latest`.
* `QGREENLAND_DATA_WORKING_STORAGE`: defaults to `./data/working-storage`
* `QGREENLAND_DATA_PRIVATE_ARCHIVE`: defaults to `./data/private-archive`
* `QGREENLAND_DATA_LOGS`: defaults to `./data/logs`

Visit our [storage architecture reference
documentation](../reference/architecture/storage.md) to learn more about storage
locations.


## How to start the service stack

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
# Luigi runs as a service and must have jobs submitted to it
# (`scripts/run.sh`)
luigi:
image: "nsidc/qgreenland:${QGREENLAND_VERSION:?QGREENLAND_VERSION must be set}"
image: "nsidc/qgreenland:${QGREENLAND_VERSION:-latest}"
container_name: "luigi"
volumes:
# Code
Expand Down

0 comments on commit bccb93b

Please sign in to comment.