-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-web
32 lines (26 loc) · 1.3 KB
/
Dockerfile-web
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
ARG ns=quay.io/nitrate
ARG version=latest
FROM ${ns}/base:${version}
# For mod_wsgi to store socket file.
# https://modwsgi.readthedocs.io/en/master/configuration-directives/WSGISocketPrefix.html#wsgisocketprefix
ARG wsgi_dir=/var/run/wsgi
ARG extra_requires="async,mysql,pgsql,bugzilla,socialauth"
LABEL org.opencontainers.image.description="Nitrate is a new test plan, test run and test case management system, which is written in Python and Django (the Python web framework)."
RUN dnf update -y && \
dnf --setopt=deltarpm=0 --setopt=install_weak_deps=false --nodocs \
install -y httpd python3-mod_wsgi && \
dnf clean all
RUN mkdir bootstrap ${wsgi_dir} && \
chown apache:apache uploads ${wsgi_dir} && \
sed -i -e 's/^#\(LoadModule mpm_prefork_module .\+\.so\)$/\1/' /etc/httpd/conf.modules.d/00-mpm.conf && \
sed -i -e 's/^\(LoadModule mpm_event_module .\+\.so\)$/#\1/' /etc/httpd/conf.modules.d/00-mpm.conf
# This seems useless since the parent image already sets it as WORKDIR
WORKDIR /project
COPY product.py ./venv/lib64/python3.11/site-packages/tcms/settings/product.py
COPY httpd.conf /etc/httpd/conf/httpd.conf
COPY entrypoint.sh .
RUN chmod 755 entrypoint.sh
EXPOSE 8080
USER apache
VOLUME ["/var/log/httpd", "/project/nitrate-config", "/project/uploads"]
ENTRYPOINT ["./entrypoint.sh"]