Skip to content

Commit 3d02099

Browse files
committed
Disable Apache directory listing
1 parent 7418d6d commit 3d02099

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

Dockerfile

+18-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ FROM ubuntu/apache2:2.4-20.04_beta
33
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
44
ln -sf /dev/stderr /var/log/apache2/error.log && \
55
# Enable Common Gateway Interface scripts that comprise much of FORCAST's backend
6-
a2enmod cgi
6+
a2enmod cgi && \
7+
# Enable mod_rewrite for the / homepage redirect
8+
a2enmod rewrite && \
9+
# Disable directory listings. This is a core module, which requires --force
10+
a2dismod --force autoindex
711
RUN apt update -y && \
812
apt install -y \
913
# MongoDB 3.6 for storing guides and primers
@@ -22,21 +26,26 @@ RUN apt update -y && \
2226
rm -rf /var/lib/apt/lists/* && \
2327
# python-pip is no longer included in the distribution as Python 2 is out of support
2428
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py | python
29+
# In-silico PCR tool for primer design
2530
RUN curl -Lo /usr/local/bin/dicey https://github.com/gear-genomics/dicey/releases/download/v0.1.8/dicey_v0.1.8_linux_x86_64bit && \
2631
chmod +x /usr/local/bin/dicey
32+
# UCSC Genome Browser kent binaries
33+
RUN curl -Lo /usr/local/bin/faToTwoBit https://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/faToTwoBit \
34+
-Lo /usr/local/bin/twoBitToFa https://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/twoBitToFa && \
35+
chmod +x /usr/local/bin/faToTwoBit /usr/local/bin/twoBitToFa
2736
ARG JBROWSE_VERSION=1.12.3
2837
RUN curl -LO https://jbrowse.org/releases/JBrowse-${JBROWSE_VERSION}/JBrowse-${JBROWSE_VERSION}.zip && \
2938
unzip JBrowse-${JBROWSE_VERSION}.zip && \
3039
mv JBrowse-${JBROWSE_VERSION} /var/www/html/jbrowse && \
3140
rm JBrowse-${JBROWSE_VERSION}.zip && \
32-
cd /var/www/html/jbrowse && ./setup.sh
33-
RUN pip install --no-cache-dir pymongo==3.8.0 requests==2.22.0 && \
34-
pip3 install --no-cache-dir pymongo==3.8.0 requests==2.20.0 Jinja2==3.1.2
35-
RUN curl -Lo /usr/local/bin/faToTwoBit https://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/faToTwoBit \
36-
-Lo /usr/local/bin/twoBitToFa https://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/twoBitToFa && \
37-
chmod +x /usr/local/bin/faToTwoBit /usr/local/bin/twoBitToFa
41+
cd /var/www/html/jbrowse && ./setup.sh && \
42+
# Default FORCAST configuration for JBrowse. jbrowse/data/datasets.conf is bind-mounted for editing.
43+
echo -e "classicMenu = true\ninclude += data/datasets.conf\n\n[aboutThisBrowser]\ntitle = FORCAST" >> /var/www/html/jbrowse/jbrowse.conf
44+
# Dependencies for FORCAST CGI scripts
45+
RUN pip install --no-cache-dir pymongo==3.12.3 requests==2.27.1 && \
46+
pip3 install --no-cache-dir pymongo==3.12.3 requests==2.27.1 Jinja2==3.1.2
3847
COPY config-template /var/www/html/config
3948
WORKDIR /var/www/html
40-
RUN echo -e "classicMenu = true\ninclude += data/datasets.conf\n\n[aboutThisBrowser]\ntitle = FORCAST" >> jbrowse/jbrowse.conf
41-
RUN a2enmod rewrite
49+
# Replace the /usr/sbin/apachectl script that is called with the Apache master process that respects signals
50+
ENV APACHE_HTTPD exec /usr/sbin/apache2
4251
CMD service mongodb start && exec apache2-foreground

0 commit comments

Comments
 (0)