Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Koehler
rdmo-docker-compose
Commits
860ea755
Commit
860ea755
authored
Dec 23, 2019
by
Olaf Michaelis
Browse files
true
parents
3d64b4ec
f7866655
Changes
2
Hide whitespace changes
Inline
Side-by-side
apache/dockerfile_master
0 → 100644
View file @
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"]
apache/drun.sh
0 → 100755
View file @
860ea755
#!/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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment