Makefiles organized in bundles (subfolders) for an easy development environment setup and handling.
Ive seen full fledged development environments written in Python, Php etc... which needs to be maintained by a developer in full time.
Most of my project are at a POC level or small (maybe micro) sizes website, where i want to test something.
Now the xebro Makefiles come in handy.
Those are only Makefiles, organized in Subfolder, with the least possible amount of a programming language.
- Readability is king, write more lines and ignore all fancy short notation stuff
- YAGNI, Don't overengineer your code. Don't fix problems you don't have
- Don't build wrapper for existing tools.
- KISS. Keep it super simple.
Install the core modes as git submodule, and then just symlink the main_file to the project root directory as Makefile
mkdir -p xo
composer require xebro-gmbh/make-core --dev
ln -sf vendor/xebro-gmbh/make-core/main_file MakefileIm using a local domain for development dev.local, wich needs to be entered into your /etc/hosts file.
Add this line after all other entries, the sorting doesn't matter here.
127.0.0.1 dev.local
I don't like scripts messing with system relevat files, so i didn't create a make command for it and maybe never will.
Install all environment variables (written to .env or .gitiognore), the targets can be run multiple times.
make installAll bundles (besides the core one), can be installed when required. When you need a PHP development environment than you would go with
make docker/docker
make docker/nginx-php
make docker/php-fpm
make docker/traefik
make install
make startmake docker/docker
make docker/mailcatcher
make docker/mariadb
make docker/nginx-php
make docker/node
make docker/php-fpm
make docker/traefikWhen you need more information about all possible commands you can run:
make helpThis will ouput all available command.
You want to add your own Makefile targets, then just create a Makefile in the folder ./bin and
this file will be included too.
Add to the Makefile in ./bin/Makefile
custom.test:
echo "test"
install: custom.testand now your command will output the string "test", when you run make install.
You can use hooks to execute your own commands, when the project starts or stops, etc...
start: ## start development environment
stop: ## stop development environment
install: ## init project and install all dependencies
build:
help:git submodule update --init --recursive