This repository has been archived by the owner on Jan 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from hubmapconsortium/yuanzhou/versioning
v1.1.1 release - Add versioning, conf file mount, update docs, and deployment script
- Loading branch information
Showing
9 changed files
with
126 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
|
||
# Print a new line and the banner | ||
echo | ||
echo "==================== ONTOLOGY-API ====================" | ||
|
||
# This function sets DIR to the directory in which this script itself is found. | ||
# Thank you https://stackoverflow.com/questions/59895/how-to-get-the-source-directory-of-a-bash-script-from-within-the-script-itself | ||
function get_dir_of_this_script () { | ||
SCRIPT_SOURCE="${BASH_SOURCE[0]}" | ||
while [ -h "$SCRIPT_SOURCE" ]; do # resolve $SCRIPT_SOURCE until the file is no longer a symlink | ||
DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" >/dev/null 2>&1 && pwd )" | ||
SCRIPT_SOURCE="$(readlink "$SCRIPT_SOURCE")" | ||
[[ $SCRIPT_SOURCE != /* ]] && SCRIPT_SOURCE="$DIR/$SCRIPT_SOURCE" # if $SCRIPT_SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | ||
done | ||
DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" >/dev/null 2>&1 && pwd )" | ||
echo 'DIR of script:' $DIR | ||
} | ||
|
||
# Set the version environment variable for the docker build | ||
# Version number is from the VERSION file | ||
# Also remove newlines and leading/trailing slashes if present in that VERSION file | ||
function export_version() { | ||
export ONTOLOGY_API_VERSION=$(tr -d "\n\r" < VERSION | xargs) | ||
echo "ONTOLOGY_API_VERSION: $ONTOLOGY_API_VERSION" | ||
} | ||
|
||
|
||
if [[ "$1" != "dev" && "$1" != "prod" ]]; then | ||
echo "Unknown build environment '$1', specify one of the following: dev|prod" | ||
else | ||
if [[ "$2" != "start" && "$2" != "stop" && "$2" != "down" ]]; then | ||
echo "Unknown command '$2', specify one of the following: start|stop|down" | ||
else | ||
# Show the script dir | ||
get_dir_of_this_script | ||
|
||
# Export and show the version | ||
export_version | ||
|
||
if [ "$2" = "start" ]; then | ||
docker-compose -f docker-compose.deployment.api.yml -p ontology-api up -d | ||
elif [ "$2" = "stop" ]; then | ||
docker-compose -f docker-compose.deployment.api.yml -p ontology-api stop | ||
elif [ "$2" = "down" ]; then | ||
docker-compose -f docker-compose.deployment.api.yml -p ontology-api down | ||
fi | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...r/openapi_server/resources/app.properties → ...i_server/resources/app.properties.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[neo4j] | ||
Server = bolt://18.205.215.12:7688 | ||
Server = bolt://localhost:7687 | ||
Username = neo4j | ||
Password = HappyG0at |