diff --git a/.gitignore b/.gitignore index c6234ed..b2f60a1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ ## Docker Compose # Configuration file. .env +/*.env .secrets/ # The Docker Compose "override" YAML file. diff --git a/docker-compose.override.yml-cadd b/docker-compose.override.yml-cadd new file mode 100644 index 0000000..998cc25 --- /dev/null +++ b/docker-compose.override.yml-cadd @@ -0,0 +1,56 @@ +# Docker Compose Override YAML fragment that provides a CADD REST API +# # Server +# +# Quick Manual: +# +# - merge with docker-compose.override.yml +# - place data in the right place + +# == Re-useable Definitions ================================================== + +# Default service definition for all (incl. postgres/redis/...) +x-service-default: &service_default + networks: + - varfish + restart: unless-stopped + +# == Overide Definitions ===================================================== + +services: + # -- CADD REST API --------------------------------------------------------- + # + # REST API server for CADD sequence variant annotation. + + cadd-rest-api-server: + <<: *service_default + image: "${image_cadd_name-bihealth/cadd-rest-api}:${image_cadd_version-0.3.4-0}" + env_file: cadd-rest-api.env + command: + - wsgi + volumes: + - type: bind + source: ${volumes_basedir:-./.dev/volumes}/cadd-rest-api/db + target: /data/db + read_only: false + + cadd-rest-api-worker: + <<: *service_default + deploy: + replicas: 5 + image: "${image_cadd_name-bihealth/cadd-rest-api}:${image_cadd_version-0.3.4-0}" + env_file: cadd-rest-api.env + command: + - celeryd + volumes: + - type: bind + source: ${volumes_basedir:-./.dev/volumes}/cadd-rest-api/data/annotations + target: /opt/miniconda3/share/cadd-scripts-1.6-0/data/annotations + read_only: true + - type: bind + source: ${volumes_basedir:-./.dev/volumes}/cadd-rest-api/data/prescored + target: /opt/miniconda3/share/cadd-scripts-1.6-0/data/prescored + read_only: true + - type: bind + source: ${volumes_basedir:-./.dev/volumes}/cadd-rest-api/db + target: /data/db + read_only: false diff --git a/docker-compose.yml b/docker-compose.yml index ebbcd6c..64a6f7a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -105,6 +105,7 @@ services: - "traefik.http.routers.varfish-web.middlewares=xforward" - "traefik.http.routers.varfish-web.rule=HostRegexp(`{catchall:.+}`)" - "traefik.http.services.varfish-web.loadbalancer.server.port=8080" + - "traefik.http.routers.varfish-web.tls=true" varfish-celerybeat: <<: *service_varfish_server_default diff --git a/download-data.sh b/download-data.sh index 971b7d8..bf6ff78 100644 --- a/download-data.sh +++ b/download-data.sh @@ -242,7 +242,7 @@ EOF mkdir -p $DATA_DIR/download # Download each entry from download list. Note that we support commenting # out lines with a leading "#". -grep -v ^# /tmp/download-list.txt >/tmp/download-list.nocomment.txt +grep -v ^# /tmp/download-list.txt | grep -v grch37 >/tmp/download-list.nocomment.txt while read -r line; do # Create the download directory. run mkdir -p $DATA_DIR/download/$line @@ -251,6 +251,7 @@ while read -r line; do run s5cmd \ --endpoint-url=$S3_ENDPOINT_URL \ --no-sign-request \ + --no-verify-ssl \ sync \ "s3://varfish-public/$(prefix_for $line)/$line/*" \ $DATA_DIR/download/$line \ diff --git a/utils/cadd-rest-api/cadd-rest-api.env b/utils/cadd-rest-api/cadd-rest-api.env new file mode 100644 index 0000000..9dc9fd8 --- /dev/null +++ b/utils/cadd-rest-api/cadd-rest-api.env @@ -0,0 +1,20 @@ +# Environment for cadd-rest-api related containers. + +LC_ALL=en_US.UTF-8 + +DATABASE_URL=/data/db/cadd_rest_api.db + +# We can share one redis instance but not the database with another celery. +CELERY_BROKER_URL=redis://redis:6379/1 +# Only one CADD process can be run per CADD container because of using +# Snakemake. +CELERY_WORKERS=1 + +DJANGO_ALLOWED_HOSTS="*" +DJANGO_SECRET_KEY="__DJANGO_SECRET_KEY__" +DJANGO_SETTINGS_MODULE="config.settings.production" +DJANGO_SECURE_SSL_REDIRECT=0 + +CADD_SH=/opt/miniconda3/share/cadd-scripts-1.6-0/CADD.sh +CADD_CONDA=/opt/miniconda3/bin/activate +CADD_TIMEOUT=300