Unify with gvaldap

This commit is contained in:
Jan Dittberner 2023-02-19 17:48:46 +01:00
parent f5ded26689
commit fc9723c401
2 changed files with 22 additions and 12 deletions

View file

@ -6,16 +6,17 @@ ARG POETRY_VERSION=1.3.1
ENV LC_ALL=C.UTF-8 ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8 ENV LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \ RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
build-essential \ build-essential \
curl \ curl \
git \ git \
python3-dev \ python3-dev \
python3-setuptools \ python3-setuptools \
python3-virtualenv \ python3-virtualenv \
python3-wheel python3-wheel
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/root/.local POETRY_VERSION=$POETRY_VERSION python3 - \ RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/root/.local POETRY_VERSION=$POETRY_VERSION python3 - \
&& /root/.local/bin/poetry config virtualenvs.in-project true && /root/.local/bin/poetry config virtualenvs.in-project true
@ -29,6 +30,10 @@ RUN /root/.local/bin/poetry install --only=main
FROM debian:$DEBIAN_RELEASE FROM debian:$DEBIAN_RELEASE
LABEL maintainer="Jan Dittberner <jan@dittberner.info>" LABEL maintainer="Jan Dittberner <jan@dittberner.info>"
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
ca-certificates \ ca-certificates \
@ -47,7 +52,8 @@ ARG GVAUID=2000
WORKDIR /srv/$GVAAPP WORKDIR /srv/$GVAAPP
RUN addgroup --gid $GVAGID $GVAAPP ; \ RUN addgroup --gid $GVAGID $GVAAPP ; \
adduser --home /home/$GVAAPP --shell /bin/bash --uid $GVAUID --gid $GVAGID --disabled-password --gecos "User for gnuviechadmin component $GVAAPP" $GVAAPP adduser --home /home/$GVAAPP --shell /bin/bash --uid $GVAUID --gid $GVAGID --disabled-password \
--gecos "User for gnuviechadmin component $GVAAPP" $GVAAPP
COPY --chown=$GVAAPP:$GVAAPP --from=builder /srv/$GVAAPP/.venv /srv/$GVAAPP/.venv COPY --chown=$GVAAPP:$GVAAPP --from=builder /srv/$GVAAPP/.venv /srv/$GVAAPP/.venv

View file

@ -2,6 +2,10 @@
set -e set -e
. /srv/gvaweb/.venv/bin/activate QUEUE=web
cd /srv/gvaweb/gvaweb TASKS=${QUEUE}tasks
celery -A webtasks worker -Q web -l info APP=gvaweb
. "/srv/${APP}/.venv/bin/activate"
cd /srv/${APP}/${APP}
celery -A "${TASKS}" worker -Q "${QUEUE}" -l info