mirror of
https://github.com/cytopia/devilbox.git
synced 2025-01-31 16:35:28 +00:00
Merge pull request #446 from cytopia/custom-startup-scripts
Custom startup scripts
This commit is contained in:
commit
93c16d4e03
@ -14,7 +14,7 @@ putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
|
|||||||
|
|
||||||
|
|
||||||
$DEVILBOX_VERSION = 'v0.15';
|
$DEVILBOX_VERSION = 'v0.15';
|
||||||
$DEVILBOX_DATE = '2018-12-23';
|
$DEVILBOX_DATE = '2018-12-26';
|
||||||
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
|
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -47,7 +47,7 @@ $vhost = htmlentities($vhost);
|
|||||||
<p>Note: If the resulting virtual host config does not reflect the vhost-gen template changes, you will need to restart the Devilbox.</p>
|
<p>Note: If the resulting virtual host config does not reflect the vhost-gen template changes, you will need to restart the Devilbox.</p>
|
||||||
<a href="/vhosts.php"><i class="fa fa-chevron-left" aria-hidden="true"></i> Overview</a><br/>
|
<a href="/vhosts.php"><i class="fa fa-chevron-left" aria-hidden="true"></i> Overview</a><br/>
|
||||||
<br/><h3>virtual host config</h3><br/>
|
<br/><h3>virtual host config</h3><br/>
|
||||||
<a title="Virtual host: <?php echo $vHost['name'];?>.conf" target="_blank" href="/vhost.d/<?php echo $vhost;?>.conf">
|
<a title="Virtual host: <?php echo $vhost;?>.conf" target="_blank" href="/vhost.d/<?php echo $vhost;?>.conf">
|
||||||
<i class="fa fa-external-link" aria-hidden="true"></i> <?php echo $vhost;?>.conf
|
<i class="fa fa-external-link" aria-hidden="true"></i> <?php echo $vhost;?>.conf
|
||||||
</a>
|
</a>
|
||||||
<br/><br/><h3>vhost-gen config</h3><br/>
|
<br/><br/><h3>vhost-gen config</h3><br/>
|
||||||
|
12
.gitignore
vendored
12
.gitignore
vendored
@ -82,6 +82,18 @@
|
|||||||
/cfg/php-fpm-7.3/*.conf
|
/cfg/php-fpm-7.3/*.conf
|
||||||
/cfg/php-fpm-7.4/*.conf
|
/cfg/php-fpm-7.4/*.conf
|
||||||
|
|
||||||
|
# Ignore custom PHP-FPM startup scripts
|
||||||
|
/cfg/php-startup-5.2/*.sh
|
||||||
|
/cfg/php-startup-5.3/*.sh
|
||||||
|
/cfg/php-startup-5.4/*.sh
|
||||||
|
/cfg/php-startup-5.5/*.sh
|
||||||
|
/cfg/php-startup-5.6/*.sh
|
||||||
|
/cfg/php-startup-7.0/*.sh
|
||||||
|
/cfg/php-startup-7.1/*.sh
|
||||||
|
/cfg/php-startup-7.2/*.sh
|
||||||
|
/cfg/php-startup-7.3/*.sh
|
||||||
|
/cfg/php-startup-7.4/*.sh
|
||||||
|
|
||||||
# Ignore custom PHP-FPM modules
|
# Ignore custom PHP-FPM modules
|
||||||
/mod/php-fpm-5.2/*.so
|
/mod/php-fpm-5.2/*.so
|
||||||
/mod/php-fpm-5.3/*.so
|
/mod/php-fpm-5.3/*.so
|
||||||
|
@ -22,6 +22,14 @@ PROJECT = vhost-tests
|
|||||||
VHOST = $(PROJECT).loc
|
VHOST = $(PROJECT).loc
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Misc Targets
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
update-readme:
|
||||||
|
cat "../README.md" \
|
||||||
|
| perl -00 -pe "s/<!-- modules -->.*<!-- \/modules -->/<!-- modules -->\n$$(./get-modules.sh)\n<!-- \/modules -->/s" \
|
||||||
|
> "../README.md"
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
# Testing Targets
|
# Testing Targets
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
@ -80,7 +88,7 @@ pull:
|
|||||||
@echo "####################################################################################################"
|
@echo "####################################################################################################"
|
||||||
@echo "# PULLING LATEST CONTAINER"
|
@echo "# PULLING LATEST CONTAINER"
|
||||||
@echo "####################################################################################################"
|
@echo "####################################################################################################"
|
||||||
cd $(DEVILBOX_PATH) && docker-compose pull
|
cd $(DEVILBOX_PATH) && until docker-compose pull; do sleep 1; done
|
||||||
@echo
|
@echo
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
@ -136,7 +144,8 @@ info:
|
|||||||
###
|
###
|
||||||
### Run tests
|
### Run tests
|
||||||
###
|
###
|
||||||
test: test-vhost test-intra
|
test: test-vhost test-intra test-startup
|
||||||
|
|
||||||
|
|
||||||
test-intra:
|
test-intra:
|
||||||
@echo "####################################################################################################"
|
@echo "####################################################################################################"
|
||||||
@ -270,6 +279,16 @@ test-vhost:
|
|||||||
@echo
|
@echo
|
||||||
|
|
||||||
|
|
||||||
|
test-startup:
|
||||||
|
@echo "####################################################################################################"
|
||||||
|
@echo "# RUNNING TESTS: STARTUP"
|
||||||
|
@echo "####################################################################################################"
|
||||||
|
@echo
|
||||||
|
@if ! $(CURRENT_PATH)startup-tests/startup.sh; then \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
# Helper Targets
|
# Helper Targets
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
233
.tests/get-modules.sh
Executable file
233
.tests/get-modules.sh
Executable file
@ -0,0 +1,233 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||||
|
COMPOSEPATH="${SCRIPTPATH}/.."
|
||||||
|
PHP_TAG="$( grep 'devilbox/php' "${COMPOSEPATH}/docker-compose.yml" | sed 's/^.*-work-//g' )"
|
||||||
|
|
||||||
|
###
|
||||||
|
### Get PHP modules (5 rounds)
|
||||||
|
###
|
||||||
|
|
||||||
|
if ! PHP52="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '52-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP52="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '52-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP52="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '52-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP52="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '52-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP52="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '52-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
>&2 echo "Failed to retrieve modules for PHP 5.2"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! PHP53="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '53-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP53="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '53-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP53="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '53-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP53="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '53-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP53="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '53-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
>&2 echo "Failed to retrieve modules for PHP 5.3"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! PHP54="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '54-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP54="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '54-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP54="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '54-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP54="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '54-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP54="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '54-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
>&2 echo "Failed to retrieve modules for PHP 5.4"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! PHP55="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '55-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP55="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '55-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP55="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '55-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP55="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '55-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP55="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '55-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
>&2 echo "Failed to retrieve modules for PHP 5.5"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! PHP56="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '56-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP56="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '56-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP56="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '56-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP56="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '56-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP56="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '56-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
>&2 echo "Failed to retrieve modules for PHP 5.6"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! PHP70="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '70-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP70="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '70-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP70="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '70-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP70="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '70-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP70="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '70-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
>&2 echo "Failed to retrieve modules for PHP 7.0"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! PHP71="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '71-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP71="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '71-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP71="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '71-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP71="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '71-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP71="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '71-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
>&2 echo "Failed to retrieve modules for PHP 7.1"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! PHP72="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '72-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP72="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '72-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP72="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '72-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP72="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '72-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP72="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '72-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
>&2 echo "Failed to retrieve modules for PHP 7.2"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! PHP73="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '73-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP73="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '73-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP73="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '73-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP73="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '73-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP73="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '73-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
>&2 echo "Failed to retrieve modules for PHP 7.3"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! PHP74="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '74-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP74="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '74-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP74="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '74-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP74="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '74-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
sleep 5;
|
||||||
|
if ! PHP74="$( curl -sS https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/README.md | tac | tac | grep -E '74-mods' | sed -e 's/.*">//g' -e 's/<.*//g' )"; then
|
||||||
|
>&2 echo "Failed to retrieve modules for PHP 7.4"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
ALL="$( echo "${PHP52}, ${PHP53}, ${PHP54}, ${PHP55}, ${PHP56}, ${PHP70}, ${PHP71}, ${PHP72}, ${PHP73}, ${PHP74}" | sed 's/,/\n/g' | sed -e 's/^\s*//g' -e 's/\s*$//g' | sort -u )"
|
||||||
|
|
||||||
|
Y="✓"
|
||||||
|
|
||||||
|
echo "| Modules | PHP 5.2 | PHP 5.3 | PHP 5.4 | PHP 5.5 | PHP 5.6 | PHP 7.0 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 |"
|
||||||
|
echo "|----------------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|"
|
||||||
|
echo "${ALL}" | while read line; do
|
||||||
|
printf "| %-15s%s" "${line}" "|"
|
||||||
|
|
||||||
|
if echo ",${PHP52}," | sed 's/,\s/,/g' | grep -Eq ",${line},"; then
|
||||||
|
printf " %s |" "${Y}"
|
||||||
|
else
|
||||||
|
printf " |"
|
||||||
|
fi
|
||||||
|
if echo ",${PHP53}," | sed 's/,\s/,/g' | grep -Eq ",${line},"; then
|
||||||
|
printf " %s |" "${Y}"
|
||||||
|
else
|
||||||
|
printf " |"
|
||||||
|
fi
|
||||||
|
if echo ",${PHP54}," | sed 's/,\s/,/g' | grep -Eq ",${line},"; then
|
||||||
|
printf " %s |" "${Y}"
|
||||||
|
else
|
||||||
|
printf " |"
|
||||||
|
fi
|
||||||
|
if echo ",${PHP55}," | sed 's/,\s/,/g' | grep -Eq ",${line},"; then
|
||||||
|
printf " %s |" "${Y}"
|
||||||
|
else
|
||||||
|
printf " |"
|
||||||
|
fi
|
||||||
|
if echo ",${PHP56}," | sed 's/,\s/,/g' | grep -Eq ",${line},"; then
|
||||||
|
printf " %s |" "${Y}"
|
||||||
|
else
|
||||||
|
printf " |"
|
||||||
|
fi
|
||||||
|
if echo ",${PHP70}," | sed 's/,\s/,/g' | grep -Eq ",${line},"; then
|
||||||
|
printf " %s |" "${Y}"
|
||||||
|
else
|
||||||
|
printf " |"
|
||||||
|
fi
|
||||||
|
if echo ",${PHP71}," | sed 's/,\s/,/g' | grep -Eq ",${line},"; then
|
||||||
|
printf " %s |" "${Y}"
|
||||||
|
else
|
||||||
|
printf " |"
|
||||||
|
fi
|
||||||
|
if echo ",${PHP72}," | sed 's/,\s/,/g' | grep -Eq ",${line},"; then
|
||||||
|
printf " %s |" "${Y}"
|
||||||
|
else
|
||||||
|
printf " |"
|
||||||
|
fi
|
||||||
|
if echo ",${PHP73}," | sed 's/,\s/,/g' | grep -Eq ",${line},"; then
|
||||||
|
printf " %s |" "${Y}"
|
||||||
|
else
|
||||||
|
printf " |"
|
||||||
|
fi
|
||||||
|
if echo ",${PHP74}," | sed 's/,\s/,/g' | grep -Eq ",${line},"; then
|
||||||
|
printf " %s |" "${Y}"
|
||||||
|
else
|
||||||
|
printf " |"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\n"
|
||||||
|
done
|
38
.tests/startup-tests/startup.sh
Executable file
38
.tests/startup-tests/startup.sh
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||||
|
COMPOSEPATH="${SCRIPTPATH}/../../"
|
||||||
|
CONTAINER="$( cd "${COMPOSEPATH}" && docker-compose ps -q php )"
|
||||||
|
|
||||||
|
#FILES="$()"
|
||||||
|
cd "${COMPOSEPATH}" && docker-compose exec -T php bash -c "find /startup.d/*.sh-example -type f -print0 2>/dev/null" \
|
||||||
|
| xargs -0 -n 1 echo \
|
||||||
|
| while read f; do
|
||||||
|
|
||||||
|
echo "# ----------------------------------------------------------------------------------------"
|
||||||
|
echo "# [TEST] ${f}"
|
||||||
|
echo "# ----------------------------------------------------------------------------------------"
|
||||||
|
if ! docker exec -t ${CONTAINER} bash "${f}" "ACCEPT_EULA=1"; then
|
||||||
|
sleep 5
|
||||||
|
if ! docker exec -t ${CONTAINER} bash "${f}" "ACCEPT_EULA=1"; then
|
||||||
|
sleep 5
|
||||||
|
if ! docker exec -t ${CONTAINER} bash "${f}" "ACCEPT_EULA=1"; then
|
||||||
|
sleep 5
|
||||||
|
if ! docker exec -t ${CONTAINER} bash "${f}" "ACCEPT_EULA=1"; then
|
||||||
|
sleep 5
|
||||||
|
if ! docker exec -t ${CONTAINER} bash "${f}" "ACCEPT_EULA=1"; then
|
||||||
|
echo "[FAIl] ${f}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "[OK] ${f}"
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
done
|
15
.travis.yml
15
.travis.yml
@ -20,6 +20,11 @@ services:
|
|||||||
### Specify combinations
|
### Specify combinations
|
||||||
###
|
###
|
||||||
env:
|
env:
|
||||||
|
###
|
||||||
|
### Check PHP Modules
|
||||||
|
###
|
||||||
|
- S1=MODULES
|
||||||
|
|
||||||
###
|
###
|
||||||
### Check Documentation
|
### Check Documentation
|
||||||
###
|
###
|
||||||
@ -196,7 +201,7 @@ env:
|
|||||||
###
|
###
|
||||||
install:
|
install:
|
||||||
# Update Debian/Ubuntu package index
|
# Update Debian/Ubuntu package index
|
||||||
- if [ "${S1}" != "DOCUMENTATION" ] && [ "${S1}" != "UPDATE" ]; then
|
- if [ "${S1}" != "MODULES" ] && [ "${S1}" != "DOCUMENTATION" ] && [ "${S1}" != "UPDATE" ]; then
|
||||||
until sudo apt-get update -qq; do sleep 5; done
|
until sudo apt-get update -qq; do sleep 5; done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -227,7 +232,7 @@ install:
|
|||||||
echo "${COMPOSE_VERSION}";
|
echo "${COMPOSE_VERSION}";
|
||||||
|
|
||||||
# Install Docker and Docker Compose
|
# Install Docker and Docker Compose
|
||||||
- if [ "${S1}" != "DOCUMENTATION" ] && [ "${S1}" != "UPDATE" ]; then
|
- if [ "${S1}" != "MODULES" ] && [ "${S1}" != "DOCUMENTATION" ] && [ "${S1}" != "UPDATE" ]; then
|
||||||
until sudo apt-get -y -qq -o Dpkg::Options::="--force-confnew" install docker-ce${DOCKER_APT}; do sleep 5; done;
|
until sudo apt-get -y -qq -o Dpkg::Options::="--force-confnew" install docker-ce${DOCKER_APT}; do sleep 5; done;
|
||||||
until curl -L -sS https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose; do sleep 5; done;
|
until curl -L -sS https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose; do sleep 5; done;
|
||||||
chmod +x docker-compose;
|
chmod +x docker-compose;
|
||||||
@ -270,7 +275,11 @@ before_script:
|
|||||||
### Test
|
### Test
|
||||||
###
|
###
|
||||||
script:
|
script:
|
||||||
- if [ "${S1}" = "DOCUMENTATION" ]; then
|
- if [ "${S1}" = "MODULES" ]; then
|
||||||
|
cd .tests/;
|
||||||
|
make update-readme;
|
||||||
|
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
|
||||||
|
elif [ "${S1}" = "DOCUMENTATION" ]; then
|
||||||
cd docs/;
|
cd docs/;
|
||||||
make build;
|
make build;
|
||||||
make linkcheck;
|
make linkcheck;
|
||||||
|
113
README.md
113
README.md
@ -40,7 +40,6 @@ Furthermore, the Devilbox provides an **identical** and **reproducible developme
|
|||||||
* [Docker Engine 1.12.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-21)
|
* [Docker Engine 1.12.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-21)
|
||||||
* [Docker Compose 1.9.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-21)
|
* [Docker Compose 1.9.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-21)
|
||||||
|
|
||||||
|
|
||||||
## Available Container
|
## Available Container
|
||||||
|
|
||||||
The Devilbox ships the following pre-configured Docker container in any available version.
|
The Devilbox ships the following pre-configured Docker container in any available version.
|
||||||
@ -55,8 +54,6 @@ The Devilbox ships the following pre-configured Docker container in any availabl
|
|||||||
> **Documentation:**
|
> **Documentation:**
|
||||||
> [Available Container](https://devilbox.readthedocs.io/en/latest/readings/available-container.html)
|
> [Available Container](https://devilbox.readthedocs.io/en/latest/readings/available-container.html)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Community
|
## Community
|
||||||
|
|
||||||
The Devilbox has a lot of features reaching from a simple single-user development environment that
|
The Devilbox has a lot of features reaching from a simple single-user development environment that
|
||||||
@ -99,8 +96,6 @@ simplify your every-day life. If you ever run into any unforseen issues, feel fr
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
#### Quick start
|
#### Quick start
|
||||||
@ -142,7 +137,6 @@ C:\devilbox> docker-compose up</pre></div>
|
|||||||
> [Start the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html) |
|
> [Start the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html) |
|
||||||
> [.env file](https://devilbox.readthedocs.io/en/latest/configuration-files/env-file.html)
|
> [.env file](https://devilbox.readthedocs.io/en/latest/configuration-files/env-file.html)
|
||||||
|
|
||||||
|
|
||||||
#### Selective start
|
#### Selective start
|
||||||
|
|
||||||
The above will start all containers, you can however also just start the containers you actually need. This is achieved by simply specifying them in the docker-compose command.
|
The above will start all containers, you can however also just start the containers you actually need. This is achieved by simply specifying them in the docker-compose command.
|
||||||
@ -153,7 +147,6 @@ $ docker-compose up httpd php mysql redis
|
|||||||
> **Documentation:**
|
> **Documentation:**
|
||||||
> [Start only some container](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html#start-some-container)
|
> [Start only some container](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html#start-some-container)
|
||||||
|
|
||||||
|
|
||||||
![Devilbox](docs/img/devilbox-dash-selective.png)
|
![Devilbox](docs/img/devilbox-dash-selective.png)
|
||||||
|
|
||||||
#### Run different versions
|
#### Run different versions
|
||||||
@ -352,7 +345,6 @@ Additionally to the default stack, there are a variety of other services that ca
|
|||||||
> **Documentation:**
|
> **Documentation:**
|
||||||
> [Enable custom container](https://devilbox.readthedocs.io/en/latest/custom-container/enable-all-container.html)
|
> [Enable custom container](https://devilbox.readthedocs.io/en/latest/custom-container/enable-all-container.html)
|
||||||
|
|
||||||
|
|
||||||
#### Enter the container
|
#### Enter the container
|
||||||
|
|
||||||
You can also work directly inside the php container. Simply use the bundled scripts `shell.sh` (or `shell.bat` for Windows).
|
You can also work directly inside the php container. Simply use the bundled scripts `shell.sh` (or `shell.bat` for Windows).
|
||||||
@ -386,13 +378,11 @@ Your projects can be found in `/shared/httpd`. DNS records are automatically ava
|
|||||||
> [Work inside the PHP container](https://devilbox.readthedocs.io/en/latest/intermediate/work-inside-the-php-container.html) |
|
> [Work inside the PHP container](https://devilbox.readthedocs.io/en/latest/intermediate/work-inside-the-php-container.html) |
|
||||||
> [Directory overview](https://devilbox.readthedocs.io/en/latest/getting-started/directory-overview.html)
|
> [Directory overview](https://devilbox.readthedocs.io/en/latest/getting-started/directory-overview.html)
|
||||||
|
|
||||||
|
|
||||||
#### Quick Video intro
|
#### Quick Video intro
|
||||||
|
|
||||||
[![Devilbox setup and workflow](docs/img/devilbox_01-setup-and-workflow.png "devilbox - setup and workflow")](https://www.youtube.com/watch?v=reyZMyt2Zzo)
|
[![Devilbox setup and workflow](docs/img/devilbox_01-setup-and-workflow.png "devilbox - setup and workflow")](https://www.youtube.com/watch?v=reyZMyt2Zzo)
|
||||||
[![Devilbox email catch-all](docs/img/devilbox_02-email-catch-all.png "devilbox - email catch-all")](https://www.youtube.com/watch?v=e-U-C5WhxGY)
|
[![Devilbox email catch-all](docs/img/devilbox_02-email-catch-all.png "devilbox - email catch-all")](https://www.youtube.com/watch?v=e-U-C5WhxGY)
|
||||||
|
|
||||||
|
|
||||||
## Feature overview
|
## Feature overview
|
||||||
|
|
||||||
The Devilbox has everything setup for you. The only thing you will have to install is [Docker](https://docs.docker.com/engine/installation/) and [Docker Compose](https://docs.docker.com/compose/install/). Virtual hosts and DNS entries will be created automatically, just by adding new project folders.
|
The Devilbox has everything setup for you. The only thing you will have to install is [Docker](https://docs.docker.com/engine/installation/) and [Docker Compose](https://docs.docker.com/compose/install/). Virtual hosts and DNS entries will be created automatically, just by adding new project folders.
|
||||||
@ -487,7 +477,6 @@ The following batteries are available in the Devilbox intranet by default:
|
|||||||
> **Documentation:**
|
> **Documentation:**
|
||||||
> [Devilbox Intranet](https://devilbox.readthedocs.io/en/latest/getting-started/devilbox-intranet.html)
|
> [Devilbox Intranet](https://devilbox.readthedocs.io/en/latest/getting-started/devilbox-intranet.html)
|
||||||
|
|
||||||
|
|
||||||
#### Tools
|
#### Tools
|
||||||
|
|
||||||
The following tools will assist you on creating new projects easily as well as helping you check your code against guidelines.
|
The following tools will assist you on creating new projects easily as well as helping you check your code against guidelines.
|
||||||
@ -587,19 +576,111 @@ Well-known and popular tools will be at your service as well:
|
|||||||
> **Documentation:**
|
> **Documentation:**
|
||||||
> [Available Tools](https://devilbox.readthedocs.io/en/latest/readings/available-tools.html)
|
> [Available Tools](https://devilbox.readthedocs.io/en/latest/readings/available-tools.html)
|
||||||
|
|
||||||
|
|
||||||
#### Available PHP Modules
|
#### Available PHP Modules
|
||||||
|
|
||||||
The Devilbox is a development stack, so it is made sure that a lot of PHP modules are available out of the box in order to work with many different frameworks.
|
The Devilbox is a development stack, so it is made sure that a lot of PHP modules are available out of the box in order to work with many different frameworks.
|
||||||
|
|
||||||
> *amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mhash, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, SQLite, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib*
|
<!-- modules -->
|
||||||
|
| Modules | PHP 5.2 | PHP 5.3 | PHP 5.4 | PHP 5.5 | PHP 5.6 | PHP 7.0 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 |
|
||||||
|
|----------------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|
|
||||||
|
| amqp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||||
|
| apc | | ✓ | ✓ | ✓ | ✓ | | | | | |
|
||||||
|
| apcu | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
|
||||||
|
| bcmath | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| bz2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| calendar | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| Core | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| ctype | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| curl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| date | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| dba | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| dom | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| enchant | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| ereg | | ✓ | ✓ | ✓ | ✓ | | | | | |
|
||||||
|
| exif | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| fileinfo | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| filter | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| ftp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| gd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| gettext | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| gmp | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| hash | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| iconv | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| igbinary | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| imagick | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
|
||||||
|
| imap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| interbase | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| intl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| json | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| ldap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| libxml | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| mbstring | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| mcrypt | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||||
|
| memcache | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||||
|
| memcached | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| mhash | | | | | ✓ | | | | | |
|
||||||
|
| mongo | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | |
|
||||||
|
| mongodb | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| msgpack | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||||
|
| mysql | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | |
|
||||||
|
| mysqli | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| mysqlnd | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| openssl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| pcntl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| pcre | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| PDO | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| pdo_dblib | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| PDO_Firebird | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| pdo_mysql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| pdo_pgsql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| pdo_sqlite | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| pdo_sqlsrv | | | | | | ✓ | ✓ | ✓ | ✓ | |
|
||||||
|
| pgsql | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| phalcon | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||||
|
| Phar | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| posix | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| pspell | ✓ | ✓ | ✓ | ✓ | ✓ | | | | ✓ | ✓ |
|
||||||
|
| rdkafka | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| readline | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| recode | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| redis | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| Reflection | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| session | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| shmop | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| SimpleXML | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| snmp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| soap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| sockets | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| sodium | | | | | | | | ✓ | ✓ | ✓ |
|
||||||
|
| SPL | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| SQLite | ✓ | ✓ | | | | | | | | |
|
||||||
|
| sqlite3 | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| sqlsrv | | | | | | ✓ | ✓ | ✓ | ✓ | |
|
||||||
|
| standard | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| swoole | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| sysvmsg | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| sysvsem | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| sysvshm | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| tidy | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| tokenizer | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| uploadprogress | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| wddx | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| xdebug | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
|
||||||
|
| xml | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| xmlreader | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| xmlrpc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| xmlwriter | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| xsl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| Zend OPcache | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| zip | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
| zlib | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
|
<!-- /modules -->
|
||||||
|
|
||||||
PHP modules can be enabled or disabled on demand to reflect the state of your target environment.
|
PHP modules can be enabled or disabled on demand to reflect the state of your target environment.
|
||||||
|
|
||||||
> **Documentation:**
|
> **Documentation:**
|
||||||
> [Enable/disable PHP modules](https://devilbox.readthedocs.io/en/latest/intermediate/enable-disable-php-modules.html)
|
> [Enable/disable PHP modules](https://devilbox.readthedocs.io/en/latest/intermediate/enable-disable-php-modules.html)
|
||||||
|
|
||||||
|
|
||||||
#### Custom PHP Modules
|
#### Custom PHP Modules
|
||||||
|
|
||||||
You can also copy any custom modules into `mod/(php-fpm)-<VERSION>` and add a custom `*.ini` file to load them.
|
You can also copy any custom modules into `mod/(php-fpm)-<VERSION>` and add a custom `*.ini` file to load them.
|
||||||
@ -643,7 +724,6 @@ As far as tested there are no limitations and you can use any Framework or CMS j
|
|||||||
> [Setup Yii](https://devilbox.readthedocs.io/en/latest/examples/setup-yii.html) |
|
> [Setup Yii](https://devilbox.readthedocs.io/en/latest/examples/setup-yii.html) |
|
||||||
> [Setup Zend](https://devilbox.readthedocs.io/en/latest/examples/setup-zend.html)
|
> [Setup Zend](https://devilbox.readthedocs.io/en/latest/examples/setup-zend.html)
|
||||||
|
|
||||||
|
|
||||||
## Intranet overview
|
## Intranet overview
|
||||||
|
|
||||||
The Devilbox comes with a pre-configured intranet on `http://localhost` and `https://localhost`. This can be explicitly disabled or password-protected. The intranet will not only show you, the chosen configuration, but also validate the status of the current configuration, such as if **DNS records** exists (on host and container), are directories properly set-up. Additionally it provides external tools to let you interact with databases and emails.
|
The Devilbox comes with a pre-configured intranet on `http://localhost` and `https://localhost`. This can be explicitly disabled or password-protected. The intranet will not only show you, the chosen configuration, but also validate the status of the current configuration, such as if **DNS records** exists (on host and container), are directories properly set-up. Additionally it provides external tools to let you interact with databases and emails.
|
||||||
@ -660,7 +740,6 @@ The Devilbox comes with a pre-configured intranet on `http://localhost` and `htt
|
|||||||
> **Documentation:**
|
> **Documentation:**
|
||||||
> [Devilbox Intranet](https://devilbox.readthedocs.io/en/latest/getting-started/devilbox-intranet.html)
|
> [Devilbox Intranet](https://devilbox.readthedocs.io/en/latest/getting-started/devilbox-intranet.html)
|
||||||
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
A few examples of how the built-in intranet looks like.
|
A few examples of how the built-in intranet looks like.
|
||||||
@ -686,7 +765,6 @@ A few examples of how the built-in intranet looks like.
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
## Contributing [![Open Source Helpers](https://www.codetriage.com/cytopia/devilbox/badges/users.svg)](https://www.codetriage.com/cytopia/devilbox)
|
## Contributing [![Open Source Helpers](https://www.codetriage.com/cytopia/devilbox/badges/users.svg)](https://www.codetriage.com/cytopia/devilbox)
|
||||||
|
|
||||||
The Devilbox is still a young project with a long roadmap of features to come. Features are
|
The Devilbox is still a young project with a long roadmap of features to come. Features are
|
||||||
@ -701,7 +779,6 @@ To increase visibility and bug-free operation:
|
|||||||
Additionally you can [subscribe to Devilbox on CodeTriage](https://www.codetriage.com/cytopia/devilbox),
|
Additionally you can [subscribe to Devilbox on CodeTriage](https://www.codetriage.com/cytopia/devilbox),
|
||||||
read up on [CONTRIBUTING.md](CONTRIBUTING.md) and check the [ROADMAP](https://github.com/cytopia/devilbox/issues/23) about what is already planned for the near future.
|
read up on [CONTRIBUTING.md](CONTRIBUTING.md) and check the [ROADMAP](https://github.com/cytopia/devilbox/issues/23) about what is already planned for the near future.
|
||||||
|
|
||||||
|
|
||||||
## Logos
|
## Logos
|
||||||
|
|
||||||
Logos and banners can be found at **[devilbox/artwork](https://github.com/devilbox/artwork)**. Feel free to use or modify them by the terms of their license.
|
Logos and banners can be found at **[devilbox/artwork](https://github.com/devilbox/artwork)**. Feel free to use or modify them by the terms of their license.
|
||||||
|
6
cfg/php-startup-5.2/01-update-apt-index.sh-example
Executable file
6
cfg/php-startup-5.2/01-update-apt-index.sh-example
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Simple example showing how to update the packet index
|
||||||
|
#
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
13
cfg/php-startup-5.2/README.md
Normal file
13
cfg/php-startup-5.2/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Custom startup scripts
|
||||||
|
|
||||||
|
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
|
||||||
|
This is useful to apply your custom settings such as installing software that usually requires
|
||||||
|
the user to accept a license or similar.
|
||||||
|
|
||||||
|
A few examples are given that do not end by `.sh` which won't be run. If you want to use the
|
||||||
|
provided examples, copy them to a file ending by `.sh`
|
||||||
|
|
||||||
|
|
||||||
|
## Important
|
||||||
|
|
||||||
|
All provided scripts will be executed with **root** permissions.
|
6
cfg/php-startup-5.3/01-update-apt-index.sh-example
Executable file
6
cfg/php-startup-5.3/01-update-apt-index.sh-example
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Simple example showing how to update the packet index
|
||||||
|
#
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
13
cfg/php-startup-5.3/README.md
Normal file
13
cfg/php-startup-5.3/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Custom startup scripts
|
||||||
|
|
||||||
|
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
|
||||||
|
This is useful to apply your custom settings such as installing software that usually requires
|
||||||
|
the user to accept a license or similar.
|
||||||
|
|
||||||
|
A few examples are given that do not end by `.sh` which won't be run. If you want to use the
|
||||||
|
provided examples, copy them to a file ending by `.sh`
|
||||||
|
|
||||||
|
|
||||||
|
## Important
|
||||||
|
|
||||||
|
All provided scripts will be executed with **root** permissions.
|
6
cfg/php-startup-5.4/01-update-apt-index.sh-example
Executable file
6
cfg/php-startup-5.4/01-update-apt-index.sh-example
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Simple example showing how to update the packet index
|
||||||
|
#
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
13
cfg/php-startup-5.4/README.md
Normal file
13
cfg/php-startup-5.4/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Custom startup scripts
|
||||||
|
|
||||||
|
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
|
||||||
|
This is useful to apply your custom settings such as installing software that usually requires
|
||||||
|
the user to accept a license or similar.
|
||||||
|
|
||||||
|
A few examples are given that do not end by `.sh` which won't be run. If you want to use the
|
||||||
|
provided examples, copy them to a file ending by `.sh`
|
||||||
|
|
||||||
|
|
||||||
|
## Important
|
||||||
|
|
||||||
|
All provided scripts will be executed with **root** permissions.
|
6
cfg/php-startup-5.5/01-update-apt-index.sh-example
Executable file
6
cfg/php-startup-5.5/01-update-apt-index.sh-example
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Simple example showing how to update the packet index
|
||||||
|
#
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
13
cfg/php-startup-5.5/README.md
Normal file
13
cfg/php-startup-5.5/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Custom startup scripts
|
||||||
|
|
||||||
|
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
|
||||||
|
This is useful to apply your custom settings such as installing software that usually requires
|
||||||
|
the user to accept a license or similar.
|
||||||
|
|
||||||
|
A few examples are given that do not end by `.sh` which won't be run. If you want to use the
|
||||||
|
provided examples, copy them to a file ending by `.sh`
|
||||||
|
|
||||||
|
|
||||||
|
## Important
|
||||||
|
|
||||||
|
All provided scripts will be executed with **root** permissions.
|
6
cfg/php-startup-5.6/01-update-apt-index.sh-example
Executable file
6
cfg/php-startup-5.6/01-update-apt-index.sh-example
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Simple example showing how to update the packet index
|
||||||
|
#
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
13
cfg/php-startup-5.6/README.md
Normal file
13
cfg/php-startup-5.6/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Custom startup scripts
|
||||||
|
|
||||||
|
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
|
||||||
|
This is useful to apply your custom settings such as installing software that usually requires
|
||||||
|
the user to accept a license or similar.
|
||||||
|
|
||||||
|
A few examples are given that do not end by `.sh` which won't be run. If you want to use the
|
||||||
|
provided examples, copy them to a file ending by `.sh`
|
||||||
|
|
||||||
|
|
||||||
|
## Important
|
||||||
|
|
||||||
|
All provided scripts will be executed with **root** permissions.
|
6
cfg/php-startup-7.0/01-update-apt-index.sh-example
Executable file
6
cfg/php-startup-7.0/01-update-apt-index.sh-example
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Simple example showing how to update the packet index
|
||||||
|
#
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
60
cfg/php-startup-7.0/02-ms-odbc-driver.sh-example
Executable file
60
cfg/php-startup-7.0/02-ms-odbc-driver.sh-example
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# This script will automatically install the Microsoft ODBC driver for MsSQL
|
||||||
|
# support for PHP during startup.
|
||||||
|
#
|
||||||
|
# In order for it to work, you must read and accept their License/EULA:
|
||||||
|
# https://odbceula.blob.core.windows.net/eula17/LICENSE172.TXT
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
# EDIT THE VARIABLE BELOW TO ACCEPT THE EULA (If you agree to their terms)
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
###
|
||||||
|
### Set this to "Y" (capital 'Y') if you accept the EULA.
|
||||||
|
###
|
||||||
|
ACCEPT_EULA=N
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
# DO NOT EDIT BELOW THIS LINE
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
###
|
||||||
|
### Where to retrieve the deb package
|
||||||
|
###
|
||||||
|
MSODBC_URL="https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql17/"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Pre-flight check
|
||||||
|
###
|
||||||
|
if [ "${#}" = "1" ]; then
|
||||||
|
if [ "${1}" = "ACCEPT_EULA=1" ]; then
|
||||||
|
ACCEPT_EULA=Y
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "${ACCEPT_EULA}" != "Y" ]; then
|
||||||
|
echo "MS ODBC EULA not accepted. Aborting installation."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### EULA accepted, so we can proceed
|
||||||
|
###
|
||||||
|
|
||||||
|
# Extract latest *.deb packate
|
||||||
|
MSODBC_DEB="$( curl -k -sS "${MSODBC_URL}" | grep -Eo 'msodbcsql[-._0-9]+?_amd64\.deb' | tail -1 )"
|
||||||
|
|
||||||
|
# Download to temporary location
|
||||||
|
curl -k -sS "${MSODBC_URL}${MSODBC_DEB}" > "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
# Install
|
||||||
|
ACCEPT_EULA="${ACCEPT_EULA}" dpkg -i "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
# Remove artifacts
|
||||||
|
rm -f "/tmp/${MSODBC_DEB}"
|
34
cfg/php-startup-7.0/03-oracle-oci8-and-pdo_oci.sh-example
Executable file
34
cfg/php-startup-7.0/03-oracle-oci8-and-pdo_oci.sh-example
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/
|
||||||
|
#
|
||||||
|
|
||||||
|
# Install 'alien' to install rpm packages
|
||||||
|
apt-get update -q
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests alien
|
||||||
|
|
||||||
|
# Instantclient (basic lite)
|
||||||
|
curl -o /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Instantclient (devel)
|
||||||
|
curl -o /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Install RPMs
|
||||||
|
rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7
|
||||||
|
alien -i /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
alien -i /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Remove RPMs
|
||||||
|
rm -f /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
rm -f /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Necessary symlinks
|
||||||
|
ln -s /usr/lib/oracle/18.3/client64/lib/*.so* /usr/lib/
|
||||||
|
|
||||||
|
# Build and install PHP extension oci8
|
||||||
|
docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/18.3/client64/lib/,18.3
|
||||||
|
docker-php-ext-install oci8
|
||||||
|
|
||||||
|
# Build and install PHP extension pdo_oci
|
||||||
|
docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr,18.3
|
||||||
|
docker-php-ext-install pdo_oci
|
13
cfg/php-startup-7.0/README.md
Normal file
13
cfg/php-startup-7.0/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Custom startup scripts
|
||||||
|
|
||||||
|
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
|
||||||
|
This is useful to apply your custom settings such as installing software that usually requires
|
||||||
|
the user to accept a license or similar.
|
||||||
|
|
||||||
|
A few examples are given that do not end by `.sh` which won't be run. If you want to use the
|
||||||
|
provided examples, copy them to a file ending by `.sh`
|
||||||
|
|
||||||
|
|
||||||
|
## Important
|
||||||
|
|
||||||
|
All provided scripts will be executed with **root** permissions.
|
6
cfg/php-startup-7.1/01-update-apt-index.sh-example
Executable file
6
cfg/php-startup-7.1/01-update-apt-index.sh-example
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Simple example showing how to update the packet index
|
||||||
|
#
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
60
cfg/php-startup-7.1/02-ms-odbc-driver.sh-example
Executable file
60
cfg/php-startup-7.1/02-ms-odbc-driver.sh-example
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# This script will automatically install the Microsoft ODBC driver for MsSQL
|
||||||
|
# support for PHP during startup.
|
||||||
|
#
|
||||||
|
# In order for it to work, you must read and accept their License/EULA:
|
||||||
|
# https://odbceula.blob.core.windows.net/eula17/LICENSE172.TXT
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
# EDIT THE VARIABLE BELOW TO ACCEPT THE EULA (If you agree to their terms)
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
###
|
||||||
|
### Set this to "Y" (capital 'Y') if you accept the EULA.
|
||||||
|
###
|
||||||
|
ACCEPT_EULA=N
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
# DO NOT EDIT BELOW THIS LINE
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
###
|
||||||
|
### Where to retrieve the deb package
|
||||||
|
###
|
||||||
|
MSODBC_URL="https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql17/"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Pre-flight check
|
||||||
|
###
|
||||||
|
if [ "${#}" = "1" ]; then
|
||||||
|
if [ "${1}" = "ACCEPT_EULA=1" ]; then
|
||||||
|
ACCEPT_EULA=Y
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "${ACCEPT_EULA}" != "Y" ]; then
|
||||||
|
echo "MS ODBC EULA not accepted. Aborting installation."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### EULA accepted, so we can proceed
|
||||||
|
###
|
||||||
|
|
||||||
|
# Extract latest *.deb packate
|
||||||
|
MSODBC_DEB="$( curl -k -sS "${MSODBC_URL}" | grep -Eo 'msodbcsql[-._0-9]+?_amd64\.deb' | tail -1 )"
|
||||||
|
|
||||||
|
# Download to temporary location
|
||||||
|
curl -k -sS "${MSODBC_URL}${MSODBC_DEB}" > "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
# Install
|
||||||
|
ACCEPT_EULA="${ACCEPT_EULA}" dpkg -i "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
# Remove artifacts
|
||||||
|
rm -f "/tmp/${MSODBC_DEB}"
|
34
cfg/php-startup-7.1/03-oracle-oci8-and-pdo_oci.sh-example
Executable file
34
cfg/php-startup-7.1/03-oracle-oci8-and-pdo_oci.sh-example
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/
|
||||||
|
#
|
||||||
|
|
||||||
|
# Install 'alien' to install rpm packages
|
||||||
|
apt-get update -q
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests alien
|
||||||
|
|
||||||
|
# Instantclient (basic lite)
|
||||||
|
curl -o /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Instantclient (devel)
|
||||||
|
curl -o /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Install RPMs
|
||||||
|
rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7
|
||||||
|
alien -i /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
alien -i /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Remove RPMs
|
||||||
|
rm -f /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
rm -f /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Necessary symlinks
|
||||||
|
ln -s /usr/lib/oracle/18.3/client64/lib/*.so* /usr/lib/
|
||||||
|
|
||||||
|
# Build and install PHP extension oci8
|
||||||
|
docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/18.3/client64/lib/,18.3
|
||||||
|
docker-php-ext-install oci8
|
||||||
|
|
||||||
|
# Build and install PHP extension pdo_oci
|
||||||
|
docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr,18.3
|
||||||
|
docker-php-ext-install pdo_oci
|
13
cfg/php-startup-7.1/README.md
Normal file
13
cfg/php-startup-7.1/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Custom startup scripts
|
||||||
|
|
||||||
|
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
|
||||||
|
This is useful to apply your custom settings such as installing software that usually requires
|
||||||
|
the user to accept a license or similar.
|
||||||
|
|
||||||
|
A few examples are given that do not end by `.sh` which won't be run. If you want to use the
|
||||||
|
provided examples, copy them to a file ending by `.sh`
|
||||||
|
|
||||||
|
|
||||||
|
## Important
|
||||||
|
|
||||||
|
All provided scripts will be executed with **root** permissions.
|
6
cfg/php-startup-7.2/01-update-apt-index.sh-example
Executable file
6
cfg/php-startup-7.2/01-update-apt-index.sh-example
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Simple example showing how to update the packet index
|
||||||
|
#
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
60
cfg/php-startup-7.2/02-ms-odbc-driver.sh-example
Executable file
60
cfg/php-startup-7.2/02-ms-odbc-driver.sh-example
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# This script will automatically install the Microsoft ODBC driver for MsSQL
|
||||||
|
# support for PHP during startup.
|
||||||
|
#
|
||||||
|
# In order for it to work, you must read and accept their License/EULA:
|
||||||
|
# https://odbceula.blob.core.windows.net/eula17/LICENSE172.TXT
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
# EDIT THE VARIABLE BELOW TO ACCEPT THE EULA (If you agree to their terms)
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
###
|
||||||
|
### Set this to "Y" (capital 'Y') if you accept the EULA.
|
||||||
|
###
|
||||||
|
ACCEPT_EULA=N
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
# DO NOT EDIT BELOW THIS LINE
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
###
|
||||||
|
### Where to retrieve the deb package
|
||||||
|
###
|
||||||
|
MSODBC_URL="https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql17/"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Pre-flight check
|
||||||
|
###
|
||||||
|
if [ "${#}" = "1" ]; then
|
||||||
|
if [ "${1}" = "ACCEPT_EULA=1" ]; then
|
||||||
|
ACCEPT_EULA=Y
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "${ACCEPT_EULA}" != "Y" ]; then
|
||||||
|
echo "MS ODBC EULA not accepted. Aborting installation."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### EULA accepted, so we can proceed
|
||||||
|
###
|
||||||
|
|
||||||
|
# Extract latest *.deb packate
|
||||||
|
MSODBC_DEB="$( curl -k -sS "${MSODBC_URL}" | grep -Eo 'msodbcsql[-._0-9]+?_amd64\.deb' | tail -1 )"
|
||||||
|
|
||||||
|
# Download to temporary location
|
||||||
|
curl -k -sS "${MSODBC_URL}${MSODBC_DEB}" > "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
# Install
|
||||||
|
ACCEPT_EULA="${ACCEPT_EULA}" dpkg -i "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
# Remove artifacts
|
||||||
|
rm -f "/tmp/${MSODBC_DEB}"
|
34
cfg/php-startup-7.2/03-oracle-oci8-and-pdo_oci.sh-example
Executable file
34
cfg/php-startup-7.2/03-oracle-oci8-and-pdo_oci.sh-example
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/
|
||||||
|
#
|
||||||
|
|
||||||
|
# Install 'alien' to install rpm packages
|
||||||
|
apt-get update -q
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests alien
|
||||||
|
|
||||||
|
# Instantclient (basic lite)
|
||||||
|
curl -o /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Instantclient (devel)
|
||||||
|
curl -o /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Install RPMs
|
||||||
|
rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7
|
||||||
|
alien -i /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
alien -i /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Remove RPMs
|
||||||
|
rm -f /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
rm -f /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Necessary symlinks
|
||||||
|
ln -s /usr/lib/oracle/18.3/client64/lib/*.so* /usr/lib/
|
||||||
|
|
||||||
|
# Build and install PHP extension oci8
|
||||||
|
docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/18.3/client64/lib/,18.3
|
||||||
|
docker-php-ext-install oci8
|
||||||
|
|
||||||
|
# Build and install PHP extension pdo_oci
|
||||||
|
docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/18.3/client64/lib/,18.3
|
||||||
|
docker-php-ext-install pdo_oci
|
13
cfg/php-startup-7.2/README.md
Normal file
13
cfg/php-startup-7.2/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Custom startup scripts
|
||||||
|
|
||||||
|
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
|
||||||
|
This is useful to apply your custom settings such as installing software that usually requires
|
||||||
|
the user to accept a license or similar.
|
||||||
|
|
||||||
|
A few examples are given that do not end by `.sh` which won't be run. If you want to use the
|
||||||
|
provided examples, copy them to a file ending by `.sh`
|
||||||
|
|
||||||
|
|
||||||
|
## Important
|
||||||
|
|
||||||
|
All provided scripts will be executed with **root** permissions.
|
6
cfg/php-startup-7.3/01-update-apt-index.sh-example
Executable file
6
cfg/php-startup-7.3/01-update-apt-index.sh-example
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Simple example showing how to update the packet index
|
||||||
|
#
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
60
cfg/php-startup-7.3/02-ms-odbc-driver.sh-example
Executable file
60
cfg/php-startup-7.3/02-ms-odbc-driver.sh-example
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# This script will automatically install the Microsoft ODBC driver for MsSQL
|
||||||
|
# support for PHP during startup.
|
||||||
|
#
|
||||||
|
# In order for it to work, you must read and accept their License/EULA:
|
||||||
|
# https://odbceula.blob.core.windows.net/eula17/LICENSE172.TXT
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
# EDIT THE VARIABLE BELOW TO ACCEPT THE EULA (If you agree to their terms)
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
###
|
||||||
|
### Set this to "Y" (capital 'Y') if you accept the EULA.
|
||||||
|
###
|
||||||
|
ACCEPT_EULA=N
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
# DO NOT EDIT BELOW THIS LINE
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
###
|
||||||
|
### Where to retrieve the deb package
|
||||||
|
###
|
||||||
|
MSODBC_URL="https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql17/"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Pre-flight check
|
||||||
|
###
|
||||||
|
if [ "${#}" = "1" ]; then
|
||||||
|
if [ "${1}" = "ACCEPT_EULA=1" ]; then
|
||||||
|
ACCEPT_EULA=Y
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "${ACCEPT_EULA}" != "Y" ]; then
|
||||||
|
echo "MS ODBC EULA not accepted. Aborting installation."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### EULA accepted, so we can proceed
|
||||||
|
###
|
||||||
|
|
||||||
|
# Extract latest *.deb packate
|
||||||
|
MSODBC_DEB="$( curl -k -sS "${MSODBC_URL}" | grep -Eo 'msodbcsql[-._0-9]+?_amd64\.deb' | tail -1 )"
|
||||||
|
|
||||||
|
# Download to temporary location
|
||||||
|
curl -k -sS "${MSODBC_URL}${MSODBC_DEB}" > "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
# Install
|
||||||
|
ACCEPT_EULA="${ACCEPT_EULA}" dpkg -i "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
# Remove artifacts
|
||||||
|
rm -f "/tmp/${MSODBC_DEB}"
|
34
cfg/php-startup-7.3/03-oracle-oci8-and-pdo_oci.sh-example
Executable file
34
cfg/php-startup-7.3/03-oracle-oci8-and-pdo_oci.sh-example
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/
|
||||||
|
#
|
||||||
|
|
||||||
|
# Install 'alien' to install rpm packages
|
||||||
|
apt-get update -q
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests alien
|
||||||
|
|
||||||
|
# Instantclient (basic lite)
|
||||||
|
curl -o /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Instantclient (devel)
|
||||||
|
curl -o /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Install RPMs
|
||||||
|
rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7
|
||||||
|
alien -i /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
alien -i /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Remove RPMs
|
||||||
|
rm -f /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
rm -f /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Necessary symlinks
|
||||||
|
ln -s /usr/lib/oracle/18.3/client64/lib/*.so* /usr/lib/
|
||||||
|
|
||||||
|
# Build and install PHP extension oci8
|
||||||
|
docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/18.3/client64/lib/,18.3
|
||||||
|
docker-php-ext-install oci8
|
||||||
|
|
||||||
|
# Build and install PHP extension pdo_oci
|
||||||
|
docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/18.3/client64/lib/,18.3
|
||||||
|
docker-php-ext-install pdo_oci
|
13
cfg/php-startup-7.3/README.md
Normal file
13
cfg/php-startup-7.3/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Custom startup scripts
|
||||||
|
|
||||||
|
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
|
||||||
|
This is useful to apply your custom settings such as installing software that usually requires
|
||||||
|
the user to accept a license or similar.
|
||||||
|
|
||||||
|
A few examples are given that do not end by `.sh` which won't be run. If you want to use the
|
||||||
|
provided examples, copy them to a file ending by `.sh`
|
||||||
|
|
||||||
|
|
||||||
|
## Important
|
||||||
|
|
||||||
|
All provided scripts will be executed with **root** permissions.
|
6
cfg/php-startup-7.4/01-update-apt-index.sh-example
Executable file
6
cfg/php-startup-7.4/01-update-apt-index.sh-example
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Simple example showing how to update the packet index
|
||||||
|
#
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
13
cfg/php-startup-7.4/README.md
Normal file
13
cfg/php-startup-7.4/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Custom startup scripts
|
||||||
|
|
||||||
|
Any script inside this directory ending by `.sh` will be executed during the PHP container startup.
|
||||||
|
This is useful to apply your custom settings such as installing software that usually requires
|
||||||
|
the user to accept a license or similar.
|
||||||
|
|
||||||
|
A few examples are given that do not end by `.sh` which won't be run. If you want to use the
|
||||||
|
provided examples, copy them to a file ending by `.sh`
|
||||||
|
|
||||||
|
|
||||||
|
## Important
|
||||||
|
|
||||||
|
All provided scripts will be executed with **root** permissions.
|
@ -95,7 +95,7 @@ services:
|
|||||||
# PHP / HHVM
|
# PHP / HHVM
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
php:
|
php:
|
||||||
image: devilbox/php-fpm:${PHP_SERVER}-work-0.58
|
image: devilbox/php-fpm:${PHP_SERVER}-work-0.61
|
||||||
|
|
||||||
##
|
##
|
||||||
## All .env variables
|
## All .env variables
|
||||||
@ -192,6 +192,9 @@ services:
|
|||||||
# to load custom PHP modules
|
# to load custom PHP modules
|
||||||
- ${DEVILBOX_PATH}/mod/php-fpm-${PHP_SERVER}:/usr/lib64/php/custom-modules:ro${MOUNT_OPTIONS}
|
- ${DEVILBOX_PATH}/mod/php-fpm-${PHP_SERVER}:/usr/lib64/php/custom-modules:ro${MOUNT_OPTIONS}
|
||||||
|
|
||||||
|
# Mount devilbox user-defined PHP-FPM startup *.sh scripts
|
||||||
|
- ${DEVILBOX_PATH}/cfg/php-startup-${PHP_SERVER}:/startup.d:rw${MOUNT_OPTIONS}
|
||||||
|
|
||||||
# Mount devilbox user-defined bash config
|
# Mount devilbox user-defined bash config
|
||||||
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
|
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ You can also build the documentation locally before pushing to ensure everything
|
|||||||
#### Requirements
|
#### Requirements
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo pip install sphinx sphinx-autobuild
|
sudo pip install sphinx sphinx-autobuild recommonmark
|
||||||
sudo pip install sphinx_rtd_theme
|
sudo pip install sphinx_rtd_theme
|
||||||
```
|
```
|
||||||
#### How to build and error-check
|
#### How to build and error-check
|
||||||
|
221
docs/advanced/custom-startup-commands.rst
Normal file
221
docs/advanced/custom-startup-commands.rst
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
.. _custom_startup_commands:
|
||||||
|
|
||||||
|
***********************
|
||||||
|
Custom startup commands
|
||||||
|
***********************
|
||||||
|
|
||||||
|
You can provide custom startup commands via bash scripts to each of the PHP container.
|
||||||
|
This may be useful to specify additional software to install or additional settings to apply during
|
||||||
|
the initial startup.
|
||||||
|
|
||||||
|
**Table of Contents**
|
||||||
|
|
||||||
|
.. contents:: :local:
|
||||||
|
|
||||||
|
|
||||||
|
General
|
||||||
|
=======
|
||||||
|
|
||||||
|
You can add custom ``bash`` scripts for each PHP version separately. Provided scripts must end
|
||||||
|
by the file extension ``.sh`` and should be executable. Anything not ending by ``.sh`` will be
|
||||||
|
ignored.
|
||||||
|
|
||||||
|
Where
|
||||||
|
-----
|
||||||
|
|
||||||
|
Startup scripts can be added to ``cfg/php-startup-X.Y/``.
|
||||||
|
See the directory structure for PHP startup script directories inside ``./cfg/`` directory:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
host> ls -l path/to/devilbox/cfg/ | grep 'php-startup'
|
||||||
|
|
||||||
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-startup-5.2/
|
||||||
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-startup-5.3/
|
||||||
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-startup-5.4/
|
||||||
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-startup-5.5/
|
||||||
|
drwxr-xr-x 2 cytopia cytopia 4096 Apr 3 22:04 php-startup-5.6/
|
||||||
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-startup-7.0/
|
||||||
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-startup-7.1/
|
||||||
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-startup-7.2/
|
||||||
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-startup-7.3/
|
||||||
|
drwxr-xr-x 2 cytopia cytopia 4096 Mar 5 21:53 php-startup-7.4/
|
||||||
|
|
||||||
|
|
||||||
|
Custom scripts are added by placing a file into ``cfg/php-startup-X.X/`` (where ``X.X`` stands for
|
||||||
|
your PHP version). The file must end by ``.sh`` in order to be executed by the PHP container.
|
||||||
|
|
||||||
|
Some of the PHP startup directories contain a few example files with the file suffix ``-example``.
|
||||||
|
If you want to use them, copy these files to a new name without the ``-example`` suffix and ensure
|
||||||
|
they end by ``.sh``.
|
||||||
|
|
||||||
|
When
|
||||||
|
----
|
||||||
|
|
||||||
|
The scripts will be executed by the PHP container during initial startup. Whenever you change your
|
||||||
|
scripts, ensure to restart the Devilbox.
|
||||||
|
|
||||||
|
How
|
||||||
|
---
|
||||||
|
|
||||||
|
The scripts will always be executed inside the PHP container (Debian Linux) and will be run with
|
||||||
|
``root`` privileges.
|
||||||
|
|
||||||
|
|
||||||
|
Examples
|
||||||
|
========
|
||||||
|
|
||||||
|
The following examples should already exist as example files within ``cfg/php-startup-X.Y``, but
|
||||||
|
will covered here as well to show some real world examples of what can be done with startup scripts.
|
||||||
|
|
||||||
|
Installing Microsoft ODBC driver
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
This example will add Microsofts ODBC driver to PHP 7.1. These drivers are required in order to
|
||||||
|
make the PHP modules ``pdo_sqlsrv`` and ``sqlsrv`` work. The two mentioned modules are already
|
||||||
|
available in the PHP container, but are explicitly disabled via :ref:`env_file_php_modules_disable`.
|
||||||
|
|
||||||
|
They won't work without the ODBC driver installed, which unfortunately cannot be bundled, as it
|
||||||
|
requires every user to accept a license/EULA by Microsoft.
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Navigate to starup dir of PHP 7.1
|
||||||
|
host> cd path/to/devilbox/cfg/php-startup-7.1
|
||||||
|
|
||||||
|
# Create an .sh file
|
||||||
|
host> touch ms-odbc.sh
|
||||||
|
|
||||||
|
# Open the file in your favourite editor
|
||||||
|
host> vi ms-odbc.sh
|
||||||
|
|
||||||
|
Paste the following into ``ms-obbc.sh`` and **ensure to accept the EULA** by changing
|
||||||
|
``ACCEPT_EULA=N`` to ``ACCEPT_EULA=Y``.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:caption: ms-odbc.sh
|
||||||
|
:emphasize-lines: 18
|
||||||
|
|
||||||
|
!/bin/bash
|
||||||
|
#
|
||||||
|
# This script will automatically install the Microsoft ODBC driver for MsSQL
|
||||||
|
# support for PHP during startup.
|
||||||
|
#
|
||||||
|
# In order for it to work, you must read and accept their License/EULA:
|
||||||
|
# https://odbceula.blob.core.windows.net/eula17/LICENSE172.TXT
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
# EDIT THE VARIABLE BELOW TO ACCEPT THE EULA (If you agree to their terms)
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
###
|
||||||
|
### Set this to "Y" (capital 'Y') if you accept the EULA.
|
||||||
|
###
|
||||||
|
ACCEPT_EULA=N
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
# DO NOT EDIT BELOW THIS LINE
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
###
|
||||||
|
### Where to retrieve the deb package
|
||||||
|
###
|
||||||
|
MSODBC_URL="https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql17/"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Pre-flight check
|
||||||
|
###
|
||||||
|
if [ "${ACCEPT_EULA}" != "Y" ]; then
|
||||||
|
echo "MS ODBC EULA not accepted. Aborting installation."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### EULA accepted, so we can proceed
|
||||||
|
###
|
||||||
|
|
||||||
|
# Extract latest *.deb packate
|
||||||
|
MSODBC_DEB="$( curl -k -sS "${MSODBC_URL}" | grep -Eo 'msodbcsql[-._0-9]+?_amd64\.deb' | tail -1 )"
|
||||||
|
|
||||||
|
# Download to temporary location
|
||||||
|
curl -k -sS "${MSODBC_URL}${MSODBC_DEB}" > "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
# Install
|
||||||
|
ACCEPT_EULA="${ACCEPT_EULA}" dpkg -i "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
# Remove artifacts
|
||||||
|
rm -f "/tmp/${MSODBC_DEB}"
|
||||||
|
|
||||||
|
|
||||||
|
.. important::
|
||||||
|
The script will not work, if you have not accepted the EULA.
|
||||||
|
|
||||||
|
|
||||||
|
Installing Oracle oci8 and pdo_oci PHP modules
|
||||||
|
----------------------------------------------
|
||||||
|
|
||||||
|
This example will install Oracle instaclient as well as PHP modules ``pdo_oci`` and ``oci8`` in
|
||||||
|
order to use PHP to connect to Oracle. This startup script will only be provided to PHP 7.2
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Navigate to starup dir of PHP 7.2
|
||||||
|
host> cd path/to/devilbox/cfg/php-startup-7.2
|
||||||
|
|
||||||
|
# Create an .sh file
|
||||||
|
host> touch oracle.sh
|
||||||
|
|
||||||
|
# Open the file in your favourite editor
|
||||||
|
host> vi oracle.sh
|
||||||
|
|
||||||
|
|
||||||
|
Paste the following into ``oracle.sh``:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:caption: oracle.sh
|
||||||
|
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/
|
||||||
|
#
|
||||||
|
|
||||||
|
# Install 'alien' to install rpm packages
|
||||||
|
apt-get update -q
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests alien
|
||||||
|
|
||||||
|
# Instantclient (basic lite)
|
||||||
|
curl -o /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Instantclient (devel)
|
||||||
|
curl -o /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Install RPMs
|
||||||
|
alien -i /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
alien -i /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Rempve RPMs
|
||||||
|
rm -f /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
rm -f /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm
|
||||||
|
|
||||||
|
# Necessary symlinks
|
||||||
|
ln -s /usr/lib/oracle/18.3/client64/lib/libmql1.so /usr/lib/
|
||||||
|
ln -s /usr/lib/oracle/18.3/client64/lib/libipc1.so /usr/lib/
|
||||||
|
ln -s /usr/lib/oracle/18.3/client64/lib/libnnz18.so /usr/lib/
|
||||||
|
ln -s /usr/lib/oracle/18.3/client64/lib/libons.so /usr/lib/
|
||||||
|
ln -s /usr/lib/oracle/18.3/client64/lib/libclntshcore.so.18.1 /usr/lib/
|
||||||
|
|
||||||
|
# Build and install PHP extension oci8
|
||||||
|
docker-php-ext-configure oci8 --with-oci8=instantclient
|
||||||
|
docker-php-ext-install oci8
|
||||||
|
|
||||||
|
# Build and install PHP extension pdo_oci
|
||||||
|
docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr,18.3
|
||||||
|
docker-php-ext-install pdo_oci
|
@ -70,6 +70,7 @@ host is ready to be served with your custom domain.
|
|||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
:numbered:
|
:numbered:
|
||||||
|
|
||||||
|
advanced/custom-startup-commands
|
||||||
advanced/customize-php-globally
|
advanced/customize-php-globally
|
||||||
advanced/customize-webserver-globally
|
advanced/customize-webserver-globally
|
||||||
advanced/connect-to-host-os
|
advanced/connect-to-host-os
|
||||||
|
Loading…
x
Reference in New Issue
Block a user