View Code? Open in Web Editor
NEW
This project forked from bendbennett/docker-compose-nginx-php-mongo
docker-compose-nginx-php7-mongo3's Introduction
Setting Up Local Docker Dev Environment for PHP 7 & Mongo 3
- Tested on OS-X v10.12 with:
- docker-machine version 0.10.0
- docker version (running on docker-machine) v17.06.0-ce
- docker-compose version 1.12.0
- Edit the
.env
file and set CODE_DIR_HOST
to reflect the location of the source code on your host machine.
CODE_DIR_GUEST
is set to /var/www/html
, if this is altered then root
within nginx/default.conf
will also need updating.
- currently
root
in default.conf
is set to /var/www/html/web
to serve Symfony 3.
cd
into the directory containing docker-compose.yml
- Run
docker-compose up -d
- Add an entry to your
/etc/hosts
file if you want to use a domain name.
- you can get the docker-machine ip by running
docker-machine ip
- In order to improve request-response time install
docker-machine-nfs
- Then run
docker-machine-nfs default
- if you see error messages relating to conflicts with Vagrant nfs mounts then edit
/etc/exports
and comment out the Vagrant mount(s)
- to remove the nfs mount:
docker-machine ssh
rm /var/lib/boot2docker/bootlocal.sh
docker-compose-nginx-php7-mongo3's People
Contributors
Watchers