Browse Source

Added Dockerfile and docker-compose.yml

This is similar to https://nuserv.uni-muenster.de:8443/jbehrens/sds-status-monitor/
but using the recent httpd Docker image as a base.
Also, the .htaccess of sds-status-monitor uses `Satisfy Any`, which seems
to bypass IP address filtering when no basic authentication is set,
which is therefore left out here.

All configuration  is in docker/custom-httpd.conf, no .htaccess is used.
2xB 2 years ago
parent
commit
bab8808be7

+ 11 - 0
Dockerfile

@@ -0,0 +1,11 @@
+FROM httpd:2.4-alpine
+
+COPY ./viewer /usr/local/apache2/htdocs/
+
+COPY ./docker/custom-httpd.conf /usr/local/apache2/conf/httpd.conf
+
+RUN adduser --disabled-password httpdusr
+
+RUN chown -R httpdusr /usr/local/apache2/logs
+
+USER httpdusr

+ 7 - 0
docker-compose.yml

@@ -0,0 +1,7 @@
+version: '3'
+services:
+  web:
+    build: .
+    ports:
+     - "8001:8001"
+    volumes:

+ 13 - 4
docker/custom-httpd.conf

@@ -49,7 +49,7 @@ ServerRoot "/usr/local/apache2"
 # prevent Apache from glomming onto all bound IP addresses.
 #
 #Listen 12.34.56.78:80
-Listen 80
+Listen 8001
 
 #
 # Dynamic Shared Object (DSO) Support
@@ -229,7 +229,7 @@ Group www-data
 # e-mailed.  This address appears on some server-generated pages, such
 # as error documents.  e.g. admin@your-domain.com
 #
-ServerAdmin you@example.com
+# ServerAdmin you@example.com
 
 #
 # ServerName gives the name and port that the server uses to identify itself.
@@ -276,7 +276,7 @@ DocumentRoot "/usr/local/apache2/htdocs"
     # http://httpd.apache.org/docs/2.4/mod/core.html#options
     # for more information.
     #
-    Options Indexes FollowSymLinks
+    Options None
 
     #
     # AllowOverride controls what directives may be placed in .htaccess files.
@@ -289,6 +289,15 @@ DocumentRoot "/usr/local/apache2/htdocs"
     # Controls who can get stuff from this server.
     #
     Require all granted
+    
+    
+    DirectoryIndex index.html
+    Order Allow,Deny
+    Allow from 141.52.12.0/24
+    Allow from 127.0.0.0/8
+    
+    # Podman network for testing
+    Allow from 10.0.2.100/1
 </Directory>
 
 #
@@ -349,7 +358,7 @@ LogLevel warn
     # If you prefer a logfile with access, agent, and referer information
     # (Combined Logfile Format) you can use the following directive.
     #
-    #CustomLog "logs/access_log" combined
+    CustomLog "logs/access_log" combined
 </IfModule>
 
 <IfModule alias_module>

+ 0 - 0
archive/archiveviewer.css → viewer/archive/archiveviewer.css


+ 0 - 0
archive/archiveviewer.js → viewer/archive/archiveviewer.js


+ 0 - 0
archive/new_monitor.html → viewer/archive/new_monitor.html


+ 0 - 0
archive/old_monitor.html → viewer/archive/old_monitor.html


+ 0 - 0
index.html → viewer/index.html


+ 2 - 0
viewer/robots.txt

@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /