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
1 - For **Windows & MAC** users only: If you are not using the native Docker-Engine `Beta`, make sure you have a running Docker Virtual Host on your machine.
191
-
(**Linux** users don't need a Virtual Host, so skip this step).
192
-
193
194
[How to run a Docker Virtual Host?](#Run-Docker-Virtual-Host)
195
+
(**Linux** users don't need a Virtual Host, so skip this step).
194
196
195
197
196
198
<br>
197
-
2 - Run the Containers, (you can select the containers that you wish to run)
198
-
<br>
199
-
*Make sure you are in the `laradock` folder before running the `docker-compose` command.*
199
+
2 - Run some Containers: *(Make sure you are in the `laradock` folder before running the `docker-compose` commands).*
200
+
201
+
200
202
201
203
**Example:** Running NGINX and MySQL:
202
204
203
205
```bash
204
206
docker-compose up -d nginx mysql
205
207
```
206
208
207
-
*Note: the PHP-FPM, Workspace, Application and Data Containers will automatically run.*
209
+
You can select your own combination of container form this list:
1 - First make sure you run the MongoDB Container (`mongo`) with the `docker-compose up` command.
572
+
573
+
```bash
574
+
docker-compose up -d mongo
575
+
```
576
+
577
+
578
+
2 - Add the MongoDB configurations to the `config/database.php` config file:
579
+
580
+
```php
581
+
'connections' => [
582
+
583
+
'mongodb' => [
584
+
'driver' => 'mongodb',
585
+
'host' => env('DB_HOST', 'localhost'),
586
+
'port' => env('DB_PORT', 27017),
587
+
'database' => env('DB_DATABASE', 'database'),
588
+
'username' => '',
589
+
'password' => '',
590
+
'options' => [
591
+
'database' => '',
592
+
]
593
+
],
594
+
595
+
// ...
596
+
597
+
],
598
+
```
599
+
600
+
3 - Open your Laravel's `.env` file and update the following variables:
601
+
602
+
- set the `DB_HOST` to your `Docker-IP`.
603
+
- set the `DB_PORT` to `27017`.
604
+
- set the `DB_DATABASE` to `database`.
605
+
606
+
607
+
4 - Finally make sure you have the `jenssegers/mongodb` package installed via Composer and its Service Provider is added.
608
+
609
+
```bash
610
+
composer require jenssegers/mongodb
611
+
```
612
+
More details about this [here](https://github.com/jenssegers/laravel-mongodb#installation).
613
+
614
+
5 - Test it:
615
+
616
+
- First let your Models extend from the Mongo Eloquent Model. Check the [documentation](https://github.com/jenssegers/laravel-mongodb#eloquent).
617
+
- Enter the Workspace Continer `docker-compose run workspace bash`.
618
+
- Migrate the Database `php artisan migrate`.
619
+
577
620
578
621
579
622
@@ -773,43 +816,52 @@ server_name laravel.dev;
773
816
```
774
817
775
818
819
+
<br>
820
+
<aname="debugging"></a>
821
+
### Debugging
776
822
823
+
*Here's a list of the common problems you might face, and the possible solutions.*
777
824
825
+
#### + I see a blank (white) page instead of the Laravel 'Welcome' page!
778
826
827
+
run this command from the Laravel root directory:
828
+
829
+
```bash
830
+
sudo chmod -R 777 storage bootstrap/cache
831
+
```
832
+
833
+
#### + I see "Welcome to nginx" instead of the Laravel App!
834
+
835
+
use `http://127.0.0.1` instead of `http://localhost` in your browser.
779
836
780
837
781
838
782
839
783
840
784
-
<br>
785
-
## Contributing
786
841
787
-
This little project was built by one man who has a full time job and many responsibilities, so if you like this project and you find that it needs a bug fix or support for new software or upgrade any container, or anything else.. Do not hesitate to contribute, you are more than welcome :)
788
842
789
-
## Support
790
843
791
-
To suggest a features or report a bug, open a new [Issue](https://github.com/laradock/laradock/issues).
792
844
845
+
<br>
846
+
## Contributing
847
+
848
+
This little project was built by one man who has a full time job and many responsibilities, so if you like this project and you find that it needs a bug fix or support for new software or upgrade any container, or anything else.. Do not hesitate to contribute, you are more than welcome :)
793
849
794
850
795
851
<aname="Help"></a>
796
852
## Help & Questions
797
853
798
-
If you need help with anything related to this project, shedule a live call with me on [Codementor](https://www.codementor.io/mahmoudz), I'd love to help.
854
+
If you need any help with Docker and Laravel, you can schedule a live call with the creator of this project at [Codementor.io](https://www.codementor.io/mahmoudz), He would love to help.
799
855
800
-
If you have a short question, send me a direct message on LaraChat, my username is `mahmoud_zalt`. Or send me an email on `mahmoud@zalt.me`.
856
+
For general questions you can open [Issues](https://github.com/laradock/laradock/issues) here on Github (We will label them as questions).
801
857
858
+
Additionally, you can contact Mahmoud Zalt (the creator of this project) via a direct message on LaraChat, (his username is `mahmoud_zalt`). Or send him an email (`mahmoud@zalt.me`).
0 commit comments