-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (19 loc) · 837 Bytes
/
Dockerfile
File metadata and controls
23 lines (19 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM docker-registry.tools.wmflabs.org/toolforge-python311-sssd-web:latest
LABEL maintainer="ACorrêa (WMB) <artur.correa@wmnobrasil.org>"
# Install system dependencies
RUN apt-get update && apt-get -y install gettext curl
# Necessary flags for mysqlclient driver
ENV MYSQLCLIENT_CFLAGS="-I/usr/include/mariadb/"
ENV MYSQLCLIENT_LDFLAGS="-L/usr/lib/x86_64-linux-gnu/ -lmariadb"
ENV VIRTUAL_ENV /root/www/python/venv
ENV PATH="/root/www/python/venv/bin:${PATH}"
ENV DJANGO_SETTINGS_MODULE=qsts3.settings
ENV PYTHONPATH="/root/www/python/src:${PYTHONPATH}"
# Bootstrap like in Toolforge
WORKDIR /root/www/python/src/
COPY src/requirements.txt ./requirements.txt
RUN webservice-python-bootstrap
# Install dev dependencies
COPY requirements-dev.txt .
RUN pip install -r ./requirements-dev.txt
COPY pytest.ini /root/www/python/pytest.ini