pretalx / pretalx-docker

Docker setup for a complete pretalx installation. Community-sourced, not officially supported.
29 stars 39 forks source link

Plugins: where to add them in the Dockerfile? #53

Closed saschafoerster closed 8 months ago

saschafoerster commented 8 months ago

I would like to install some plugins, but I wonder, where to add them in the Dockerfile?

#Plugins
#RUN pip3 install -Ue "git+https://github.com/pretalx/pretalx-public-voting.git@main#egg=pretalx-public-voting"
#RUN pip3 install -Ue "git+https://github.com/pretalx/pretalx-pages.git@main#egg=pretalx-pages"
#RUN pip3 install -Ue "git+https://github.com/pretalx/pretalx-venueless.git@main#egg=pretalx-venueless"
#RUN pip3 install -Ue "git+https://github.com/pretalx/pretalx-youtube.git@main#egg=pretalx-youtube"
#RUN pip3 install -Ue "git+https://github.com/vmx/pretalx-community-voting.git@master#egg=pretalx-community-voting"
#RUN pip3 install -Ue "git+https://github.com/pretalx/pretalx-socialauth.git@master#egg=pretalx-socialauth"

Whatever I do, when I try some or a single of these plugins, I get build errors. My dockerfile:


FROM python:3.10-bookworm

RUN apt-get update && \
    apt-get install -y git gettext libmariadb-dev libpq-dev locales libmemcached-dev build-essential \
            supervisor \
            sudo \
            locales \
            --no-install-recommends && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    dpkg-reconfigure locales && \
    locale-gen C.UTF-8 && \
    /usr/sbin/update-locale LANG=C.UTF-8 && \
    mkdir /etc/pretalx && \
    mkdir /data && \
    groupadd -g 999 pretalxuser && \
    useradd -r -u 999 -g pretalxuser -d /pretalx -ms /bin/bash pretalxuser && \
    echo 'pretalxuser ALL=(ALL) NOPASSWD: /usr/bin/supervisord' >> /etc/sudoers

ENV LC_ALL=C.UTF-8

COPY pretalx/pyproject.toml /pretalx
COPY pretalx/src /pretalx/src
COPY deployment/docker/pretalx.bash /usr/local/bin/pretalx
COPY deployment/docker/supervisord.conf /etc/supervisord.conf

RUN pip3 install -U pip setuptools wheel typing && \
    pip3 install -e /pretalx/[mysql,postgres,redis] && \
    pip3 install pylibmc && \
    pip3 install gunicorn

#Plugins
#RUN pip3 install -Ue "git+https://github.com/pretalx/pretalx-public-voting.git@main#egg=pretalx-public-voting"
#RUN pip3 install -Ue "git+https://github.com/pretalx/pretalx-pages.git@main#egg=pretalx-pages"
#RUN pip3 install -Ue "git+https://github.com/pretalx/pretalx-venueless.git@main#egg=pretalx-venueless"
#RUN pip3 install -Ue "git+https://github.com/pretalx/pretalx-youtube.git@main#egg=pretalx-youtube"
RUN pip3 install -Ue "git+https://github.com/Kunsi/pretalx-plugin-broadcast-tools.git@main#egg=pretalx-broadcast-tools"
#RUN pip3 install -Ue "git+https://github.com/vmx/pretalx-community-voting.git@master#egg=pretalx-community-voting"
#RUN pip3 install -Ue "git+https://github.com/pretalx/pretalx-socialauth.git@master#egg=pretalx-socialauth"

RUN python3 -m pretalx makemigrations
RUN python3 -m pretalx migrate

RUN apt-get update && \
    apt-get install -y nodejs npm && \
    python3 -m pretalx rebuild && \
    apt-get remove -y nodejs npm && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

RUN chmod +x /usr/local/bin/pretalx && \
    cd /pretalx/src && \
    rm -f pretalx.cfg && \
    chown -R pretalxuser:pretalxuser /pretalx /data && \
    rm -f /pretalx/src/data/.secret

USER pretalxuser
VOLUME ["/etc/pretalx", "/data"]
EXPOSE 80
ENTRYPOINT ["pretalx"]
CMD ["all"]

Would be lovely, if someone from the community could share his working Dockerfile with plugins.

rixx commented 8 months ago

Duplicate of #13.