Skip to content

Commit

Permalink
Merge branch 'hotfix/1.13.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-yuen committed Oct 27, 2022
2 parents 338070f + fe16292 commit 06503ef
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 25 deletions.
4 changes: 0 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ services:
migration:
image: quay.io/dockstore/dockstore-webservice@${DOCKSTORE_IMAGE_DIGEST}
volumes:
- log_volume:/dockstore_logs
- ./config/web.yml:/home/web.yml
- ./config/init_migration.sh:/home/init_migration.sh
command: ["bash", "/home/init_migration.sh"]
Expand All @@ -21,11 +20,9 @@ services:
depends_on:
- migration
volumes:
- log_volume:/dockstore_logs
- ./config/web.yml:/home/web.yml
- ./config/init_webservice.sh:/home/init_webservice.sh
- ${GITHUB_APP_PRIVATE_KEY_FILE}:/dockstore/github-key/dockstore-github-private-key.pem
- ../language-plugins/:/root/.dockstore/language-plugins
command: ["bash", "/home/init_webservice.sh"]
ports:
- "8081:8081"
Expand Down Expand Up @@ -75,6 +72,5 @@ services:
# awslogs-stream: "metricbeat"

volumes:
log_volume:
esdata1:
driver: local
14 changes: 0 additions & 14 deletions install_bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -66,27 +66,13 @@ function template()
for f in $(ls templates/rules/); do mustache dockstore_launcher_config/compose.config templates/rules/$f > config/rules/$f; done
}

# Delete any galaxy plugin versions already in folder and download if a version has been specified.
function download_galaxy()
{
if [ ! -d "../language-plugins" ] ; then
mkdir ../language-plugins
fi

find ../language-plugins -regextype posix-extended -regex '.*dockstore-galaxy-interface.*' -delete
wget -nc -P ../language-plugins/ https://artifacts.oicr.on.ca/artifactory/collab-release/com/github/galaxyproject/dockstore-galaxy-interface/dockstore-galaxy-interface/${GALAXY_PLUGIN_VERSION}/dockstore-galaxy-interface-${GALAXY_PLUGIN_VERSION}.jar

}

#Read the config file if it exists
if [ -f dockstore_launcher_config/compose.config ] ; then
source <(jq -r 'to_entries|map("\(.key)=\"\(.value|tostring)\"")|.[]' dockstore_launcher_config/compose.config)
fi

template

download_galaxy "$*"

if [ $IS_FARGATE_DEPLOY == "false" ]; then
# We need to set the environment variable for the image digest
source .env
Expand Down
7 changes: 4 additions & 3 deletions scripts/webservice-image-digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ def get_commit_from_github(tag_or_branch):
def get_digest_from_s3(directory):
# downloads the image-digest.txt from a directory in S3
base_url = "https://gui.dockstore.org"
response = requests.get("{}/{}/image-digest.txt".format(base_url, directory))
digest_url = "{}/{}/image-digest.txt".format(base_url, directory.replace("/", "_"))
response = requests.get(digest_url)
if (response.status_code != 200):
print("Expected a file at {}".format("{}/{}/image-digest.txt".format(base_url, directory)))
print("Expected a file at {}".format(digest_url))
print("The image-digest.txt was not found in S3, did the build succeed?")
exit(1)
# There is a newline at the end of the file we rstrip
Expand All @@ -70,7 +71,7 @@ def get_digest_from_s3(directory):
# slashes are replaced with _ in docker image tags
# check to see if input includes a dash followed by 7 chars
parsed = args.tag.split('-')
if len(parsed) == 2 and len(parsed[1]) == 7 and all(c in string.hexdigits for c in parsed[1]):
if len(parsed) >= 2 and len(parsed[-1]) == 7 and all(c in string.hexdigits for c in parsed[-1]):
directory = args.tag
else:
commit = get_commit_from_github(args.tag)
Expand Down
4 changes: 4 additions & 0 deletions templates/default.nginx_http.security.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ proxy_hide_header Server;
add_header X-Content-Type-Options "nosniff" always;

add_header Strict-Transport-Security $hsts_header always;

{{^PRODUCTION}}
add_header X-Robots-Tag "noindex, nofollow" always;
{{/PRODUCTION}}
6 changes: 3 additions & 3 deletions templates/init_migration.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
cd "$(dirname "$0")"

{{#DATABASE_GENERATED}}
java -Ddw.database.user=postgres -Ddw.database.password="{{{ POSTGRES_DBPASSWORD }}}" -jar /home/dockstore-webservice-*.jar db migrate web.yml --include 1.3.0.generated,1.3.1.consistency,1.4.0,1.5.0,1.6.0,1.7.0 | tee --append /dockstore_logs/webservice.out
java -Ddw.database.user=postgres -Ddw.database.password="{{{ POSTGRES_DBPASSWORD }}}" -jar /home/dockstore-webservice-*.jar db migrate web.yml --include 1.3.0.generated,1.3.1.consistency,1.4.0,1.5.0,1.6.0,1.7.0
{{/DATABASE_GENERATED}}
{{^DATABASE_GENERATED}}
java -Ddw.database.user=postgres -Ddw.database.password="{{{ POSTGRES_DBPASSWORD }}}" -jar /home/dockstore-webservice-*.jar db migrate web.yml --include 1.3.1.consistency,1.4.0,1.5.0,1.6.0,1.7.0 | tee --append /dockstore_logs/webservice.out
java -Ddw.database.user=postgres -Ddw.database.password="{{{ POSTGRES_DBPASSWORD }}}" -jar /home/dockstore-webservice-*.jar db migrate web.yml --include 1.3.1.consistency,1.4.0,1.5.0,1.6.0,1.7.0
{{/DATABASE_GENERATED}}
# this particular migration needs to run as postgres because only postgres can surrender ownership
java -Ddw.database.user=postgres -Ddw.database.password="{{{ POSTGRES_DBPASSWORD }}}" -jar /home/dockstore-webservice-*.jar db migrate web.yml --include 1.7.0.relinquish
# future migrations will start here and should be run as dockstore
java -Ddw.database.user=dockstore -Ddw.database.password="{{{ DOCKSTORE_DBPASSWORD }}}" -jar /home/dockstore-webservice-*.jar db migrate web.yml --include 1.8.0,1.9.0,1.10.0,1.11.0,1.12.0,1.13.0 | tee --append /dockstore_logs/webservice.out
java -Ddw.database.user=dockstore -Ddw.database.password="{{{ DOCKSTORE_DBPASSWORD }}}" -jar /home/dockstore-webservice-*.jar db migrate web.yml --include 1.8.0,1.9.0,1.10.0,1.11.0,1.12.0,1.13.0
2 changes: 1 addition & 1 deletion templates/init_webservice.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

cd "$(dirname "$0")"

java -XX:MaxRAMPercentage=50.0 -XX:+ExitOnOutOfMemoryError -jar /home/dockstore-webservice-*.jar server web.yml | tee --append /dockstore_logs/webservice.out
java -XX:MaxRAMPercentage=50.0 -XX:+ExitOnOutOfMemoryError -jar /home/dockstore-webservice-*.jar server web.yml


0 comments on commit 06503ef

Please sign in to comment.