Compare commits

...

7 Commits

  1. 62
      web/Dockerfile
  2. 166
      web/httpd.conf
  3. 166
      web/redmine.conf

@ -1,18 +1,48 @@
FROM httpd:alpine
FROM ubuntu
ARG MYSQL_ROOT_PASSWORD
ENV MYSQL_PASSWORD=${MYSQL_ROOT_PASSWORD}
ADD ./httpd.conf /usr/local/apache2/conf/httpd.conf
RUN apk update ; \
apk add -v apache2-proxy ; \
apk add -v mod_dav_svn ; \
apk add -v perl-dbi ; \
apk add -v perl-dbd-mysql ; \
apk add -v perl-ldap ; \
apk add -v subversion ; \
cd /usr/local/apache2/conf/ ; \
sed -i'' "s/redminedbpassword/$MYSQL_PASSWORD/g" httpd.conf \
;
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
apache2-mod-perl \
;
ADD ./Redmine.pm /usr/local/lib/perl5/site_perl/Apache/Authn/Redmine.pm
ENV TZ=Europe/Moscow
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV DEBIAN_FRONTEND="noninteractive"
#RUN set -x \
# && addgroup -g 82 -S www-data \
# && adduser -u 82 -D -S -G www-data www-data
# 82 is the standard uid/gid for "www-data" in Alpine
RUN apt-get update ; \
apt-get install -y apache2 ; \
a2enmod proxy ; \
a2enmod dav_fs ; \
a2enmod auth_basic ; \
apt-get install -y libapache2-svn ; \
apt-get install -y libapache2-mod-svn libsvn-dev ; \
a2enmod dav ; \
a2enmod dav_svn ; \
apt-get install -y libapache-dbi-perl ; \
apt-get install -y libdbd-mysql-perl ; \
apt-get install -y libnet-ldap-perl ; \
apt-get install -y subversion subversion-tools ; \
apt-get install -y libapache2-mod-perl2 ; \
rm /etc/apache2/sites-enabled/* ; \
rm /etc/apache2/mods-enabled/*svn* ;
# --chown=www-data:www-data
ADD ./redmine.conf /etc/apache2/sites-enabled/redmine.conf
RUN cd /etc/apache2/sites-enabled/ ; \
sed -i'' "s/redminedbpassword/$MYSQL_PASSWORD/g" redmine.conf \
;
#https://www.redmine.org/projects/redmine/repository/entry/trunk/extra/svn/Redmine.pm
ADD ./Redmine.pm /usr/local/lib/site_perl/Apache/Authn/Redmine.pm
WORKDIR /var
STOPSIGNAL SIGWINCH
EXPOSE 80
CMD ["apachectl", "-D", "FOREGROUND"]

@ -1,166 +0,0 @@
ServerRoot "/usr/local/apache2"
Listen 80
LoadModule mpm_event_module modules/mod_mpm_event.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>
</IfModule>
<IfModule mpm_prefork_module>
</IfModule>
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
<IfModule unixd_module>
User daemon
Group daemon
</IfModule>
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyPass / http://redmine:3000/
LoadModule perl_module /usr/lib/apache2/mod_perl.so
## This module has to be in your perl path
## eg: /usr/lib/perl5/Apache/Authn/Redmine.pm
PerlLoadModule Apache::Authn::Redmine
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module /usr/lib/apache2/mod_dav_svn.so
<Location /svn>
DAV svn
SVNParentPath "/var/svn"
AuthType Basic
AuthName redmine
Require valid-user
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
## for mysql
RedmineDSN "DBI:mysql:database=redmine;host=db"
RedmineDbUser "root"
RedmineDbPass "redminedbpassword"
## Optional where clause (fulltext search would be slow and
## database dependent).
# RedmineDbWhereClause "and members.role_id IN (1,2)"
## Optional credentials cache size
# RedmineCacheCredsMax 50
</Location>
#To be able to browse repository inside redmine, you must add something
#like that :
<Location /svn-private>
DAV svn
SVNParentPath "/var/svn"
Order deny,allow
Deny from all
# only allow reading orders
<Limit GET PROPFIND OPTIONS REPORT>
Allow from redmine
</Limit>
</Location>
ServerAdmin you@example.com
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/usr/local/apache2/htdocs"
<Directory "/usr/local/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog /proc/self/fd/2
LogLevel warn
<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 /proc/self/fd/1 common
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "/usr/local/apache2/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule headers_module>
RequestHeader unset Proxy early
</IfModule>
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

@ -0,0 +1,166 @@
#ServerRoot "/usr/local/apache2"
#Listen 80
#<LoadModule mpm_event_module modules/mod_mpm_event.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>
#</IfModule>
#<IfModule mpm_prefork_module>
#</IfModule>
#LoadModule dir_module modules/mod_dir.so
#LoadModule alias_module modules/mod_alias.so
#<IfModule unixd_module>
#User daemon
#Group daemon
#</IfModule>
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
ProxyPass / http://redmine:3000/
LoadModule perl_module modules/mod_perl.so
## This module has to be in your perl path
## eg: /usr/lib/perl5/Apache/Authn/Redmine.pm
PerlLoadModule Apache::Authn::Redmine
LoadModule dav_module /usr/lib/apache2/modules/mod_dav.so
LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so
<Location /svn>
DAV svn
SVNParentPath "/var/svn"
AuthType Basic
AuthName redmine
Require valid-user
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
## for mysql
RedmineDSN "DBI:mysql:database=redmine;host=db"
RedmineDbUser "root"
RedmineDbPass "mrpassword"
## Optional where clause (fulltext search would be slow and
## database dependent).
# RedmineDbWhereClause "and members.role_id IN (1,2)"
## Optional credentials cache size
# RedmineCacheCredsMax 50
</Location>
#To be able to browse repository inside redmine, you must add something
#like that :
<Location /svn-private>
DAV svn
SVNParentPath "/var/svn"
Order deny,allow
Deny from all
# only allow reading orders
<Limit GET PROPFIND OPTIONS REPORT>
Allow from redmine
</Limit>
</Location>
#ServerAdmin you@example.com
#<Directory />
# AllowOverride none
# Require all denied
#</Directory>
#DocumentRoot "/usr/local/apache2/htdocs"
#<Directory "/usr/local/apache2/htdocs">
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
#<IfModule dir_module>
# DirectoryIndex index.html
#</IfModule>
#<Files ".ht*">
# Require all denied
#</Files>
ErrorLog /proc/self/fd/2
LogLevel warn
<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 /proc/self/fd/1 common
</IfModule>
#<IfModule alias_module>
# ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
#</IfModule>
#<IfModule cgid_module>
#</IfModule>
#<Directory "/usr/local/apache2/cgi-bin">
# AllowOverride None
# Options None
# Require all granted
#</Directory>
<IfModule headers_module>
RequestHeader unset Proxy early
</IfModule>
#<IfModule mime_module>
# TypesConfig conf/mime.types
# AddType application/x-compress .Z
# AddType application/x-gzip .gz .tgz
#</IfModule>
#<IfModule proxy_html_module>
#Include conf/extra/proxy-html.conf
#</IfModule>
#<IfModule ssl_module>
#SSLRandomSeed startup builtin
#SSLRandomSeed connect builtin
#</IfModule>
Loading…
Cancel
Save