This development environment has been created for use with a Symfony API, but should be suitable for general development where Nginx, PHP and Mongo are required.
See Tags for details of the tags in this repo that will work with tags in the Symfony API repo.
- Edit the
.env
file and setCODE_DIR_HOST
to reflect the location of the source code on your host machine. CODE_DIR_CONTAINER
is set to/var/www/html
, if this is altered thenroot
withinnginx/default.conf
will also need updating and thevolumes
directive fornginx
will need uncommenting indocker-compose.yml
- currently
root
indefault.conf
is set to/var/www/html/public
to serve Symfony 4.
- currently
- Set
MONGO_DATA_DIR_HOST
to directory on host machine for storing MongoDB data.
-
docker-sync is used to improve read/write access for mounted volumes.
-
Install docker-sync, for instance:
gem install docker-sync --user-install
docker-sync-stack start
- Add an entry to your
/etc/hosts
file if you want to use a domain name.
Compatible with any of the 4.3.x tags in the Symfony API repo.
Uses:
- nginx - 1.17
- php-fpm - 7.3 (incl. mongodb extension)
- mongo - 4.0 (seeded with admin user)
- composer - 1.18 (incl. mongodb extension)
Tested on OS-X v10.14 with:
- docker desktop 2.0.0.3
- docker 18.09.2
- docker-compose 1.23.2