Use poetry to install fasjson
Otherwise it's no use locking the dependency versions. Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
815012083e
commit
cca5130e02
2 changed files with 7 additions and 12 deletions
|
@ -3,13 +3,11 @@ LABEL \
|
||||||
name="fasjson" \
|
name="fasjson" \
|
||||||
vendor="Fedora Infrastructure" \
|
vendor="Fedora Infrastructure" \
|
||||||
license="GPLv3+"
|
license="GPLv3+"
|
||||||
ENV HOME=/tmp
|
ENV HOME=/opt
|
||||||
RUN dnf install -y \
|
RUN dnf install -y \
|
||||||
openldap-clients \
|
openldap-clients \
|
||||||
vim \
|
vim \
|
||||||
git \
|
git \
|
||||||
python3-pip \
|
|
||||||
python3-setuptools \
|
|
||||||
ipa-client \
|
ipa-client \
|
||||||
gcc \
|
gcc \
|
||||||
python-devel \
|
python-devel \
|
||||||
|
@ -20,21 +18,17 @@ RUN dnf install -y \
|
||||||
mod_session \
|
mod_session \
|
||||||
policycoreutils-python-utils \
|
policycoreutils-python-utils \
|
||||||
python3-mod_wsgi \
|
python3-mod_wsgi \
|
||||||
python3-dns \
|
python3-pip && \
|
||||||
python3-flask \
|
|
||||||
python3-gssapi \
|
|
||||||
python3-requests-gssapi \
|
|
||||||
python3-ldap \
|
|
||||||
python3-pip \
|
|
||||||
python3-wheel && \
|
|
||||||
dnf autoremove -y && \
|
dnf autoremove -y && \
|
||||||
dnf clean all -y
|
dnf clean all -y
|
||||||
|
RUN python3 -m venv /opt/venv
|
||||||
|
RUN /opt/venv/bin/pip install poetry
|
||||||
RUN git clone https://github.com/fedora-infra/fasjson.git && \
|
RUN git clone https://github.com/fedora-infra/fasjson.git && \
|
||||||
pushd fasjson && \
|
pushd fasjson && \
|
||||||
git checkout {{ (env == 'production')|ternary('stable', 'staging') }} && \
|
git checkout {{ (env == 'production')|ternary('stable', 'staging') }} && \
|
||||||
pip-3 install . && \
|
/opt/venv/bin/poetry config virtualenvs.create false && \
|
||||||
|
/opt/venv/bin/poetry install --no-dev && \
|
||||||
popd && \
|
popd && \
|
||||||
rm -rf fasjson
|
|
||||||
RUN rm -f /etc/krb5.conf && ln -sf /etc/krb5/krb5.conf /etc/krb5.conf && \
|
RUN rm -f /etc/krb5.conf && ln -sf /etc/krb5/krb5.conf /etc/krb5.conf && \
|
||||||
rm -f /etc/openldap/ldap.conf && ln -sf /etc/ipa/ldap.conf /etc/openldap/ldap.conf
|
rm -f /etc/openldap/ldap.conf && ln -sf /etc/ipa/ldap.conf /etc/openldap/ldap.conf
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
|
@ -47,6 +47,7 @@ ErrorLog /httpdir/error.log
|
||||||
LogLevel info
|
LogLevel info
|
||||||
|
|
||||||
WSGISocketPrefix run/wsgi
|
WSGISocketPrefix run/wsgi
|
||||||
|
WSGIPythonHome /opt/venv
|
||||||
WSGIDaemonProcess fasjson processes=4 threads=1 maximum-requests=500 \
|
WSGIDaemonProcess fasjson processes=4 threads=1 maximum-requests=500 \
|
||||||
display-name=%{GROUP} socket-timeout=2147483647 \
|
display-name=%{GROUP} socket-timeout=2147483647 \
|
||||||
lang=C.UTF-8 locale=C.UTF-8 home=/httpdir
|
lang=C.UTF-8 locale=C.UTF-8 home=/httpdir
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue