masodik
This commit is contained in:
commit
0caa7a6be6
56
README
Normal file
56
README
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
Border8 - Debian 8 (jessie) / PHP 5.6 docker
|
||||||
|
==================================================================
|
||||||
|
|
||||||
|
/etc/default/grub
|
||||||
|
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 vsyscall=emulate"
|
||||||
|
|
||||||
|
apt-get install docker.io
|
||||||
|
|
||||||
|
Ha proxy kell:
|
||||||
|
cp -R docker.service.d /etc/systemd/system/
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl restart docker
|
||||||
|
|
||||||
|
tar xzf border8.tar.gz
|
||||||
|
cd border8/border8
|
||||||
|
make Dockerfile
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
docker build -t border8 border8
|
||||||
|
|
||||||
|
cp -i border8.logrotate /etc/logrotate.d/border8
|
||||||
|
cp -i border8.service /etc/systemd/system
|
||||||
|
cp -i border8.init /etc/init.d/border8
|
||||||
|
chmod 0755 /etc/init.d/border8
|
||||||
|
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable border8
|
||||||
|
|
||||||
|
/etc/init.d/border8 start
|
||||||
|
|
||||||
|
|
||||||
|
Apache beállítás
|
||||||
|
================
|
||||||
|
|
||||||
|
a2enmod proxy proxy_http macro
|
||||||
|
systemctl restart apache2
|
||||||
|
---
|
||||||
|
<Macro Border8 $dir $mod>
|
||||||
|
<Location /$dir/mod/$mod>
|
||||||
|
ProxyPass http://localhost:86/$dir/mod/$mod
|
||||||
|
ProxyPassReverse http://localhost:86/$dir/mod/$mod
|
||||||
|
ProxyPreserveHost On
|
||||||
|
</Location>
|
||||||
|
</Macro>
|
||||||
|
|
||||||
|
<VirtualHost ...>
|
||||||
|
...
|
||||||
|
Use Border8 border mod1
|
||||||
|
Use Border8 border mod2
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
UndefMacro Border8
|
||||||
|
---
|
||||||
|
|
||||||
18
border8.init
Executable file
18
border8.init
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: border8
|
||||||
|
# Required-Start: $remote_fs $syslog docker
|
||||||
|
# Required-Stop: $remote_fs $syslog
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: BORDER Debian8 environment
|
||||||
|
# Description: BORDER Debian8 environment, built from Debian jessie,
|
||||||
|
# contains apache2 + php 5.6
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Author: ROTTLER Tamas <tom@bitfit.hu>
|
||||||
|
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
|
echo "Border8 service is systemd-only." >&2
|
||||||
|
exit 1
|
||||||
15
border8.logrotate
Normal file
15
border8.logrotate
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/var/log/border8/*.log {
|
||||||
|
daily
|
||||||
|
missingok
|
||||||
|
rotate 14
|
||||||
|
compress
|
||||||
|
notifempty
|
||||||
|
create 640 root adm
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
if systemctl status border8 >/dev/null; then \
|
||||||
|
docker exec border8.service apachectl graceful; \
|
||||||
|
fi;
|
||||||
|
endscript
|
||||||
|
}
|
||||||
|
# vim: set tabstop=4 shiftwidth=4 expandtab smarttab:
|
||||||
24
border8.service
Normal file
24
border8.service
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Border8 container
|
||||||
|
After=docker.service
|
||||||
|
Requires=docker.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
TimeoutStartSec=0
|
||||||
|
Restart=always
|
||||||
|
ExecStart=-/usr/bin/docker run --name %n \
|
||||||
|
-v /var/www:/var/www \
|
||||||
|
-v /var/lib/php/sessions:/var/lib/php5/sessions \
|
||||||
|
-v /var/run/mysqld:/var/run/mysqld \
|
||||||
|
-v /var/log/border8:/var/log/apache2 \
|
||||||
|
-v /var/spool/postfix/maildrop:/var/spool/postfix/maildrop \
|
||||||
|
-v /var/spool/postfix/public:/var/spool/postfix/public \
|
||||||
|
-p 127.0.0.1:88:88 \
|
||||||
|
border8 apachectl -D FOREGROUND
|
||||||
|
ExecStop=/usr/bin/docker stop %n
|
||||||
|
ExecStopPost=/usr/bin/docker rm %n
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
# vim: set tabstop=4 shiftwidth=4 expandtab smarttab:
|
||||||
44
border8/000-default.conf
Normal file
44
border8/000-default.conf
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<VirtualHost *:88>
|
||||||
|
DocumentRoot /var/www/def/public
|
||||||
|
|
||||||
|
<Directory />
|
||||||
|
Options +FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
</Directory>
|
||||||
|
<Directory /var/www/def/public>
|
||||||
|
Options -Indexes +FollowSymLinks +MultiViews
|
||||||
|
AllowOverride all
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit,
|
||||||
|
# alert, emerg.
|
||||||
|
LogLevel warn
|
||||||
|
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<VirtualHost *:88>
|
||||||
|
ServerName border.interfaktor.hu
|
||||||
|
DocumentRoot /var/www/ifaktor/public
|
||||||
|
|
||||||
|
<Directory />
|
||||||
|
Options +FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
</Directory>
|
||||||
|
<Directory /var/www/ifaktor/public>
|
||||||
|
Options -Indexes +FollowSymLinks +MultiViews
|
||||||
|
AllowOverride all
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit,
|
||||||
|
# alert, emerg.
|
||||||
|
LogLevel warn
|
||||||
|
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
</VirtualHost>
|
||||||
32
border8/Dockerfile
Normal file
32
border8/Dockerfile
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
FROM debian:jessie
|
||||||
|
MAINTAINER Rottler Tamas <tom@bitfit.hu>
|
||||||
|
LABEL description="Border on Debian 8"
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
RUN echo Europe/Budapest > /etc/timezone && \
|
||||||
|
dpkg-reconfigure -f noninteractive tzdata
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libapache2-mod-php5 php5-mysql php5-ldap php5-gd
|
||||||
|
|
||||||
|
RUN apt-get install -y vim
|
||||||
|
|
||||||
|
RUN groupadd -g 116 postfix && \
|
||||||
|
groupadd -g 117 postdrop && \
|
||||||
|
useradd -u 108 -g 116 postfix
|
||||||
|
RUN apt-get install -y --no-install-recommends postfix bsd-mailx
|
||||||
|
|
||||||
|
COPY charset.conf /etc/apache2/conf-available/
|
||||||
|
RUN a2enconf charset
|
||||||
|
COPY ports.conf /etc/apache2/
|
||||||
|
COPY 000-default.conf /etc/apache2/sites-available/
|
||||||
|
COPY hws.php.ini /etc/php5/
|
||||||
|
RUN ln -s ../../hws.php.ini /etc/php5/apache2/conf.d/
|
||||||
|
|
||||||
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
|
RUN apt-get install -y bzip2 mysql-client
|
||||||
|
|
||||||
|
# docker build -t border8 border8
|
||||||
|
# vim: set tabstop=4 shiftwidth=4 expandtab smarttab:
|
||||||
34
border8/Dockerfile.tpl
Normal file
34
border8/Dockerfile.tpl
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
FROM debian:jessie
|
||||||
|
MAINTAINER Rottler Tamas <tom@bitfit.hu>
|
||||||
|
LABEL description="Border on Debian 8"
|
||||||
|
|
||||||
|
ENV http_proxy "http://aptget:8972@10.93.171.66:8080/"
|
||||||
|
ENV https_proxy "http://aptget:8972@10.93.171.66:8080/"
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
RUN echo Europe/Budapest > /etc/timezone && \
|
||||||
|
dpkg-reconfigure -f noninteractive tzdata
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libapache2-mod-php5 php5-mysql php5-ldap php5-gd
|
||||||
|
|
||||||
|
RUN apt-get install -y vim
|
||||||
|
|
||||||
|
RUN groupadd -g {POSTFIX_GID} postfix && \
|
||||||
|
groupadd -g {POSTDROP_GID} postdrop && \
|
||||||
|
useradd -u {POSTFIX_UID} -g {POSTFIX_GID} postfix
|
||||||
|
RUN apt-get install -y --no-install-recommends postfix bsd-mailx
|
||||||
|
|
||||||
|
COPY charset.conf /etc/apache2/conf-available/
|
||||||
|
RUN a2enconf charset
|
||||||
|
COPY ports.conf /etc/apache2/
|
||||||
|
COPY 000-default.conf /etc/apache2/sites-available/
|
||||||
|
COPY hws.php.ini /etc/php5/
|
||||||
|
RUN ln -s ../../hws.php.ini /etc/php5/apache2/conf.d/
|
||||||
|
|
||||||
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
|
RUN apt-get install -y bzip2 mysql-client
|
||||||
|
|
||||||
|
# docker build -t border8 border8
|
||||||
|
# vim: set tabstop=4 shiftwidth=4 expandtab smarttab:
|
||||||
6
border8/Makefile
Normal file
6
border8/Makefile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
postfix_uid = $(shell id -u postfix)
|
||||||
|
postfix_gid = $(shell getent group postfix | cut -d: -f3)
|
||||||
|
postdrop_gid = $(shell getent group postdrop | cut -d: -f3)
|
||||||
|
|
||||||
|
Dockerfile: Dockerfile.tpl
|
||||||
|
sed -n -e 's/{POSTFIX_UID}/$(postfix_uid)/;s/{POSTFIX_GID}/$(postfix_gid)/;s/{POSTDROP_GID}/$(postdrop_gid)/;w Dockerfile' Dockerfile.tpl
|
||||||
2
border8/apt.conf
Normal file
2
border8/apt.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#Acquire::http::Proxy "http://aptget:8972@10.93.171.66:8080/";
|
||||||
|
|
||||||
6
border8/charset.conf
Normal file
6
border8/charset.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Read the documentation before enabling AddDefaultCharset.
|
||||||
|
# In general, it is only a good idea if you know that all your files
|
||||||
|
# have this encoding. It will override any encoding given in the files
|
||||||
|
# in meta http-equiv or xml encoding tags.
|
||||||
|
|
||||||
|
AddDefaultCharset ISO-8859-2
|
||||||
15
border8/hws.php.ini
Normal file
15
border8/hws.php.ini
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
; HWS Border php configuration
|
||||||
|
[PHP]
|
||||||
|
memory_limit = 512M
|
||||||
|
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE & ~E_WARNING
|
||||||
|
error_log = /var/log/php_errors.log
|
||||||
|
post_max_size = 80M
|
||||||
|
upload_max_filesize = 80M
|
||||||
|
default_charset = "ISO-8859-2"
|
||||||
|
|
||||||
|
[Date]
|
||||||
|
date.timezone = "Europe/Budapest"
|
||||||
|
|
||||||
|
[Session]
|
||||||
|
session.gc_maxlifetime = 86400
|
||||||
|
|
||||||
2
border8/ports.conf
Normal file
2
border8/ports.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Listen 88
|
||||||
|
|
||||||
3
docker.service.d/http-proxy.conf
Normal file
3
docker.service.d/http-proxy.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[Service]
|
||||||
|
Environment="HTTP_PROXY=http://aptget:8972@10.93.171.66:8080/"
|
||||||
|
Environment="HTTPS_PROXY=http://aptget:8972@10.93.171.66:8080/"
|
||||||
Loading…
x
Reference in New Issue
Block a user