Commit c45cdb6f authored by Olaf Michaelis's avatar Olaf Michaelis
Browse files

Remove junk

parent 860ea755
FROM debian:latest
ARG UID=<UID>
ENV USER="rdmo"
ENV APACHE_RUN_DIR=/var/run/apache2
ENV APACHE_PID_FILE=/var/run/apache2/apache2.pid
ENV APACHE_RUN_USER="rdmo"
ENV APACHE_RUN_GROUP="rdmo"
ENV APACHE_LOG_DIR=/vol/log
RUN apt update -y && apt install -y \
apache2 \
curl \
python-psycopg2 \
libexpat1 \
apache2-utils \
ssl-cert \
python3 \
python3-dev \
python3-pip \
libapache2-mod-wsgi-py3 \
pandoc \
texlive-xetex
RUN echo "LoadModule wsgi_module /etc/apache2/modules/mod_wsgi.so" \
>> "/etc/apache2/apache2.conf"
RUN rm -f /etc/apache2/sites-enabled/*
COPY ./vhosts.conf "/etc/apache2/sites-enabled/vhosts.conf"
COPY ./drun.sh /drun.sh
COPY ./healthcheck.sh /healthcheck.sh
RUN useradd -m -u "${UID}" "${USER}"
RUN mkdir -p /var/www/html
RUN mkdir -p /var/run/apache2
HEALTHCHECK --timeout=10s --interval=20s --retries=3 \
CMD /healthcheck.sh
CMD ["/drun.sh"]
#!/bin/bash
function sanitize(){
r="$(echo "/${1}/" \
| tr -s "/" \
| sed 's/.$//'
)"
if [[ -z "${r}" ]]; then
echo "/"
else
echo "${r}"
fi
}
export BASE_STATIC=$(sanitize "${BASE_URL}/static")
export BASE_URL=$(sanitize "${BASE_URL}")
# apache gets grumpy about pre-existing pid files
rm -f /var/run/apache2/apache2.pid
apache2 -DFOREGROUND
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment