-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (29 loc) · 1.12 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM python:3.11-bookworm as base
RUN apt-get clean && apt-get update
RUN apt-get install --yes ffmpeg
COPY requirements.txt /var/www/digitized-av-qc/requirements.txt
WORKDIR /var/www/digitized-av-qc
RUN pip install -r requirements.txt
COPY . /var/www/digitized-av-qc
FROM base as build
ARG WSGI_VERSION=5.0.0
RUN apt-get install --yes apache2 apache2-dev python3.11-dev cron
RUN wget https://github.com/GrahamDumpleton/mod_wsgi/archive/refs/tags/${WSGI_VERSION}.tar.gz \
&& tar xvfz ${WSGI_VERSION}.tar.gz \
&& cd mod_wsgi-${WSGI_VERSION} \
&& ./configure --with-apxs=/usr/bin/apxs --with-python=/usr/local/bin/python \
&& make \
&& make install \
&& make clean
RUN rm -rf ${WSGI_VERSION}.tar.gz mod_wsgi-${WSGI_VERSION}
ADD ./apache/000-digitized_av_qc.conf /etc/apache2/sites-available/000-digitized_av_qc.conf
ADD ./apache/wsgi.load /etc/apache2/mods-available/wsgi.load
RUN a2dissite 000-default.conf
RUN a2ensite 000-digitized_av_qc.conf
RUN a2enmod headers
RUN a2enmod rewrite
RUN a2enmod wsgi
COPY crontab /etc/cron.d/crontab
RUN crontab /etc/cron.d/crontab
EXPOSE 80
ENTRYPOINT [ "./entrypoint.prod.sh" ]