Skip to content

Commit

Permalink
Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
eboileau committed Jun 24, 2024
1 parent 41bc339 commit 243a51c
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion client/src/views/SearchView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function lazyLoad(event) {
matchMode: 'in'
}
}
HTTP.get('/modification', {
HTTP.get('/modification/', {
params: {
modification: selectedModification.value.key,
organism: selectedOrganism.value.key,
Expand Down
2 changes: 1 addition & 1 deletion docker/app_container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COPY docker/app_container/files/. /app/
RUN apt-get update \
&& apt-get install -y bedtools findutils \
&& useradd app \
&& mkdir -p /uploads /tmp/bedtools /app/venv \
&& mkdir -p /uploads /app/venv \
&& chown -R app /uploads /install /app/venv \
&& cp -r /install/migrations /install/alembic.ini /app

Expand Down
1 change: 1 addition & 0 deletions docker/app_container/files/entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ def get_secret(path):
system("cd /app && /app/mini_cron.sh &")
system(
f"exec su - app /app/run_flask.sh {environ.get('HTTP_WORKER_PROCESSES')} {environ.get('HTTP_WORKER_TIMEOUT', 30)}"
f" {environ.get('HTTP_REVERSE_PROXY_IPS', '')}"
)
7 changes: 2 additions & 5 deletions docker/app_container/files/mini_cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ then
echo 'mini_cron.sh: No $UPLOAD_PATH - aborting.'
exit 1
fi
if [[ -z $BEDTOOLS_TMP_PATH ]]
then
echo 'mini_cron.sh: No $BEDTOOLS_TMP_PATH - aborting.'
exit 1
fi

mkdir -p $BEDTOOLS_TMP_PATH

while [[ 1 = 1 ]]
do
Expand Down
9 changes: 7 additions & 2 deletions docker/app_container/files/run_flask.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/bin/bash
#!/bin/sh

echo '### Activating venv ###'
. /app/venv/bin/activate
cd /app
echo '### Upgrading Database ###'
alembic upgrade head
echo '### Starting gunicorn ###'
exec gunicorn -b 0.0.0.0:8000 -w $1 --timeout $2 'scimodom.app:create_app()'
extra_opts=''
if [ "X$3" != X ]
then
extra_opts="--forwarded-allow-ips=$3"
fi
exec gunicorn -b 0.0.0.0:8000 -w $1 --timeout $2 $extra_opts 'scimodom.app:create_app()'
4 changes: 4 additions & 0 deletions server/env_example
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ HTTP_WORKER_TIMEOUT=120
# Usually you will have a reverse proxy in front to terminate TLS.
# Use it's name below.
HTTP_PUBLIC_URL=https://scimodom.my-site.org
# If we run behind a reverse proxy we need to know it's IP address(es) so that we trust
# the X-Forwarded-Proto header. Otherwise, we might generate incorrect redirects
# (http instead of https).
HTTP_REVERSE_PROXY_IPS=...

# Mail server to use. It must be willing to relay emails
# for your host/SMTP_FROM_ADDRESS.
Expand Down
2 changes: 1 addition & 1 deletion server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [
"Flask-Cors",
"Flask-JWT-Extended",
"mysqlclient",
"numpy",
"numpy<2",
"pandas",
"pybedtools",
"python-dotenv",
Expand Down
2 changes: 2 additions & 0 deletions server/src/scimodom/services/bedtools.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from functools import cache
import logging
from os import makedirs
from pathlib import Path
from typing import Iterable, Sequence, Any

Expand Down Expand Up @@ -91,6 +92,7 @@ def _remove_filno(feature, n_fields: int = 9, is_closest: bool = False):

class BedToolsService:
def __init__(self, tmp_path):
makedirs(tmp_path, exist_ok=True)
pybedtools.helpers.set_tempdir(tmp_path)

def annotate_data_using_ensembl(
Expand Down

0 comments on commit 243a51c

Please sign in to comment.