Skip to content

Commit

Permalink
Merge branch 'release/0.50.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
mblaschke committed May 24, 2016
2 parents c82603e + 8475720 commit 9f4ce6d
Show file tree
Hide file tree
Showing 507 changed files with 2,527 additions and 2,950 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ This project adheres to [WebDevOps.io Dockerfile](https://github.com/webdevops/D

## [1.0.0] - upcoming


## [0.50.1] - 2016-05-24
### Changed
- Fixed required root rights for entrypoint, provisioning is now only running when entrypoint is entered with root
- Modularized service.d scripts (will include servide.d/$serv.d/*.sh before execution)

## [0.50.0] - 2016-05-23
### Changed
- Improve image sizes (backported to 0.23.0 due to build issues)
Expand Down
11 changes: 11 additions & 0 deletions docker/apache/alpine-3/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
13 changes: 2 additions & 11 deletions docker/apache/alpine-3/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
#!/usr/bin/env bash
set -e
source /opt/docker/bin/config.sh

if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/httpd/httpd.pid

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

exec /usr/sbin/apachectl -DFOREGROUND
11 changes: 11 additions & 0 deletions docker/apache/centos-7/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
13 changes: 2 additions & 11 deletions docker/apache/centos-7/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
#!/usr/bin/env bash
set -e
source /opt/docker/bin/config.sh

if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/httpd/httpd.pid

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

exec httpd -DFOREGROUND
11 changes: 11 additions & 0 deletions docker/apache/debian-7/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
14 changes: 3 additions & 11 deletions docker/apache/debian-7/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
#!/usr/bin/env bash
set -e

if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi
source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR
11 changes: 11 additions & 0 deletions docker/apache/debian-8/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
14 changes: 3 additions & 11 deletions docker/apache/debian-8/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
#!/usr/bin/env bash
set -e

if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi
source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR
11 changes: 11 additions & 0 deletions docker/apache/debian-9/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
14 changes: 3 additions & 11 deletions docker/apache/debian-9/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
#!/usr/bin/env bash
set -e

if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi
source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR
11 changes: 11 additions & 0 deletions docker/apache/ubuntu-12.04/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
14 changes: 3 additions & 11 deletions docker/apache/ubuntu-12.04/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
#!/usr/bin/env bash
set -e

if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi
source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR
11 changes: 11 additions & 0 deletions docker/apache/ubuntu-14.04/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
14 changes: 3 additions & 11 deletions docker/apache/ubuntu-14.04/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
#!/usr/bin/env bash
set -e

if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi
source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR
11 changes: 11 additions & 0 deletions docker/apache/ubuntu-15.04/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
14 changes: 3 additions & 11 deletions docker/apache/ubuntu-15.04/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
#!/usr/bin/env bash
set -e

if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi
source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR
11 changes: 11 additions & 0 deletions docker/apache/ubuntu-15.10/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
14 changes: 3 additions & 11 deletions docker/apache/ubuntu-15.10/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
#!/usr/bin/env bash
set -e

if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi
source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR
11 changes: 11 additions & 0 deletions docker/apache/ubuntu-16.04/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
14 changes: 3 additions & 11 deletions docker/apache/ubuntu-16.04/conf/bin/service.d/httpd.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
#!/usr/bin/env bash
set -e

if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
echo ""
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
echo ""
fi
source /opt/docker/bin/config.sh

includeScriptDir "/opt/docker/bin/service.d/httpd.d/"

# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2*.pid

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

source /etc/apache2/envvars
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env bash

## clear dns file
echo > /etc/dnsmasq.d/development

Expand All @@ -12,5 +10,3 @@ if [ ! -f /etc/resolv.conf.original ]; then
## set dnsmasq to main nameserver
echo "nameserver 127.0.0.1" > /etc/resolv.conf
fi

exec dnsmasq --keep-in-foreground
13 changes: 2 additions & 11 deletions docker/base-app/alpine-3/conf/bin/service.d/dnsmasq.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/usr/bin/env bash

## clear dns file
echo > /etc/dnsmasq.d/development
source /opt/docker/bin/config.sh

if [ ! -f /etc/resolv.conf.original ]; then
cp -a /etc/resolv.conf /etc/resolv.conf.original

## set forward servers
cat /etc/resolv.conf.original | grep nameserver | sed 's/nameserver /server=/' > /etc/dnsmasq.d/forward

## set dnsmasq to main nameserver
echo "nameserver 127.0.0.1" > /etc/resolv.conf
fi
includeScriptDir "/opt/docker/bin/service.d/dnsmasq.d/"

exec dnsmasq --keep-in-foreground
Loading

0 comments on commit 9f4ce6d

Please sign in to comment.