dbould / php-docker

A php, MySQL and Nginx docker setup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

php-docker

Start Docker

docker-compose up

App address

http://myapp.test

You should get a "DOCKER WORK" message.

To change, edit the hostname docker-compose.yml You will also need to edit your local machine's hosts file. In OSX and Linux it's in /etc/hosts.

Debugging

If you get something like this:

Cannot start service mysql: Mounts denied: The paths /sites/blah/... and /sites/blah/... are not shared from OS X and
are not known to Docker.

Check this stack overflow

If you're using a MySQL GUI client, don't forget to add a user from an address other than localhost. MySQL will add a localhost user on a new install only, so you'll need to add a user for other locations. The sample below adds a user from any location:

CREATE USER 'root'@'%' IDENTIFIED BY 'root';
GRANT ALL PRIVILEGES ON * . * TO 'root'@'%';

About

A php, MySQL and Nginx docker setup


Languages

Language:Dockerfile 96.7%Language:Hack 3.3%