elixir/docker/Dockerfile
Franciszek Stachura 5e8eb77912 Migrate from bsddb3 to berkeleydb
Following official documentation, move away from bsddb3 to berkeleydb.
https://www.jcea.es/programacion/pybsddb.htm

Main change: key and values are now bytes and not strings.

The code diff is really simple because all operations on keys/values is
done from elixir/data.py and that works fine with both bytes and
strings (it does explicit casting).
2024-11-07 16:55:14 +01:00

57 lines
1.1 KiB
Docker

FROM debian:bookworm AS build
RUN \
apt-get update && \
apt-get --no-install-recommends -y install \
python3 \
python3-pip \
python3-dev \
libdb-dev \
build-essential
WORKDIR /build/
# NOTE wheel version MUST be sycnhronized with requirements.txt
RUN pip wheel berkeleydb==18.1.10
FROM debian:bookworm
RUN \
apt-get update && \
apt-get --no-install-recommends -y install \
python3 \
python3-pip \
python3-venv \
universal-ctags \
libdb5.3 \
perl \
git \
apache2 \
libapache2-mod-wsgi-py3 \
libjansson4 \
libyaml-0-2 \
wget
COPY . /usr/local/elixir/
WORKDIR /usr/local/elixir/
COPY --from=build /build/berkeleydb-*.whl /tmp/build/
RUN python3 -m venv venv && \
. ./venv/bin/activate && \
pip install /tmp/build/berkeleydb-*.whl && \
pip install -r requirements.txt
RUN mkdir -p /srv/elixir-data/
COPY ./docker/000-default.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite
EXPOSE 80
ARG ELIXIR_VERSION
ENV ELIXIR_VERSION=$ELIXIR_VERSION
ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]