Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
seanharrison committed Oct 18, 2020
1 parent 7347c35 commit 1ae6192
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.metals
17 changes: 11 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ docker tag kruxia/svn:alpine kruxia/svn
# docker build docker --file docker/buster-slim.Dockerfile --tag kruxia/svn:buster-slim
# docker tag kruxia/svn:buster-slim kruxia/svn:buster-slim-$TIMESTAMP-$SHORT_SHA

docker push kruxia/svn
docker push kruxia/svn:alpine
docker push kruxia/svn:alpine-$TIMESTAMP-$SHORT_SHA

# docker push kruxia/svn:buster-slim
# kruxia/svn:buster-slim-$TIMESTAMP-$SHORT_SHA
while test $# -gt 0
do
case "$1" in
--push)
docker push kruxia/svn
docker push kruxia/svn:alpine
docker push kruxia/svn:alpine-$TIMESTAMP-$SHORT_SHA
;;
esac
shift
done
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ RUN apk update \
&& apk upgrade \
&& rm -rf /var/cache/apk/*

COPY ./httpd.conf /etc/apache2/httpd.conf
COPY ./dav_svn.conf /etc/apache2/conf.d/dav_svn.conf
COPY ./default-svn.conf /etc/apache2/conf.d/default-svn.conf
COPY ./default-svn.conf /etc/apache2/conf.d/default.conf

RUN mkdir -p /var/svn \
&& chown apache:apache -R /var/svn
Expand Down
11 changes: 8 additions & 3 deletions docker/default-svn.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@
PassEnv SERVER_ADMIN
PassEnv SERVER_NAME

ServerName $SERVER_NAME
ServerAdmin $SERVER_ADMIN
ServerName http://localhost/svn
ServerAdmin %{SERVER_ADMIN}

# don't redirect to add a slash -- doesn't work in this context
# DirectorySlash Off

<VirtualHost *:80>
# use stderr and stdout for all output under docker
LogLevel debug
ErrorLog /dev/stderr
CustomLog /dev/stdout combined

AddDefaultCharset utf-8
UseCanonicalName On

# this server is dedicated to the proposition that serving a set of svn repositories
# This server is dedicated to the proposition that serving a set of svn repositories
# is a service to society.
<Location />
DAV svn
Expand Down
119 changes: 119 additions & 0 deletions docker/httpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@

ServerTokens OS
ServerRoot /var/www
Listen 80

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule filter_module modules/mod_filter.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so
# LoadModule autoindex_module modules/mod_autoindex.so

<IfModule !mpm_prefork_module>
#LoadModule cgid_module modules/mod_cgid.so
</IfModule>
<IfModule mpm_prefork_module>
#LoadModule cgi_module modules/mod_cgi.so
</IfModule>
# LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
LoadModule negotiation_module modules/mod_negotiation.so

<IfModule unixd_module>
User apache
Group apache

</IfModule>

ServerAdmin [email protected]
ServerSignature On

<Directory />
AllowOverride none
Require all denied
</Directory>

DocumentRoot "/var/www/localhost/htdocs"
<Directory "/var/www/localhost/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>

<Files ".ht*">
Require all denied
</Files>

ErrorLog logs/error.log

LogLevel debug

<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

#CustomLog logs/access.log common
CustomLog logs/access.log combined
</IfModule>

<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/localhost/cgi-bin/"
</IfModule>

<IfModule cgid_module>
#Scriptsock cgisock
</IfModule>

<Directory "/var/www/localhost/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>

<IfModule headers_module>
RequestHeader unset Proxy early
</IfModule>

<IfModule mime_module>
TypesConfig /etc/apache2/mime.types

#AddType application/x-gzip .tgz
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

#AddHandler cgi-script .cgi
#AddHandler type-map var
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>

<IfModule mime_magic_module>
MIMEMagicFile /etc/apache2/magic
</IfModule>

IncludeOptional /etc/apache2/conf.d/*.conf

0 comments on commit 1ae6192

Please sign in to comment.