Skip to content

Commit

Permalink
Set the curator version from the Docker environment at build time #2289
Browse files Browse the repository at this point in the history
  • Loading branch information
iamleeg committed Feb 21, 2022
1 parent 988d50a commit ffe47e8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ services:
AWS_SES_SENDER: "${AWS_SES_SENDER}"
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
CURATOR_VERSION: "${CURATOR_VERSION}"
DB_CONNECTION_STRING: "mongodb://mongo:27017/covid19"
DATASERVER_URL: "http://data:3000"
EMAIL_USER_ADDRESS: "${EMAIL_USER_ADDRESS}"
Expand Down
2 changes: 1 addition & 1 deletion dev/run_full_stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ set -e
# Store current directory.
# We have to run docker compose from this directory for it to pick up the .env file.
pushd `dirname "$0"`
docker compose -f docker-compose.yml -f docker-compose.dev.full.yml up --build --force-recreate --renew-anon-volumes
CURATOR_VERSION=`git rev-parse HEAD` docker compose -f docker-compose.yml -f docker-compose.dev.full.yml up --build --force-recreate --renew-anon-volumes
# Restore directory.
popd
1 change: 1 addition & 0 deletions dev/run_stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
pushd `pwd`
# We have to run docker compose from this directory for it to pick up the .env file.
cd `dirname "$0"`
export CURATOR_VERSION=`git rev-parse HEAD`
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build --force-recreate --renew-anon-volumes
# Restore directory.
popd
2 changes: 2 additions & 0 deletions verification/curator-service/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Dev docker file for curator service.
FROM node:14.17.1

# set the version (this should be set from outside)
ENV CURATOR_VERSION=${CURATOR_VERSION:-unset}
# Build the curator service.
WORKDIR /usr/src/app/verification/curator-service/api
# Install app dependencies
Expand Down

0 comments on commit ffe47e8

Please sign in to comment.