Our own Docker setup.
git clone https://github.com/cerberos-dev/crb-dock.git.- Copy
.env.exampleto.env. - Edit
.envto fit local environment. - Start containers:
docker-compose up -d.
You can also start the containers and display debug information with: docker-compose up
- Go to
nginx/sitescopy an example config to a<project-name>.conf file. - Edit the config file to fit the project.
- When not using dnsmasq, adjust your local host file (for example:
/etc/hosts). - Reload Nginx service:
docker exec -it crb_dock_nginx bash -c "nginx -s reload".
- Make sure all containers are down (
docker psshould give no results). - Change your
.envfile to the desired version (see example file for more info). - Rebuild the php-fpm container:
docker-compose build php-fpm. - Now you can use
crb-dockas usual with the desired PHP version.
Make resolving hosts easier by using Dnsmasq, setup script included in tools directory (macOS only).
It will request sudo access so make sure you know your password.
- Enter the directory
tools. - Run the
setupDNS.shscript. - Enter sudo password to start/restart services.
- Make sure all containers are up with
docker ps. - Open a browser and navigate to
https://crb-dock.crb/orhttps://crb-dock.local/