The Web server (nginx), PHP and the services (MariaDB, PostgreSQL, Mailpit) are installed locally with Ansible.
All the management of the system (configuration, update, etc) goes through this tool which allows everyone to have a similar environment.
You must first clone the repository to setup the environment.
$ xcode-select --install
$ git clone https://github.com/Dalokae/mac-playbook.git ~/.mac-playbook
# With SSH
$ git clone git@github.com:Dalokae/mac-playbook.git ~/.mac-playbookThen you have to configure the environment:
$ cd ~/.mac-playbook
$ touch config.yml
$ vim config.ymlYou can look in the file default.config.yml to customize your environment.
Example :
---
############
# SYSTEM #
############
edit_dev_config_with: code
homebrew_cask_packages:
- tableplus
- iterm2
- alfred
- code
############
# dotfiles #
############
zsh_theme: agnoster
#########
# GIT #
#########
git_user_name: John Doe
git_user_email: john@doe.fr
###########
# Nginx #
###########
nginx_sites:
- name: wallabag
server_name: wallabag.localhost
type: symfony
root: "~/dev/wallabag/web"
php_version: '8.3'Homebrew is needed, see https://brew.sh/ to install it.
Then :
# Edit your bashrc or zshrc to include "export PIPX_HOME=$HOME/.local/pipx"
# To bootstrap with a specific Ansible version: make bootstrap ansible_version_spec="<2.18"
$ make bootstrap
$ make setup-mkcertAnd to finish : reboot the computer.
From there, you can use the dev binary to manage the environment.
To avoid having to enter the SUDO password all the time we will encrypt our SUDO password with a password that will be stored in the keychain :
$ ./scripts/generate-ansible-passwordTo list all commands just type dev.
mac-playbook is licensed under the MIT license.