Unify with gvaldap/gvaweb

This commit is contained in:
Jan Dittberner 2023-02-19 17:48:25 +01:00
parent d2f94c7bec
commit 38dae51a7a
2 changed files with 8 additions and 3 deletions

View file

@ -31,6 +31,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 \
@ -63,6 +67,6 @@ VOLUME /srv/$GVAAPP
EXPOSE 8000 EXPOSE 8000
COPY gva.sh /srv/ COPY ${GVAAPP}.sh /srv/
ENTRYPOINT ["dumb-init", "/srv/gva.sh"] ENTRYPOINT ["dumb-init", "/srv/${GVAAPP}.sh"]

3
gva.sh
View file

@ -7,8 +7,9 @@ DB_PORT="${GVA_PGSQL_PORT:-5432}"
DB_USER="${GVA_PGSQL_USER:-gnuviechadmin}" DB_USER="${GVA_PGSQL_USER:-gnuviechadmin}"
DB_NAME="${GVA_PGSQL_DATABASE:-gnuviechadmin}" DB_NAME="${GVA_PGSQL_DATABASE:-gnuviechadmin}"
until pg_isready -q -h "${DB_HOST}" -p "${DB_PORT}" -U "${PG_USER}" -d "${DB_NAME}" until pg_isready -q -h "${DB_HOST}" -p "${DB_PORT}" -U "${DB_USER}" -d "${DB_NAME}"
do do
# shellcheck disable=SC2039
echo -n "." echo -n "."
sleep 1 sleep 1
done done