Skip to content

Commit

Permalink
Merge pull request #65 from CanDIG/feature/switch-to-debian
Browse files Browse the repository at this point in the history
Switch Query from Alpine to Debian
  • Loading branch information
OrdiNeu authored Dec 31, 2024
2 parents d5a6661 + 2d22650 commit cbefdf6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 36 deletions.
33 changes: 4 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,14 @@
ARG venv_python
ARG alpine_version
FROM python:${venv_python}-alpine${alpine_version}
FROM python:${venv_python}

LABEL Maintainer="CanDIG Project"
LABEL "candigv2"="query_app"

USER root

RUN addgroup -S candig && adduser -S candig -G candig

RUN apk update

RUN apk add --no-cache \
autoconf \
automake \
make \
gcc \
perl \
bash \
build-base \
musl-dev \
zlib-dev \
bzip2-dev \
xz-dev \
libcurl \
linux-headers \
curl \
curl-dev \
yaml-dev \
pcre-dev \
git \
sqlite \
libffi-dev
RUN groupadd -r candig && useradd -rm candig -g candig

RUN apt-get update

COPY requirements.txt /app/query_server/requirements.txt

Expand All @@ -45,6 +22,4 @@ RUN chown -R candig:candig /app/query_server

USER candig

RUN touch initial_setup

ENTRYPOINT ["bash", "entrypoint.sh"]
10 changes: 3 additions & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#!/usr/bin/env bash

if [[ -f "initial_setup" ]]; then
sed -i s@\<HTSGET_URL\>@$CANDIG_HTSGET_URL@ config.ini
sed -i s@\<KATSU_URL\>@$CANDIG_KATSU_URL@ config.ini
sed -i s@\<OPA_URL\>@$OPA_URL@ config.ini

rm initial_setup
fi
sed -i s@\<HTSGET_URL\>@$CANDIG_HTSGET_URL@ config.ini
sed -i s@\<KATSU_URL\>@$CANDIG_KATSU_URL@ config.ini
sed -i s@\<OPA_URL\>@$OPA_URL@ config.ini

cd query_server
gunicorn -k uvicorn.workers.UvicornWorker server:app

0 comments on commit cbefdf6

Please sign in to comment.