Added instructions for forward the MySQL/MariaDB port to README
This commit is contained in:
parent
2396b4799c
commit
5221544b98
13
README.md
13
README.md
@ -61,6 +61,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
|
||||
- [Setup Laravel and Docker on Digital Ocean](#Digital-Ocean)
|
||||
- [Misc](#Misc)
|
||||
- [Cron jobs](#CronJobs)
|
||||
- [MySQL access from host](#MySQL-access-from-host)
|
||||
- [Use custom Domain](#Use-custom-Domain)
|
||||
- [Enable Global Composer Build Install](#Enable-Global-Composer-Build-Install)
|
||||
- [Install Prestissimo](#Install-Prestissimo)
|
||||
@ -950,6 +951,18 @@ You can add your cron jobs to `workspace/crontab/root` after the `php artisan` l
|
||||
* * * * * root echo "Every Minute" > /var/log/cron.log 2>&1
|
||||
```
|
||||
|
||||
<a name="MySQL-access-from-host"></a>
|
||||
### MySQL access from host
|
||||
|
||||
You can forward the MySQL/MariaDB port to your host by adding the lines
|
||||
```
|
||||
ports:
|
||||
- "3306:3306"
|
||||
```
|
||||
To the `mysql` or `mariadb` section of the LaraDock `docker-compose.yml` or in your [environment specific Compose](https://docs.docker.com/compose/extends/) file.
|
||||
|
||||
The MySQL port is not forwarded by default because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. To learn more about how Docker publishes ports, please read [this excellent post on the subject](https://fralef.me/docker-and-iptables.html).
|
||||
|
||||
<a name="Use-custom-Domain"></a>
|
||||
### Use custom Domain (instead of the Docker IP)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user