2 - Edit the `docker-compose.yml` file to map to your projects directories:
```
volumes_source:
image: tianon/true
volumes:
- ../project1/:/var/www/project1
- ../project2/:/var/www/project2
```
**Note:** if you are using this folder structure don't forget to edit the `docker-compose.yml` file to map to your Laravel directory once you have it (example: `- ../project1/:/var/www/laravel`). "You will need to stop and re-run your docker-compose command for the changes to take place".
3 - You can access all sites by visiting `http://localhost/project1/public` and `http://localhost/project2/public` but of course that's not very useful so let's setup nginx quickly.
4 - Go to `nginx/sites` and copy `sample.conf.example` to `project1.conf` then to `project2.conf`
5 - Open the `project1.conf` file and edit the `server_name` and the `root` as follow:
```
server_name project1.dev;
root /var/www/project1/public;
```
Do the same for each project `project2.conf`, `project3.conf`,...
6 - Create your project Databases **To Be Continue..**
<aname="Usage"></a>
## Usage
...
...
@@ -267,7 +317,7 @@ If you are using **Docker Toolbox** (VM), do one of the following:
**Example:** Running NGINX and MySQL:
```bash
docker-compose up -dnginx mysql
docker-compose up -d nginx mysql
```
**Note**: The `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. If you couldn't find them running then you need specify them as follow: `docker-compose up -d nginx php-fpm mysql workspace`.
...
...
@@ -305,7 +355,7 @@ Open your `.env` file and set the `DB_HOST` to `mysql`:
DB_HOST=mysql
```
*If you are using Laravel and you don't have it installed yet, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
*If you want to use Laravel and you don't have it installed yet, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
...
...
@@ -1096,6 +1146,21 @@ ports:
- "3306:3306"
```
<aname="MySQL-root-access"></a>
### MySQL root access
The default username and password for the root mysql user are `root` and `root `.
1 - Enter the mysql contaier: `docker-compose exec mysql bash`.
2 - Enter mysql: `mysql -uroot -proot` for non root access use `mysql -uhomestead -psecret`.
3 - See all users: `SELECT User FROM mysql.user;`
4 - Run any commands `show databases`, `show tables`, `select * from.....`.