Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Query from Alpine to Debian #65

Merged
merged 2 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading