Skip to content

Commit

Permalink
Update compose JSON for new data mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisher87 committed Oct 12, 2023
1 parent e565f80 commit 952a0d9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ services:
build: .
volumes:
- "./data/variables.json:/usr/share/nginx/html/variables.json:ro"
- "./data/regions.json:/usr/share/nginx/html/regions.json:ro"
- "./data/regions:/usr/share/nginx/html/regions:ro"
- "./data/shapes:/usr/share/nginx/html/shapes:ro"
restart: "on-failure"


ingest:
image: "nsidc/snow-today-webapp-server-ingest:dev"
build:
context: .
dockerfile: Dockerfile.ingest
context: "."
dockerfile: "Dockerfile.ingest"
volumes:
- "./snow_today_webapp_ingest:/snow-today-webapp-server-ingest/snow_today_webapp_ingest:ro"
- "./data:/snow-today-webapp-server-ingest/data:rw"
24 changes: 19 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,42 @@
version: '3.4'

x-common: &common
logging:
options:
max-size: "10m"
max-file: "10"


services:

data-server:
image: "nsidc/snow-today-webapp-server:${SERVER_VERSION:-latest}"
container_name: "data-server"
<<: *common
# NB: These volumes are being mounted _over top of_ the data in this repo's
# "data" directory, which is baked into the image at build time.
volumes:
- "${STORAGE_DIR}/regions:/usr/share/nginx/html/regions:ro"
- "${STORAGE_DIR}/cogs:/usr/share/nginx/html/cogs:ro"
- "${STORAGE_DIR}/plots:/usr/share/nginx/html/plots:ro"
- "${STORAGE_DIR}/points:/usr/share/nginx/html/points:ro"
# Mount dynamic legends underneath the static legends dir
# Mount dynamic legends underneath the static legends dir; we can't merge
# the static-versioned legends that are baked into the image with legends
# provided from an external process into the same directory. This seemed
# the least-bad.
- "${STORAGE_DIR}/dynamic_legends:/usr/share/nginx/html/legends/dynamic:ro"
ports:
- "80:80"
- "443:443"
logging:
options:
max-size: "10m"
max-file: "10"


ingest:
image: "nsidc/snow-today-webapp-server-ingest:${SERVER_VERSION:-latest}"
container_name: "ingest"
<<: *common
volumes:
- "${STORAGE_DIR}/incoming:/storage/incoming:ro"
# - "${STORAGE_DIR}/regions:/storage/regions:ro"
- "${STORAGE_DIR}/cogs:/storage/cogs:rw"
- "${STORAGE_DIR}/plots:/storage/plots:rw"
- "${STORAGE_DIR}/points:/storage/points:rw"
Expand Down

0 comments on commit 952a0d9

Please sign in to comment.