@@ -238,11 +244,54 @@ Note: In this case the folder structure will be like this:
```
- projects
- laradock
- project1
- project2
- myProject
```
2 - Edit the `docker-compose.yml` file to map to your project directory once you have it (example: `- ../myProject:/var/www`).
3 - Stop and re-run your docker-compose command for the changes to take place.
```
docker-compose stop && docker-compose up -d XXXX YYYY ZZZZ ....
```
**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".
#### B) Setup for Multiple Projects:
1 - Clone this repository anywhere on your machine:
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
```
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
...
...
@@ -268,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`.
...
...
@@ -306,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).*