You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2 - Edit the `docker-compose.yml` file to map to your projects directories:
268
+
269
+
```
270
+
volumes_source:
271
+
image: tianon/true
272
+
volumes:
273
+
- ../project1/:/var/www/project1
274
+
- ../project2/:/var/www/project2
242
275
```
243
276
244
-
**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".
277
+
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.
278
+
279
+
280
+
4 - Go to `nginx/sites` and copy `sample.conf.example` to `project1.conf` then to `project2.conf`
281
+
282
+
5 - Open the `project1.conf` file and edit the `server_name` and the `root` as follow:
283
+
284
+
```
285
+
server_name project1.dev;
286
+
root /var/www/project1/public;
287
+
```
288
+
Do the same for each project `project2.conf`, `project3.conf`,...
289
+
290
+
6 - Create your project Databases **To Be Continue..**
291
+
292
+
293
+
294
+
245
295
246
296
<aname="Usage"></a>
247
297
## Usage
@@ -267,7 +317,7 @@ If you are using **Docker Toolbox** (VM), do one of the following:
267
317
**Example:** Running NGINX and MySQL:
268
318
269
319
```bash
270
-
docker-compose up -d nginx mysql
320
+
docker-compose up -d nginx mysql
271
321
```
272
322
273
323
**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`:
305
355
DB_HOST=mysql
306
356
```
307
357
308
-
*If you are using Laravel and you don't have it installed yet, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
358
+
*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).*
309
359
310
360
311
361
@@ -1096,6 +1146,21 @@ ports:
1096
1146
- "3306:3306"
1097
1147
```
1098
1148
1149
+
<aname="MySQL-root-access"></a>
1150
+
### MySQL root access
1151
+
1152
+
The default username and password for the root mysql user are `root` and `root `.
1153
+
1154
+
1 - Enter the mysql contaier: `docker-compose exec mysql bash`.
1155
+
1156
+
2 - Enter mysql: `mysql -uroot -proot` for non root access use `mysql -uhomestead -psecret`.
1157
+
1158
+
3 - See all users: `SELECT User FROM mysql.user;`
1159
+
1160
+
4 - Run any commands `show databases`, `show tables`, `select * from.....`.
0 commit comments