Our own Docker setup.
git clone https://github.com/cerberos-dev/crb-dock.git
.- Copy
.env.example
to.env
. - Edit
.env
to 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/sites
copy 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 ps
should give no results). - Change your
.env
file 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-dock
as 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.sh
script. - 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/