2019-11-09 16:56:34 +00:00
|
|
|
ifneq (,)
|
|
|
|
.error This Makefile requires GNU Make.
|
|
|
|
endif
|
2018-12-09 00:55:12 +00:00
|
|
|
|
|
|
|
|
2018-12-27 12:02:57 +00:00
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
|
|
# Misc Targets
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
|
|
update-readme:
|
|
|
|
cat "../README.md" \
|
2020-11-07 10:34:52 +00:00
|
|
|
| perl -00 -pe "s#<!-- modules -->.*<!-- /modules -->#<!-- modules -->\n$$(./scripts/get-modules.sh)\n<!-- /modules -->#s" \
|
2018-12-28 21:45:30 +00:00
|
|
|
> "../README.md.tmp"
|
|
|
|
yes | mv -f "../README.md.tmp" "../README.md"
|
2018-12-27 12:02:57 +00:00
|
|
|
|
2019-11-09 16:56:34 +00:00
|
|
|
|
2019-11-21 08:43:00 +00:00
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
|
|
# Linting Targets
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
lint-tests:
|
|
|
|
docker run --rm $(tty -s && echo "-it" || echo) \
|
|
|
|
-v "$(PWD):/mnt" \
|
|
|
|
--entrypoint=sh \
|
|
|
|
koalaman/shellcheck-alpine:stable \
|
|
|
|
-c "find . -name '*.sh' -print0 | xargs -0 -n1 shellcheck --check-sourced --color=auto --shell=bash"
|
|
|
|
|
|
|
|
|
2018-12-09 00:55:12 +00:00
|
|
|
# -------------------------------------------------------------------------------------------------
|
2019-11-09 16:56:34 +00:00
|
|
|
# Startup Targets
|
2018-12-09 00:55:12 +00:00
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
###
|
2019-11-09 16:56:34 +00:00
|
|
|
### Configure .env file
|
|
|
|
###
|
|
|
|
configure: ../.env
|
|
|
|
ifeq ($(KEY),)
|
|
|
|
$(error Target requires KEY to be set.)
|
2018-12-09 00:55:12 +00:00
|
|
|
endif
|
2019-11-09 16:56:34 +00:00
|
|
|
@$(PWD)/scripts/env-setvar.sh "$(KEY)" "$(VAL)"
|
|
|
|
|
|
|
|
|
|
|
|
###
|
|
|
|
### Pull currently setup images
|
|
|
|
###
|
|
|
|
pull: ../.env
|
|
|
|
@$(PWD)/scripts/compose-pull.sh
|
2018-12-09 00:55:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
###
|
2019-11-09 16:56:34 +00:00
|
|
|
### Startup Devilbox
|
|
|
|
###
|
|
|
|
start: ../.env
|
2019-11-22 08:14:33 +00:00
|
|
|
@$(MAKE) --no-print-directory configure KEY=HOST_PATH_HTTPD_DATADIR VAL=.tests/www
|
|
|
|
@$(MAKE) --no-print-directory configure KEY=DEBUG_COMPOSE_ENTRYPOINT VAL=2
|
|
|
|
@$(MAKE) --no-print-directory configure KEY=NEW_UID VAL=$$(id -u)
|
|
|
|
@$(MAKE) --no-print-directory configure KEY=NEW_GID VAL=$$(id -g)
|
2019-11-09 16:56:34 +00:00
|
|
|
@$(PWD)/scripts/compose-start.sh
|
|
|
|
|
|
|
|
|
2020-03-23 10:31:43 +00:00
|
|
|
###
|
|
|
|
### Stop Devilbox
|
|
|
|
###
|
|
|
|
stop:
|
|
|
|
@$(PWD)/scripts/compose-stop.sh
|
|
|
|
|
|
|
|
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
### Show Docker logs
|
|
|
|
###
|
|
|
|
logs:
|
|
|
|
@$(PWD)/scripts/compose-logs.sh
|
|
|
|
|
|
|
|
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
|
|
# Test Targets
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
###
|
2019-11-22 23:02:17 +00:00
|
|
|
### PHP Modules
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
test-smoke-modules:
|
2019-11-20 10:28:25 +00:00
|
|
|
$(PWD)/tests/modules-curl-vhosts.sh "modules"
|
|
|
|
$(PWD)/tests/modules-php-vhosts.sh "modules"
|
|
|
|
$(PWD)/tests/modules-fetch-tests.sh "modules-external"
|
|
|
|
$(PWD)/tests/modules-curl-vhosts.sh "modules-external"
|
|
|
|
$(PWD)/tests/modules-php-vhosts.sh "modules-external"
|
2019-11-09 16:56:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
###
|
2019-11-22 23:02:17 +00:00
|
|
|
### Configuration
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
test-smoke-config:
|
|
|
|
$(PWD)/tests/config-xdebug.sh
|
|
|
|
|
|
|
|
|
|
|
|
###
|
2019-11-22 23:02:17 +00:00
|
|
|
### Intranet
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
test-smoke-intranet:
|
|
|
|
$(PWD)/tests/intranet-homepage.sh
|
|
|
|
$(PWD)/tests/intranet-vhost.sh
|
|
|
|
$(PWD)/tests/intranet-email.sh
|
|
|
|
$(PWD)/tests/intranet-redis.sh
|
|
|
|
$(PWD)/tests/intranet-memcached.sh
|
|
|
|
|
|
|
|
|
|
|
|
###
|
2019-11-22 23:02:17 +00:00
|
|
|
### Intranet Vendors
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
test-smoke-vendors:
|
2019-11-21 08:43:00 +00:00
|
|
|
$(PWD)/tests/vendor-adminer-mysql.sh
|
|
|
|
$(PWD)/tests/vendor-adminer-pgsql.sh
|
|
|
|
$(PWD)/tests/vendor-adminer-mongo.sh
|
2019-11-09 16:56:34 +00:00
|
|
|
$(PWD)/tests/vendor-phpmyadmin.sh
|
|
|
|
$(PWD)/tests/vendor-phppgadmin.sh
|
|
|
|
$(PWD)/tests/vendor-phpredmin.sh
|
2020-01-03 14:39:22 +00:00
|
|
|
$(PWD)/tests/vendor-ocp.sh
|
2019-11-09 16:56:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
###
|
2019-11-22 23:02:17 +00:00
|
|
|
### Virtual Host
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
test-smoke-vhosts:
|
|
|
|
$(PWD)/tests/vhost-directory_index.sh
|
|
|
|
$(PWD)/tests/vhost-vhostgen_default_template.sh
|
|
|
|
$(PWD)/tests/vhost-vhostgen_customize.sh
|
|
|
|
|
|
|
|
|
|
|
|
###
|
2019-11-22 23:02:17 +00:00
|
|
|
### Reverse Proxy
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
test-smoke-rproxies:
|
|
|
|
$(PWD)/tests/rproxy-javascript.sh
|
|
|
|
|
|
|
|
|
|
|
|
###
|
2019-11-22 23:02:17 +00:00
|
|
|
### SSL
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
test-smoke-ssl:
|
|
|
|
$(PWD)/tests/ssl-intranet.sh
|
|
|
|
$(PWD)/tests/ssl-vhost.sh
|
|
|
|
|
|
|
|
|
|
|
|
###
|
2019-11-22 23:02:17 +00:00
|
|
|
### Bind
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
test-smoke-bind:
|
|
|
|
@echo noop
|
|
|
|
|
|
|
|
|
|
|
|
###
|
2019-11-22 23:02:17 +00:00
|
|
|
### Autostart
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
test-smoke-autostart:
|
|
|
|
$(PWD)/tests/autostart-examples.sh
|
|
|
|
|
|
|
|
|
|
|
|
###
|
2019-11-22 23:02:17 +00:00
|
|
|
### Frameworks
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
test-smoke-framework-cakephp:
|
|
|
|
$(PWD)/tests/framework-cakephp.sh
|
|
|
|
|
|
|
|
test-smoke-framework-drupal:
|
|
|
|
$(PWD)/tests/framework-drupal.sh
|
2018-12-27 12:16:30 +00:00
|
|
|
|
2019-11-22 22:10:01 +00:00
|
|
|
test-smoke-framework-wordpress:
|
|
|
|
$(PWD)/tests/framework-wordpress.sh
|
|
|
|
|
2018-12-27 12:16:30 +00:00
|
|
|
|
2020-01-03 17:24:38 +00:00
|
|
|
###
|
|
|
|
### Container
|
|
|
|
###
|
|
|
|
test-smoke-container:
|
|
|
|
$(PWD)/tests/container-mysql.sh
|
|
|
|
|
|
|
|
|
2018-12-09 00:55:12 +00:00
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
|
|
# Helper Targets
|
|
|
|
# -------------------------------------------------------------------------------------------------
|
|
|
|
|
2019-11-09 16:56:34 +00:00
|
|
|
###
|
|
|
|
### Ensure .env file exists
|
|
|
|
###
|
|
|
|
../.env:
|
|
|
|
install -m 0644 ../env-example ../.env
|