Compare commits
254 Commits
Author | SHA1 | Date | |
---|---|---|---|
f3598c3c97 | |||
4fd73ac512 | |||
747f956d01 | |||
1519d2c64c | |||
43f4f80836 | |||
ca7726c441 | |||
c78eb5228a | |||
81053c0868 | |||
b1367d237f | |||
603207cc2b | |||
43e2b3e403 | |||
f69422e82f | |||
96e82d4115 | |||
6d4a2c4cc4 | |||
f8e5f73e18 | |||
cdc2811d7b | |||
32d26c3e10 | |||
b482d4d901 | |||
ad00284a22 | |||
a835c9e709 | |||
597f922db7 | |||
cdb456a9b5 | |||
714902d12a | |||
657d8535a6 | |||
0594681760 | |||
f5478cfef5 | |||
e10217c64d | |||
f91def64d7 | |||
f991123545 | |||
86ebbfbdd3 | |||
a35287b367 | |||
ddabb4620e | |||
b86211d2d8 | |||
0b414813aa | |||
7dbe65e5f8 | |||
ef38dd1532 | |||
4b91fb1212 | |||
80a60d58cf | |||
1257f8830a | |||
8ed8bfdc2a | |||
042eb9e5e8 | |||
15cac480fe | |||
02e867c17d | |||
d51cd31ebc | |||
ea354cf035 | |||
0d4bacecd8 | |||
86197c9b62 | |||
f8fd92fb0a | |||
61b038e0d9 | |||
5b60b7ffb8 | |||
6e1911bdd5 | |||
d376074936 | |||
64b985f005 | |||
cc50339bcb | |||
8820501644 | |||
07021b01f4 | |||
13891a52dd | |||
a1bbe23800 | |||
2b5fdc00ee | |||
68ff573904 | |||
3a62814fdc | |||
da043ee0c4 | |||
5cd6ea41f9 | |||
d321be888c | |||
7230b11d3b | |||
7b9ec17d8d | |||
18b38db037 | |||
adfb468913 | |||
43f4211abb | |||
b1b8585518 | |||
d8fd1a5de0 | |||
585baf0668 | |||
f99eff3a99 | |||
ff4b913396 | |||
e861348475 | |||
b0831240b1 | |||
37dee56bb7 | |||
2b11fc2299 | |||
754ca4cd4f | |||
10e3dc16d2 | |||
e23c6dae90 | |||
96c1d7c59c | |||
c574943e16 | |||
3226206267 | |||
63543b890a | |||
b58f859eff | |||
170a1efeb1 | |||
50e3d1667f | |||
269732d8ea | |||
a11206d4ba | |||
cb78a6c3d6 | |||
662280c139 | |||
68dd2fd019 | |||
c193c5d03b | |||
4efb5b43c6 | |||
3d2eb81cd5 | |||
a8d7937889 | |||
98c9fdff24 | |||
f05512fd1d | |||
fc460f9497 | |||
1fd55d98e1 | |||
4f5746f2a7 | |||
3d90a806fa | |||
cf9abcd5b8 | |||
e1036185ae | |||
d1af24736b | |||
236665d7d3 | |||
c340d851d3 | |||
38545cfffd | |||
bf19ecffcb | |||
6fa6d02360 | |||
e588f261f8 | |||
5d5545ec9e | |||
d152050e29 | |||
a0da2c0ea0 | |||
2e86243d88 | |||
6b61c7d454 | |||
3881a5d66d | |||
69b223a370 | |||
894cb6ea27 | |||
b81e3e8f15 | |||
7d49f9b820 | |||
9dad1586af | |||
d60178f598 | |||
5d74e10b08 | |||
40422ab4b0 | |||
b35a23d89e | |||
3445b5b1b6 | |||
8315a3872d | |||
6abea8746c | |||
09c5ad273c | |||
99b8a45f3b | |||
4f416da26b | |||
53b73798d3 | |||
c6e9b1ed5d | |||
4973dd93be | |||
9096737aa7 | |||
3429681f2c | |||
d4c727bb2d | |||
1ae104167a | |||
8869b22a1d | |||
1650af04cd | |||
bdcc2adf3f | |||
570be592bb | |||
d94de05fd4 | |||
69c180d2e8 | |||
134911843a | |||
d31ccbd268 | |||
2bbe39cf4a | |||
4588685e97 | |||
4b2ddfad20 | |||
516b148dae | |||
0c53eadf34 | |||
3e61554625 | |||
6054c2d250 | |||
5589a12b9d | |||
e2384e2722 | |||
d077085595 | |||
53f1032975 | |||
875ec23ade | |||
cee9de7ed1 | |||
badad156e1 | |||
8e89725381 | |||
2219177eac | |||
baf29b1223 | |||
5c0933d19a | |||
8de9eca8ae | |||
d172180660 | |||
9f78b17fd1 | |||
f5e33fb396 | |||
9ae6e45dda | |||
94d88e91c5 | |||
8b4901ce57 | |||
08086be4c5 | |||
f2805bca52 | |||
033e1b8721 | |||
9e290ffddb | |||
6ada2f1b91 | |||
c6e393f5ce | |||
4e443cec09 | |||
528b60eb17 | |||
aedc7c8438 | |||
ec4ccb4a20 | |||
de6040a14d | |||
e0e4616ae0 | |||
c00fe5d7e0 | |||
30cf27e011 | |||
dcec8a46a8 | |||
1c7e2e7d85 | |||
1d6583e97e | |||
1cf5bcde62 | |||
db40c67f75 | |||
e10ba9fa9f | |||
a42a295951 | |||
0678415663 | |||
73a3745cc3 | |||
bed0fd9bdb | |||
3f1d4b70a6 | |||
218ffe641e | |||
be39e93ea2 | |||
783c9321c9 | |||
c62ce7d36f | |||
8ee2229c84 | |||
735647bdf7 | |||
f61535427c | |||
0d41c3d65e | |||
cbd3cf7c20 | |||
d505871faf | |||
9c14954ff4 | |||
fd0cbff16c | |||
246814874c | |||
1250668267 | |||
faa42d8651 | |||
ab1d5bae95 | |||
7f27073a4e | |||
1a80385a48 | |||
c88e690bb4 | |||
c1de398acc | |||
73f7c88122 | |||
f7b94ac599 | |||
ff39e6045d | |||
07ebd5f69b | |||
36fcc6674e | |||
37ed904f1a | |||
7a343f168f | |||
0ac0166068 | |||
048b55186e | |||
25c2768557 | |||
1d918a71d8 | |||
9e3f8dd43d | |||
46fcb9e09c | |||
603010cbd5 | |||
48710f19c3 | |||
0983cc98fe | |||
6be81f05c2 | |||
8317fbde5c | |||
b45f395996 | |||
59dfacee13 | |||
a6e0338245 | |||
f610aa63d1 | |||
966a84fa39 | |||
356dc36fd5 | |||
c112fdffc1 | |||
fa9ac1e471 | |||
3f13aa4f50 | |||
474504f1d3 | |||
ca45806aaa | |||
4947dfaad1 | |||
7b542618f0 | |||
aabe504c24 | |||
b401c517b2 | |||
d89a944e22 | |||
48f8f3c02d | |||
4030cc2f26 |
@ -9,4 +9,4 @@ charset = utf-8
|
||||
|
||||
[{Dockerfile,docker-compose.yml}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
indent_size = 2
|
||||
|
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
.idea
|
||||
/logs
|
||||
/data
|
||||
.env
|
||||
/.project
|
@ -1,7 +1,7 @@
|
||||
baseurl = "http://laradock.io/"
|
||||
languageCode = "en-us"
|
||||
publishDir = "../"
|
||||
title = "Laradock Docs"
|
||||
publishDir = "../../docs"
|
||||
title = "Laradock"
|
||||
theme = "hugo-material-docs"
|
||||
metadataformat = "yaml"
|
||||
canonifyurls = true
|
||||
@ -15,8 +15,8 @@ googleAnalytics = "UA-37514928-9"
|
||||
copyright = ""
|
||||
|
||||
# Repository
|
||||
provider = "GitHub"
|
||||
repo_url = "https://github.com/laradock/laradock"
|
||||
provider = ""
|
||||
repo_url = ""
|
||||
|
||||
version = ""
|
||||
logo = ""
|
||||
@ -32,8 +32,8 @@ googleAnalytics = "UA-37514928-9"
|
||||
highlight_css = ""
|
||||
|
||||
[params.palette]
|
||||
primary = "purple"
|
||||
accent = "deep-purple"
|
||||
primary = "deep-purple"
|
||||
accent = "purple"
|
||||
|
||||
[params.font]
|
||||
text = "Doctarine"
|
||||
@ -41,7 +41,7 @@ googleAnalytics = "UA-37514928-9"
|
||||
|
||||
[social]
|
||||
twitter = ""
|
||||
github = "laradock"
|
||||
github = "laradock/laradock"
|
||||
email = ""
|
||||
|
||||
# ------- MENU START -----------------------------------------
|
@ -7,41 +7,53 @@ weight: 6
|
||||
|
||||
Your contribution is more than welcome.
|
||||
|
||||
## Got a Question or Problem?
|
||||
## I have a Question/Problem
|
||||
|
||||
If you have questions about how to use LaraDock, please direct your questions to the discussion on [Gitter](https://gitter.im/LaraDock/laradock). If you believe your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Question).
|
||||
If you have questions about how to use Laradock, please direct your questions to the discussion on [Gitter](https://gitter.im/Laradock/laradock). If you believe your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as `Question`) And you can still seek help on Gitter for it.
|
||||
|
||||
## Found an Issue?
|
||||
If you find a bug in the source code or a mistake in the documentation, you can help us by
|
||||
submitting an [Issue](https://github.com/laradock/laradock/issues). Even better you can submit a Pull Request with a fix.
|
||||
## I found an Issue
|
||||
If have an issue or you found a typo in the documentation, you can help us by
|
||||
opnening an [Issue](https://github.com/laradock/laradock/issues).
|
||||
|
||||
## Want a Feature?
|
||||
You can request a new feature by submitting an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request.
|
||||
**Steps to do before opening an Issue:**
|
||||
|
||||
1. Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).
|
||||
|
||||
2. Decide if the Issue belongs to this project or to [Docker](https://github.com/docker) itself! or even the tool you are using such as Nginx or MongoDB...
|
||||
|
||||
If your issue appears to be a bug, and hasn't been reported, then open a new issue.
|
||||
|
||||
*This Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.*
|
||||
|
||||
|
||||
## Edit the documentation
|
||||
## I want a Feature
|
||||
You can request a new feature by submitting an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as `Feature Suggestion`). If you would like to implement a new feature then consider submitting a Pull Request yourself.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## I want to update the Documentation (Site)
|
||||
|
||||
Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Material Docs theme](http://themes.gohugo.io/theme/material-docs/). You might need to check their docs quickly.
|
||||
|
||||
|
||||
1. Install [Hugo](https://gohugo.io/) on your machine.
|
||||
2. Clone laradock.
|
||||
3. Go to `/docs`.
|
||||
4. Delete everything except the `_settings` folder & the `CNAME` file.
|
||||
5. Open `docs/_settings` from your terminal and run `hugo serve` to host the website locally.
|
||||
6. Open the `docs/_settings/content` and search for the folder of the section you want to edit.
|
||||
7. In each secion there's an `index.md` file, that's the file you need to edit.
|
||||
8. To edit the sidebar (in case you are adding new section) go to `docs/_settings/config.toml` and add the section there.
|
||||
9. After done editing, run the this command `hugo` to generate the updated site inside the `docs` folder.
|
||||
10. Go back to the project root directory, commit and push..
|
||||
1. Install [Hugo](https://gohugo.io/) on your machine (easy thing).
|
||||
2. Open the `DOCUMENTATION/_settings/content` and search for the markdown file you want to edit (every folder represents a section in the menu).
|
||||
3. Delete the `/docs` folder from the root.
|
||||
4. When you finish editing, go to `DOCUMENTATION/_settings/` and run the `hugo` command to generate the HTML docs (inside new `/docs` folder).
|
||||
|
||||
### To Host the website locally
|
||||
Go to `DOCUMENTATION/_settings` in your terminal and run `hugo serve` to host the website locally.
|
||||
|
||||
### Edit the sidebar
|
||||
To add a new section to the sidebar or edit existing one, you need to edit this file `DOCUMENTATION/_settings/config.toml`.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Coding Guidelines
|
||||
|
||||
## Support new Software
|
||||
## How to support new Software (Add new Container)
|
||||
|
||||
* Create folder with the software name.
|
||||
|
||||
@ -53,30 +65,23 @@ Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Ma
|
||||
|
||||
* Make sure you follow our commenting style.
|
||||
|
||||
* Add the software in the `Readme`.
|
||||
* Add the software in the `Documentation`.
|
||||
|
||||
## Edit existing Software
|
||||
## Edit existing Software (Edit a Container)
|
||||
|
||||
* Open the software (container) folder.
|
||||
|
||||
* Edit the files you want to update.
|
||||
|
||||
* **Note:** If you want to edit the base image of the `Workspace` or the `php-fpm` Containers,
|
||||
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the LaraDock repository.
|
||||
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the Laradock repository.
|
||||
|
||||
* Make sure to update the `Readme` in case you made any changes.
|
||||
|
||||
## Issue/PR Submission Guidelines
|
||||
|
||||
## Submitting an Issue
|
||||
Before you submit your issue search the archive, maybe your question was already answered.
|
||||
|
||||
If your issue appears to be a bug, and hasn't been reported, open a new issue.
|
||||
Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.
|
||||
* Make sure to update the `Documentation` in case you made any changes.
|
||||
|
||||
|
||||
## Before Submitting a Pull Request (PR)
|
||||
## Pull Request
|
||||
|
||||
### 1. Before Submitting a Pull Request (PR)
|
||||
|
||||
Always Test everything and make sure its working:
|
||||
|
||||
@ -86,13 +91,13 @@ Always Test everything and make sure its working:
|
||||
- Test running the container with some other containers in real app and see of everything is working fine.
|
||||
- Now edit the container (edit section by section and test rebuilding the container after every edited section)
|
||||
- Testing building the container (docker-compose build container-name) with no errors.
|
||||
- Test it in real App.
|
||||
- Test it in a real App if possible.
|
||||
|
||||
|
||||
## Submitting a PR
|
||||
### 2. Submitting a PR
|
||||
Consider the following guidelines:
|
||||
|
||||
* Search [GitHub](https://github.com/laradock/laradock/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
|
||||
* Search [GitHub](https://github.com/laradock/laradock/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate efforts.
|
||||
|
||||
* Make your changes in a new git branch:
|
||||
|
||||
@ -123,14 +128,9 @@ git push origin my-fix-branch -f
|
||||
*WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.*
|
||||
|
||||
|
||||
### 3. After your PR is merged
|
||||
|
||||
|
||||
|
||||
|
||||
## After your PR is merged
|
||||
|
||||
After your pull request is merged, you can safely delete your branch and pull the changes
|
||||
from the main (upstream) repository:
|
||||
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
|
||||
|
||||
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
|
||||
|
||||
@ -161,4 +161,4 @@ from the main (upstream) repository:
|
||||
|
||||
|
||||
<br>
|
||||
## Happy Coding :)
|
||||
#### Happy Coding :)
|
@ -176,6 +176,11 @@ However to view the logs of all the other containers (MySQL, PHP-FPM,...) you ca
|
||||
docker logs {container-name}
|
||||
```
|
||||
|
||||
More [options](https://docs.docker.com/compose/reference/logs/)
|
||||
|
||||
```bash
|
||||
docker logs -f {container-name}
|
||||
```
|
||||
|
||||
|
||||
|
||||
@ -329,7 +334,7 @@ For information on how to configure xDebug with your IDE and work it out, check
|
||||
|
||||
By installing xDebug, you are enabling it to run on startup by default.
|
||||
|
||||
To control the behavior of xDebug (in the `php-fpm` Container), you can run the following commands from the LaraDock root folder, (at the same prompt where you run docker-compose):
|
||||
To control the behavior of xDebug (in the `php-fpm` Container), you can run the following commands from the Laradock root folder, (at the same prompt where you run docker-compose):
|
||||
|
||||
- Stop xDebug from running by default: `./xdebugPhpFpm stop`.
|
||||
- Start xDebug by default: `./xdebugPhpFpm start`.
|
||||
@ -381,10 +386,10 @@ It should be like this:
|
||||
|
||||
|
||||
<br>
|
||||
<a name="LaraDock-for-Production"></a>
|
||||
## Prepare LaraDock for Production
|
||||
<a name="Laradock-for-Production"></a>
|
||||
## Prepare Laradock for Production
|
||||
|
||||
It's recommended for production to create a custom `docker-compose.yml` file. For that reason, LaraDock is shipped with `production-docker-compose.yml` which should contain only the containers you are planning to run on production (usage example: `docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...`).
|
||||
It's recommended for production to create a custom `docker-compose.yml` file. For that reason, Laradock is shipped with `production-docker-compose.yml` which should contain only the containers you are planning to run on production (usage example: `docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...`).
|
||||
|
||||
Note: The Database (MySQL/MariaDB/...) ports should not be forwarded on production, because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. So make sure to remove these lines:
|
||||
|
||||
@ -439,7 +444,7 @@ For more about the Laravel installation click [here](https://laravel.com/docs/ma
|
||||
|
||||
3 - Edit `docker-compose.yml` to Map the new application path:
|
||||
|
||||
By default, LaraDock assumes the Laravel application is living in the parent directory of the laradock folder.
|
||||
By default, Laradock assumes the Laravel application is living in the parent directory of the laradock folder.
|
||||
|
||||
Since the new Laravel application is in the `my-cool-app` folder, we need to replace `../:/var/www` with `../my-cool-app/:/var/www`, as follow:
|
||||
|
||||
@ -456,7 +461,7 @@ Since the new Laravel application is in the `my-cool-app` folder, we need to rep
|
||||
cd my-cool-app
|
||||
```
|
||||
|
||||
5 - Go back to the LaraDock installation steps to see how to edit the `.env` file.
|
||||
5 - Go back to the Laradock installation steps to see how to edit the `.env` file.
|
||||
|
||||
|
||||
|
||||
@ -581,7 +586,7 @@ composer require predis/predis:^1.0
|
||||
5 - You can manually test it from Laravel with this code:
|
||||
|
||||
```php
|
||||
\Cache::store('redis')->put('LaraDock', 'Awesome', 10);
|
||||
\Cache::store('redis')->put('Laradock', 'Awesome', 10);
|
||||
```
|
||||
|
||||
|
||||
@ -701,6 +706,23 @@ docker-compose up -d mariadb phpmyadmin
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-Adminer"></a>
|
||||
## Use Adminer
|
||||
|
||||
1 - Run the Adminer Container (`adminer`) with the `docker-compose up` command. Example:
|
||||
|
||||
```bash
|
||||
docker-compose up -d adminer
|
||||
```
|
||||
|
||||
2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-pgAdmin"></a>
|
||||
## Use PgAdmin
|
||||
@ -893,7 +915,7 @@ docker-compose up -d minio
|
||||
<a name="Install-CodeIgniter"></a>
|
||||
## Install CodeIgniter
|
||||
|
||||
To install CodeIgniter 3 on LaraDock all you have to do is the following simple steps:
|
||||
To install CodeIgniter 3 on Laradock all you have to do is the following simple steps:
|
||||
|
||||
1 - Open the `docker-compose.yml` file.
|
||||
|
||||
@ -1198,7 +1220,7 @@ It should be like this:
|
||||
<a name="Common-Aliases"></a>
|
||||
<br>
|
||||
## Common Terminal Aliases
|
||||
When you start your docker container, LaraDock will copy the `aliases.sh` file located in the `laradock/workspace` directory and add sourcing to the container `~/.bashrc` file.
|
||||
When you start your docker container, Laradock will copy the `aliases.sh` file located in the `laradock/workspace` directory and add sourcing to the container `~/.bashrc` file.
|
||||
|
||||
You are free to modify the `aliases.sh` as you see fit, adding your own aliases (or function macros) to suit your requirements.
|
||||
|
||||
@ -1292,10 +1314,10 @@ Remote debug Laravel web and phpunit tests.
|
||||
|
||||
|
||||
<br>
|
||||
<a name="keep-tracking-LaraDock"></a>
|
||||
## Keep track of your LaraDock changes
|
||||
<a name="keep-tracking-Laradock"></a>
|
||||
## Keep track of your Laradock changes
|
||||
|
||||
1. Fork the LaraDock repository.
|
||||
1. Fork the Laradock repository.
|
||||
2. Use that fork as a submodule.
|
||||
3. Commit all your changes to your fork.
|
||||
4. Pull new stuff from the main repository from time to time.
|
||||
@ -1308,14 +1330,14 @@ Remote debug Laravel web and phpunit tests.
|
||||
|
||||
<br>
|
||||
<a name="upgrading-laradock"></a>
|
||||
## Upgrading LaraDock
|
||||
## Upgrading Laradock
|
||||
|
||||
Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading LaraDock from v3.* to v4.*:
|
||||
Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading Laradock from v3.* to v4.*:
|
||||
|
||||
1. Stop the docker VM `docker-machine stop {default}`
|
||||
2. Install Docker for [Mac](https://docs.docker.com/docker-for-mac/) or [Windows](https://docs.docker.com/docker-for-windows/).
|
||||
3. Upgrade LaraDock to `v4.*.*` (`git pull origin master`)
|
||||
4. Use LaraDock as you used to do: `docker-compose up -d nginx mysql`.
|
||||
3. Upgrade Laradock to `v4.*.*` (`git pull origin master`)
|
||||
4. Use Laradock as you used to do: `docker-compose up -d nginx mysql`.
|
||||
|
||||
**Note:** If you face any problem with the last step above: rebuild all your containers
|
||||
`docker-compose build --no-cache`
|
||||
@ -1327,15 +1349,36 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Speed-MacOS"></a>
|
||||
## Improve speed on MacOS
|
||||
|
||||
Sharing code into Docker containers with osxfs have very poor performance compared to Linux. You can get around this issue by using NFS to share your files betwen your host and your container.
|
||||
Sharing code into Docker containers with osxfs have very poor performance compared to Linux. Likely there are some workarounds:
|
||||
|
||||
> How to share files using NFS (d4m-nfs)
|
||||
### Workaround A: using dinghy
|
||||
|
||||
[d4m-nfs](https://github.com/IFSight/d4m-nfs) automatically mount NFS volume instead of osxfs one.
|
||||
[Dinghy](https://github.com/codekitchen/dinghy) creates its own VM using docker-machine, it will not modify your existing docker-machine VMs.
|
||||
|
||||
Quick Setup giude, (we recommend you check their docs)
|
||||
|
||||
1) `brew tap codekitchen/dinghy`
|
||||
|
||||
2) `brew install dinghy`
|
||||
|
||||
3) `dinghy create --provider virtualbox` (must have virtualbox installed, but they support other providers if you prefer)
|
||||
|
||||
4) after the above command is done it will display some env variables, copy them to the bash profile or zsh or.. (this will instruct docker to use the server running inside the VM)
|
||||
|
||||
5) `docker-compose up ...`
|
||||
|
||||
|
||||
|
||||
|
||||
### Workaround B: using d4m-nfs
|
||||
|
||||
[D4m-nfs](https://github.com/IFSight/d4m-nfs) automatically mount NFS volume instead of osxfs one.
|
||||
|
||||
1) Update the Docker [File Sharing] preferences:
|
||||
|
||||
@ -1353,14 +1396,12 @@ git clone https://github.com/IFSight/d4m-nfs ~/d4m-nfs
|
||||
|
||||
```txt
|
||||
/Users:/Users
|
||||
/Volumes:/Volumes
|
||||
/private:/private
|
||||
```
|
||||
|
||||
5) Create (or edit) the file `/etc/exports`, make sure it exists and is empty. (There may be collisions if you come from Vagrant or if you already executed the `d4m-nfs.sh` script before).
|
||||
|
||||
|
||||
6) Run the `d4m-nfs.sh` script:
|
||||
6) Run the `d4m-nfs.sh` script (might need Sudo):
|
||||
|
||||
```bash
|
||||
~/d4m-nfs/d4m-nfs.sh
|
||||
@ -1369,10 +1410,26 @@ git clone https://github.com/IFSight/d4m-nfs ~/d4m-nfs
|
||||
That's it! Run your containers.. Example:
|
||||
|
||||
```bash
|
||||
docker-compose up -d nginx mysql
|
||||
docker-compose up ...
|
||||
```
|
||||
|
||||
**Note:** If you faced any errors, try restarting Docker, and make sure you have no spaces in the `d4m-nfs-mounts.txt` file, and your `/etc/exports` file is clear.
|
||||
*Note: If you faced any errors, try restarting Docker, and make sure you have no spaces in the `d4m-nfs-mounts.txt` file, and your `/etc/exports` file is clear.*
|
||||
|
||||
|
||||
|
||||
### Other good workarounds:
|
||||
|
||||
- [docker-sync](https://github.com/EugenMayer/docker-sync)
|
||||
- Add more here..
|
||||
|
||||
|
||||
|
||||
|
||||
More details about this issue [here](https://github.com/docker/for-mac/issues/77).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1454,4 +1511,4 @@ This error sometimes happens because your Laravel application isn't running on t
|
||||
1. Check your running Laravel application IP by dumping `Request::ip()` variable using `dd(Request::ip())` anywhere on your application. The result is the IP of your Laravel container.
|
||||
2. Change the `DB_HOST` variable on env with the IP that you received from previous step.
|
||||
* Option B
|
||||
1. Change the `DB_HOST` value to the same name as the MySQL docker container. The LaraDock docker-compose file currently has this as `mysql`
|
||||
1. Change the `DB_HOST` value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as `mysql`
|
211
DOCUMENTATION/_settings/content/getting-started/index.md
Normal file
@ -0,0 +1,211 @@
|
||||
---
|
||||
title: Getting Started
|
||||
type: index
|
||||
weight: 2
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
- [Docker](https://www.docker.com/products/docker/) `>= 1.12`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Choose the setup the best suits your needs.
|
||||
|
||||
- [A) Setup for Single Project](#A)
|
||||
- [A.1) Already have a PHP project](#A1)
|
||||
- [A.2) Don't have a PHP project yet](#A2)
|
||||
- [B) Setup for Multiple Projects](#B)
|
||||
|
||||
|
||||
<a name="A"></a>
|
||||
### A) Setup for Single Project
|
||||
> (Follow these steps if you want a separate Docker environment for each project)
|
||||
|
||||
|
||||
<a name="A1"></a>
|
||||
### A.1) Already have a PHP project:
|
||||
|
||||
1 - Clone laradock on your project root directory:
|
||||
|
||||
```bash
|
||||
git submodule add https://github.com/Laradock/laradock.git
|
||||
```
|
||||
|
||||
**Notes:**
|
||||
|
||||
- If you are not using Git yet for your project, you can use `git clone` instead of `git submodule `.
|
||||
|
||||
- Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. [Check this](/documentation/#keep-track-of-your-laradock-changes)
|
||||
|
||||
|
||||
Your folder structure should look like this:
|
||||
|
||||
```
|
||||
+ project-a
|
||||
+ laradock-a
|
||||
+ project-b
|
||||
+ laradock-b
|
||||
```
|
||||
|
||||
(It's important to rename the folders differently in each project.)
|
||||
|
||||
> **Now jump to the [Usage](#Usage) section.**
|
||||
|
||||
<a name="A2"></a>
|
||||
### A.2) Don't have a PHP project yet:
|
||||
|
||||
1 - Clone this repository anywhere on your machine:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/laradock/laradock.git
|
||||
```
|
||||
|
||||
Your folder structure should look like this:
|
||||
|
||||
```
|
||||
+ laradock
|
||||
+ project-z
|
||||
```
|
||||
|
||||
2 - Edit your web server sites configuration.
|
||||
|
||||
**In case of NGINX:** open `nginx/sites/default.conf` and change the `root` from `/var/www/public` to `/var/www/{my-project-folder-name}/public`.
|
||||
|
||||
*Or you can keep `default.conf` as it is, and create a separate config `my-site.conf` file for it.*
|
||||
|
||||
**In case of Apache:** :P
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
> **Now jump to the [Usage](#Usage) section.**
|
||||
|
||||
|
||||
<a name="B"></a>
|
||||
### B) Setup for Multiple Projects:
|
||||
> (Follow these steps if you want a single Docker environment for all your project)
|
||||
|
||||
1 - Clone this repository anywhere on your machine (similar to [Steps A.2. from above](#A2)):
|
||||
|
||||
```bash
|
||||
git clone https://github.com/laradock/laradock.git
|
||||
```
|
||||
|
||||
Your folder structure should look like this:
|
||||
|
||||
```
|
||||
+ laradock
|
||||
+ project-1
|
||||
+ project-2
|
||||
```
|
||||
|
||||
2 - Go to `nginx/sites` and create config files to point to different project directory when visiting different domains.
|
||||
|
||||
Laradock by default includes `project-1.conf` and `project-2.conf` as working samples.
|
||||
|
||||
3 - change the default names `project-n`:
|
||||
|
||||
You can rename the config files, project folders and domains as you like, just make sure the `root` in the config files, is pointing to the correct project folder name.
|
||||
|
||||
4 - Add the domains to the **hosts** files.
|
||||
|
||||
```
|
||||
127.0.0.1 project-1.dev
|
||||
127.0.0.1 project-2.dev
|
||||
```
|
||||
|
||||
> **Now jump to the [Usage](#Usage) section.**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="Usage"></a>
|
||||
## Usage
|
||||
|
||||
**Read Before starting:**
|
||||
|
||||
If you are using **Docker Toolbox** (VM), do one of the following:
|
||||
|
||||
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
|
||||
- Use Laradock v3.\*. Visit the [LaraDock-ToolBox](https://github.com/laradock/laradock/tree/LaraDock-ToolBox) branch. *(outdated)*
|
||||
|
||||
<br>
|
||||
|
||||
>**Warning:** If you used an older version of Laradock it's highly recommended to rebuild the containers you need to use [see how you rebuild a container](#Build-Re-build-Containers) in order to prevent as much errors as possible.
|
||||
|
||||
<br>
|
||||
|
||||
1 - Enter the laradock folder and rename `env-example` to `.env`
|
||||
|
||||
```shell
|
||||
cp env-example .env
|
||||
```
|
||||
|
||||
You can edit the `.env` file to chose which software's you want to be installed in your environment. You can always refer to the `docker-compose.yml` file to see how those variables are been used.
|
||||
|
||||
|
||||
2 - Build the enviroment and run it using `docker-compose`
|
||||
|
||||
In this example we'll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:
|
||||
|
||||
```bash
|
||||
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`.
|
||||
|
||||
|
||||
You can select your own combination of containers form the list below:
|
||||
|
||||
> `nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `beanstalkd-console`, `workspace`, `phpmyadmin`, `adminer`, `aerospike`, `pgadmin`, `elasticsearch`, `rethinkdb`, `postgres-postgis`, `certbot`, `mailhog`, `minio` and more...!
|
||||
|
||||
*(Please note that sometimes we forget to update the docs, so check the `docker-compose.yml` file to see an updated list of all available containers).*
|
||||
|
||||
|
||||
<br>
|
||||
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...)
|
||||
|
||||
```bash
|
||||
docker-compose exec workspace bash
|
||||
```
|
||||
|
||||
*Alternatively, for Windows PowerShell users: execute the following command to enter any running container:*
|
||||
|
||||
```bash
|
||||
docker exec -it {workspace-container-id} bash
|
||||
```
|
||||
|
||||
**Note:** You can add `--user=laradock` to have files created as your host's user. Example:
|
||||
|
||||
```shell
|
||||
docker-compose exec --user=laradock workspace bash
|
||||
```
|
||||
|
||||
*You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
|
||||
|
||||
<br>
|
||||
4 - Update your project configurations to use the database host
|
||||
|
||||
Open your PHP project's `.env` file or whichever configuration file you are reading from, and set the database host `DB_HOST` to `mysql`:
|
||||
|
||||
```env
|
||||
DB_HOST=mysql
|
||||
```
|
||||
|
||||
*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
|
||||
|
||||
<br>
|
||||
5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.dev/` and `http://project-2.dev/`. But first don't
|
||||
|
||||
|
@ -4,6 +4,6 @@ type: index
|
||||
weight: 5
|
||||
---
|
||||
|
||||
Join the chat room on [Gitter](https://gitter.im/LaraDock/laradock) and get help and support from the community.
|
||||
Join the chat room on [Gitter](https://gitter.im/Laradock/laradock) and get help and support from the community.
|
||||
|
||||
You can as well can open an [issue](https://github.com/laradock/laradock/issues) on Github (will be labeled as Question) and discuss it with people on [Gitter](https://gitter.im/LaraDock/laradock).
|
||||
You can as well can open an [issue](https://github.com/laradock/laradock/issues) on Github (will be labeled as Question) and discuss it with people on [Gitter](https://gitter.im/Laradock/laradock).
|
@ -4,11 +4,11 @@ type: index
|
||||
weight: 1
|
||||
---
|
||||
|
||||
LaraDock strives to make the PHP development experience easier and faster.
|
||||
Laradock strives to make the PHP development experience easier and faster.
|
||||
|
||||
It contains pre-packaged Docker Images that provides you a wonderful *development* environment without requiring you to install PHP, NGINX, MySQL, Redis, and any other software on your machines.
|
||||
|
||||
LaraDock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal...).
|
||||
Laradock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal...).
|
||||
|
||||
|
||||
|
||||
@ -17,19 +17,25 @@ LaraDock is configured to run Laravel Apps by default, and it can be modified to
|
||||
|
||||
Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL`, `Redis` and `beanstalkd`:
|
||||
|
||||
1 - Clone LaraDock inside your PHP project:
|
||||
1 - Clone Laradock inside your PHP project:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/Laradock/laradock.git
|
||||
```
|
||||
|
||||
2 - Enter the laradock folder and run this command:
|
||||
2 - Enter the laradock folder and rename `env-example` to `.env`.
|
||||
|
||||
```shell
|
||||
cp env-example .env
|
||||
```
|
||||
|
||||
3 - Run your containers:
|
||||
|
||||
```shell
|
||||
docker-compose up -d nginx mysql redis beanstalkd
|
||||
```
|
||||
|
||||
3 - Open your `.env` file and set the following:
|
||||
3 - Open your project's `.env` file and set the following:
|
||||
|
||||
```shell
|
||||
DB_HOST=mysql
|
||||
@ -76,17 +82,17 @@ Most importantly Docker can run on Development and on Production (same environme
|
||||
|
||||
|
||||
<a name="laradock-vs-homestead"></a>
|
||||
## LaraDock VS Homestead (For Laravel Developers)
|
||||
## Laradock VS Homestead (For Laravel Developers)
|
||||
|
||||
> LaraDock It's like Laravel Homestead but for Docker instead of Vagrant.
|
||||
> Laradock It's like Laravel Homestead but for Docker instead of Vagrant.
|
||||
|
||||
LaraDock and [Homestead](https://laravel.com/docs/master/homestead) both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).
|
||||
Laradock and [Homestead](https://laravel.com/docs/master/homestead) both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).
|
||||
|
||||
- Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine.
|
||||
|
||||
- LaraDock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers.
|
||||
- Laradock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers.
|
||||
|
||||
Running a virtual container is much faster than running a full virtual Machine. Thus **LaraDock is much faster than Homestead**.
|
||||
Running a virtual container is much faster than running a full virtual Machine. Thus **Laradock is much faster than Homestead**.
|
||||
|
||||
|
||||
|
||||
@ -100,10 +106,10 @@ Running a virtual container is much faster than running a full virtual Machine.
|
||||
|
||||
What's better than a **Demo Video**:
|
||||
|
||||
- LaraDock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
|
||||
- LaraDock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
|
||||
- LaraDock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
|
||||
- LaraDock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)
|
||||
- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
|
||||
- Laradock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
|
||||
- Laradock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
|
||||
- Laradock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)
|
||||
|
||||
|
||||
|
||||
@ -139,11 +145,12 @@ What's better than a **Demo Video**:
|
||||
|
||||
- **Database Engines:**
|
||||
- MySQL
|
||||
- PostgreSQL
|
||||
- MariaDB
|
||||
- MongoDB
|
||||
- Neo4j
|
||||
- RethinkDB
|
||||
- PostgreSQL
|
||||
- Postgres Postgis
|
||||
- **Cache Engines:**
|
||||
- Redis
|
||||
- Memcached
|
||||
@ -162,9 +169,12 @@ What's better than a **Demo Video**:
|
||||
- RabbitMQ Console
|
||||
- **Tools:**
|
||||
- PhpMyAdmin
|
||||
- Adminer
|
||||
- PgAdmin
|
||||
- ElasticSearch
|
||||
- Selenium
|
||||
- Certbot
|
||||
- Mailhog
|
||||
- Minio
|
||||
- Workspace
|
||||
- PHP7-CLI
|
||||
@ -194,4 +204,4 @@ What's better than a **Demo Video**:
|
||||
|
||||
You are welcome to join our chat room on Gitter.
|
||||
|
||||
[](https://gitter.im/LaraDock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[](https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
@ -4,10 +4,10 @@ type: index
|
||||
weight: 4
|
||||
---
|
||||
|
||||
LaraDock related projects:
|
||||
Laradock related projects:
|
||||
|
||||
* [LaraDock CLI](https://github.com/lorinlee/laradock-cli) by [LorinLee](https://github.com/lorinlee)
|
||||
* [LaraDock Env](https://github.com/bagart/laradock_env) by [BAGArt](https://github.com/bagart)
|
||||
* [Laradock CLI](https://github.com/lorinlee/laradock-cli) by [LorinLee](https://github.com/lorinlee)
|
||||
* [Laradock Env](https://github.com/bagart/laradock_env) by [BAGArt](https://github.com/bagart)
|
||||
* [Klaradock](https://github.com/poyhsiao/Klaradock) by [Kim Hsiao](https://github.com/poyhsiao)
|
||||
* [Ansible Laradock Kubernetes](https://github.com/sifat-rahim/ansible-laradock-kubernetes) by [Sifat Rahim](https://github.com/sifat-rahim)
|
||||
These Docker Compose projects have piqued our interest:
|
1
DOCUMENTATION/_settings/static/CNAME
Normal file
@ -0,0 +1 @@
|
||||
laradock.io
|
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 246 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
@ -37,7 +37,9 @@
|
||||
Documentation built with
|
||||
<a href="https://www.gohugo.io" target="_blank">Hugo</a>
|
||||
using the
|
||||
<a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme.
|
||||
<a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme,
|
||||
by
|
||||
<a href="https://zalt.me">Mahmoud Zalt</a>.
|
||||
</aside>
|
||||
|
||||
<footer class="footer">
|
@ -1,20 +1,20 @@
|
||||
<nav aria-label="Navigation">
|
||||
<a href="{{ with .Site.Params.repo_url }}{{ . }}{{ else }}{{ .Site.BaseURL }}{{ end }}" class="project">
|
||||
<div class="banner">
|
||||
{{ with .Site.Params.logo }}
|
||||
<div class="logo">
|
||||
<img src="{{ $.Site.BaseURL }}{{ . }}">
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="name">
|
||||
<strong>{{ .Site.Title }} {{ with .Site.Params.version }}<span class="version">{{ . }}</span>{{ end }}</strong>
|
||||
{{ with .Scratch.Get "repo_id" }}
|
||||
<br>
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<!--<a href="{{ with .Site.Params.repo_url }}{{ . }}{{ else }}{{ .Site.BaseURL }}{{ end }}" class="project">-->
|
||||
<!--<div class="banner">-->
|
||||
<!--{{ with .Site.Params.logo }}-->
|
||||
<!--<div class="logo">-->
|
||||
<!--<img src="{{ $.Site.BaseURL }}{{ . }}">-->
|
||||
<!--</div>-->
|
||||
<!--{{ end }}-->
|
||||
<!--<div class="name">-->
|
||||
<!--<strong>{{ .Site.Title }} {{ with .Site.Params.version }}<span class="version">{{ . }}</span>{{ end }}</strong>-->
|
||||
<!--{{ with .Scratch.Get "repo_id" }}-->
|
||||
<!--<br>-->
|
||||
<!--{{ . }}-->
|
||||
<!--{{ end }}-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</a>-->
|
||||
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
@ -43,8 +43,8 @@
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Site.Params "author" }}
|
||||
<hr>
|
||||
<span class="section">The author</span>
|
||||
<!--<hr>-->
|
||||
<!--<span class="section">The author</span>-->
|
||||
|
||||
<ul>
|
||||
{{ with .Site.Social.twitter }}
|
||||
@ -55,13 +55,13 @@
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Social.github }}
|
||||
<li>
|
||||
<a href="https://github.com/{{ . }}" target="_blank" title="@{{ . }} on GitHub">
|
||||
@{{ . }} on GitHub
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<!--{{ with .Site.Social.github }}-->
|
||||
<!--<li>-->
|
||||
<!--<a href="https://github.com/{{ . }}" target="_blank" title="@{{ . }} on GitHub">-->
|
||||
<!--@{{ . }} on GitHub-->
|
||||
<!--</a>-->
|
||||
<!--</li>-->
|
||||
<!--{{ end }}-->
|
||||
|
||||
{{ with .Site.Social.email }}
|
||||
<li>
|
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="title">
|
||||
{{ .Title }}
|
||||
<b>{{ .Site.Title }}</b> <span style="color: rgba(249, 245, 255, 0.63);"> / {{ .Title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -19,8 +19,9 @@
|
||||
|
||||
{{ with .Site.Social.github }}
|
||||
<div class="button button-github" role="button" aria-label="GitHub">
|
||||
<a href="https://github.com/{{ . }}" title="@{{ . }} on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
<a style="padding: 0px; font-size:40px" href="https://github.com/{{ . }}" title="@{{ . }} on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
</div>
|
||||
<p style="font-size: 18px; padding: 8px">Github</p>
|
||||
{{ end }}
|
||||
|
||||
<!-- TODO: disabled until Hugo supports the generation of a content index natively
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 145 KiB |
11
README.md
@ -4,7 +4,7 @@
|
||||
|
||||
[](http://zalt.me)
|
||||
|
||||
Laradock is a Docker PHP development environment that facilitate running **PHP** Apps on **Docker**.
|
||||
Laradock is a Docker PHP development environment that facilitates running **PHP** Apps on **Docker**.
|
||||
|
||||
## Documentation
|
||||
|
||||
@ -12,15 +12,18 @@ Laradock is a Docker PHP development environment that facilitate running **PHP**
|
||||
|
||||
## Credits
|
||||
|
||||
**Super Admins:**
|
||||
**Admins / Maintainers:**
|
||||
|
||||
- [Mahmoud Zalt](https://github.com/Mahmoudz) (mahmoudz) [ [Twitter](https://twitter.com/Mahmoud_Zalt) | [Personal Site](http://zalt.me) | [LinkedIn](https://www.linkedin.com/in/mahmoudzalt) ]
|
||||
- [Bo-Yi Wu](https://github.com/appleboy) (appleboy) [ [Twitter](https://twitter.com/appleboy) ]
|
||||
- [Philippe Trépanier](https://github.com/philtrep) (philtrep)
|
||||
- [Mike Erickson](https://github.com/mikeerickson) (mikeerickson)
|
||||
- Join Us!
|
||||
- [Dwi Fahni Denni](https://github.com/zeroc0d3) (zeroc0d3)
|
||||
- [Thor Erik](https://github.com/thorerik) (thorerik)
|
||||
- [Winfried van Loon](https://github.com/winfried-van-loon) (winfried-van-loon)
|
||||
- Contribute and join us!
|
||||
|
||||
**Amazing Contributors:**
|
||||
**Contributors:**
|
||||
|
||||
- [Contributors](https://github.com/laradock/laradock/graphs/contributors)
|
||||
|
||||
|
@ -1,112 +1,118 @@
|
||||
#### Install Docker
|
||||
```
|
||||
Login Digital Ocean
|
||||
Add Droplet
|
||||
1 Click Install docker
|
||||
Choose Droplet
|
||||
reset ROOT password
|
||||
check email
|
||||
```
|
||||
|
||||
- Visit [DigitalOcean](https://cloud.digitalocean.com/login) and login.
|
||||
- Click the `Create Droplet` button.
|
||||
- Open the `One-click apps` tab.
|
||||
- Select Docker with your preferred version.
|
||||
- Continue creating the droplet as you normally would.
|
||||
- If needed, check your e-mail for the droplet root password.
|
||||
|
||||
#### SSH to your Server
|
||||
|
||||
Find the IP address of the droplet in the DigitalOcean interface. Use it to connect to the server.
|
||||
|
||||
```
|
||||
ssh root@ipaddress
|
||||
```
|
||||
you will be prompt of that password.
|
||||
type the password you receive in your email
|
||||
|
||||
then it will ask to you to change a new password
|
||||
just change it to the custom root password you want
|
||||
You may be prompted for a password. Type the one you found within your e-mailbox. It'll then ask you to change the password.
|
||||
|
||||
After SSH
|
||||
you can check that docker command is working by typing
|
||||
You can now check if Docker is available:
|
||||
|
||||
```
|
||||
$root@midascode:~# docker
|
||||
$root@server:~# docker
|
||||
```
|
||||
|
||||
#### Set Up Your Laravel Project
|
||||
|
||||
```
|
||||
$root@midascode:~# apt-get install git
|
||||
$root@midascode:~# git clone https://github.com/laravel/laravel
|
||||
$root@midascode:~# cd laravel
|
||||
$root@midascode:~/laravel/ git submodule add https://github.com/LaraDock/laradock.git
|
||||
$root@midascode:~/laravel/ cd laradock
|
||||
$root@server:~# apt-get install git
|
||||
$root@server:~# git clone https://github.com/laravel/laravel
|
||||
$root@server:~# cd laravel
|
||||
$root@server:~/laravel/ git submodule add https://github.com/LaraDock/laradock.git
|
||||
$root@server:~/laravel/ cd laradock
|
||||
```
|
||||
|
||||
#### Install docker-compose command
|
||||
|
||||
```
|
||||
$root@midascode:~/laravel/laradock# curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose
|
||||
$root@midascode:~/chmod +x /usr/local/bin/docker-compose
|
||||
$root@server:~/laravel/laradock# curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose
|
||||
$root@server:~/chmod +x /usr/local/bin/docker-compose
|
||||
```
|
||||
|
||||
#### Create Your LaraDock Containers
|
||||
|
||||
```
|
||||
$root@midascode:~/laravel/laradock# docker-compose up -d nginx mysql
|
||||
$root@server:~/laravel/laradock# docker-compose up -d nginx mysql
|
||||
```
|
||||
|
||||
Note that more containers are available, find them in the [docs](http://laradock.io/introduction/#supported-software-containers) or the `docker-compose.yml` file.
|
||||
|
||||
#### Go to Your Workspace
|
||||
|
||||
```
|
||||
docker-compose exec workspace bash
|
||||
```
|
||||
|
||||
#### Install laravel Dependencies, Add .env , generate Key and give proper permission certain folder
|
||||
#### Install and configure Laravel
|
||||
|
||||
Let's install Laravel's dependencies, add the `.env` file, generate the key and give proper permissions to the cache folder.
|
||||
|
||||
```
|
||||
$ root@0e77851d27d3:/var/www# composer install
|
||||
$ root@0e77851d27d3:/var/www# cp .env.example .env
|
||||
$ root@0e77851d27d3:/var/www# php artisan key:generate
|
||||
$ root@0e77851d27d3:/var/www# exit
|
||||
$root@midascode:~/laravel/laradock# cd ..
|
||||
$root@midascode:~/laravel# sudo chmod -R 777 storage bootstrap/cache
|
||||
$ root@workspace:/var/www# composer install
|
||||
$ root@workspace:/var/www# cp .env.example .env
|
||||
$ root@workspace:/var/www# php artisan key:generate
|
||||
$ root@workspace:/var/www# exit
|
||||
$root@server:~/laravel/laradock# cd ..
|
||||
$root@server:~/laravel# sudo chmod -R 777 storage bootstrap/cache
|
||||
```
|
||||
|
||||
you can then view your laravel site at your ipaddress
|
||||
for example
|
||||
You can then view your Laravel site by visiting the IP address of your server in your browser. For example:
|
||||
|
||||
```
|
||||
192.168.1.1
|
||||
http://192.168.1.1
|
||||
```
|
||||
|
||||
You will see there Laravel Default Welcome Page
|
||||
It should show you the Laravel default welcome page.
|
||||
|
||||
but if you need to view on your custom domain name
|
||||
which you would.
|
||||
However, we want it to show up using your custom domain name, as well.
|
||||
|
||||
#### Using Your Own Domain Name
|
||||
login to your DNS provider
|
||||
Godaddy, Namecheap what ever...
|
||||
And Point the Custom Domain Name Server to
|
||||
|
||||
Login to your DNS provider, such as Godaddy, Namecheap.
|
||||
|
||||
Point the Custom Domain Name Server to:
|
||||
|
||||
```
|
||||
ns1.digitalocean.com
|
||||
ns2.digitalocean.com
|
||||
ns3.digitalocean.com
|
||||
```
|
||||
In Your Digital Ocean Account go to
|
||||
```
|
||||
https://cloud.digitalocean.com/networking/domains
|
||||
```
|
||||
add your domain name and choose the server ip you provision earlier
|
||||
|
||||
#### Serve Site With NGINX (HTTP ONLY)
|
||||
Go back to command line
|
||||
Within DigitalOcean, you'll need to change some settings, too.
|
||||
|
||||
Visit: https://cloud.digitalocean.com/networking/domains
|
||||
|
||||
Add your domain name and choose the server IP you'd provision earlier.
|
||||
|
||||
#### Serving Site With NGINX (HTTP ONLY)
|
||||
|
||||
Go back to command line.
|
||||
|
||||
```
|
||||
$root@midascode:~/laravel/laradock# cd nginx
|
||||
$root@midascode:~/laravel/laradock/nginx# vim laravel.conf
|
||||
```
|
||||
remove default_server
|
||||
$root@server:~/laravel/laradock# cd nginx
|
||||
$root@server:~/laravel/laradock/nginx# vim laravel.conf
|
||||
```
|
||||
|
||||
Remove `default_server`
|
||||
|
||||
```
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
|
||||
```
|
||||
and add server_name (your custom domain)
|
||||
|
||||
And add `server_name` (your custom domain)
|
||||
|
||||
```
|
||||
listen 80;
|
||||
listen [::]:80 ipv6only=on;
|
||||
@ -114,27 +120,29 @@ remove default_server
|
||||
```
|
||||
|
||||
#### Rebuild Your Nginx
|
||||
|
||||
```
|
||||
$root@midascode:~/laravel/laradock/nginx# docker-compose down
|
||||
$root@midascode:~/laravel/laradock/nginx# docker-compose build nginx
|
||||
$root@server:~/laravel/laradock/nginx# docker-compose down
|
||||
$root@server:~/laravel/laradock/nginx# docker-compose build nginx
|
||||
```
|
||||
|
||||
#### Re Run Your Containers MYSQL and NGINX
|
||||
|
||||
```
|
||||
$root@midascode:~/laravel/laradock/nginx# docker-compose up -d nginx mysql
|
||||
$root@server:~/laravel/laradock/nginx# docker-compose up -d nginx mysql
|
||||
```
|
||||
|
||||
###### View Your Site with HTTP ONLY (http://yourdomain.com)
|
||||
**View Your Site with HTTP ONLY (http://yourdomain.com)**
|
||||
|
||||
#### Run Site on SSL with Let's Encrypt Certificate
|
||||
|
||||
###### Note: You need to Use Caddy here Instead of Nginx
|
||||
**Note: You need to Use Caddy here Instead of Nginx**
|
||||
|
||||
###### To go Caddy Folders and Edit CaddyFile
|
||||
To go Caddy Folders and Edit CaddyFile
|
||||
|
||||
```
|
||||
$root@midascode:~/laravel/laradock# cd caddy
|
||||
$root@midascode:~/laravel/laradock/caddy# vim Caddyfile
|
||||
$root@server:~/laravel/laradock# cd caddy
|
||||
$root@server:~/laravel/laradock/caddy# vim Caddyfile
|
||||
```
|
||||
|
||||
Remove 0.0.0.0:80
|
||||
@ -143,31 +151,36 @@ Remove 0.0.0.0:80
|
||||
0.0.0.0:80
|
||||
root /var/www/public
|
||||
```
|
||||
|
||||
and replace with your https://yourdomain.com
|
||||
|
||||
```
|
||||
https://yourdomain.com
|
||||
root /var/www/public
|
||||
```
|
||||
|
||||
uncomment tls
|
||||
|
||||
```
|
||||
#tls self-signed
|
||||
```
|
||||
|
||||
and replace self-signed with your email address
|
||||
|
||||
```
|
||||
tls midascodebreaker@gmai.com
|
||||
tls serverbreaker@gmai.com
|
||||
```
|
||||
|
||||
This is needed Prior to Creating Let's Encypt
|
||||
|
||||
#### Run Your Caddy Container without the -d flag and Generate SSL with Let's Encrypt
|
||||
#### Run Your Caddy Container without the -d flag and Generate SSL with Let's Encrypt
|
||||
|
||||
```
|
||||
$root@midascode:~/laravel/laradock/caddy# docker-compose up caddy
|
||||
$root@server:~/laravel/laradock/caddy# docker-compose up caddy
|
||||
```
|
||||
|
||||
you will be prompt here to enter your email... you may enter it or not
|
||||
You'll be prompt here to enter your email... you may enter it or not
|
||||
|
||||
```
|
||||
Attaching to laradock_mysql_1, laradock_caddy_1
|
||||
caddy_1 | Activating privacy features...
|
||||
@ -179,17 +192,18 @@ caddy_1 | https://yourdomain.com
|
||||
caddy_1 | http://yourdomain.com
|
||||
```
|
||||
|
||||
After it finish Press Ctrl + C to exit ...
|
||||
After it finishes, press `Ctrl` + `C` to exit.
|
||||
|
||||
#### Stop All Containers and ReRun Caddy and Other Containers on Background
|
||||
|
||||
```
|
||||
$root@midascode:~/laravel/laradock/caddy# docker-compose down
|
||||
$root@midascode:~/laravel/laradock/caddy# docker-compose up -d mysql caddy
|
||||
$root@server:~/laravel/laradock/caddy# docker-compose down
|
||||
$root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy
|
||||
```
|
||||
|
||||
View your Site in the Browser Securely Using HTTPS (https://yourdomain.com)
|
||||
|
||||
##### Note that Certificate will be Automatically Renew By Caddy
|
||||
**Note that Certificate will be Automatically Renew By Caddy**
|
||||
|
||||
>References:
|
||||
>
|
||||
@ -200,14 +214,3 @@ View your Site in the Browser Securely Using HTTPS (https://yourdomain.com)
|
||||
- [https://caddyserver.com/docs/automatic-https](https://caddyserver.com/docs/automatic-https)
|
||||
- [https://caddyserver.com/docs/tls](https://caddyserver.com/docs/tls)
|
||||
- [https://caddyserver.com/docs/caddyfile](https://caddyserver.com/docs/caddyfile)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
9
adminer/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM adminer:latest
|
||||
|
||||
MAINTAINER Patrick Artounian <partounian@gmail.com>
|
||||
|
||||
# Add volume for sessions to allow session persistence
|
||||
VOLUME /sessions
|
||||
|
||||
# We expose Adminer on port 8080 (Adminer's default)
|
||||
EXPOSE 8080
|
@ -6,11 +6,13 @@ ARG PHP_SOCKET=php-fpm:9000
|
||||
|
||||
ENV WEB_PHP_SOCKET=$PHP_SOCKET
|
||||
|
||||
ENV WEB_DOCUMENT_ROOT=/var/www/public
|
||||
ENV WEB_DOCUMENT_ROOT=/var/www/
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
WORKDIR /var/www/public
|
||||
WORKDIR /var/www/
|
||||
|
||||
ADD vhost.conf /etc/apache2/sites-enabled/vhost.conf
|
||||
|
||||
ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"]
|
||||
|
||||
|
3
apache2/sites/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*.conf
|
||||
!default.conf
|
||||
!default.apache.conf
|
16
apache2/sites/default.apache.conf
Normal file
@ -0,0 +1,16 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName laradock.dev
|
||||
DocumentRoot /var/www/html/
|
||||
Options Indexes FollowSymLinks
|
||||
|
||||
<Directory "/var/www/html/">
|
||||
AllowOverride All
|
||||
<IfVersion < 2.4>
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
16
apache2/sites/sample.conf.example
Normal file
@ -0,0 +1,16 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName sample.dev
|
||||
DocumentRoot /var/www/sample/public/
|
||||
Options Indexes FollowSymLinks
|
||||
|
||||
<Directory "/var/www/sample/public/">
|
||||
AllowOverride All
|
||||
<IfVersion < 2.4>
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
1
apache2/vhost.conf
Normal file
@ -0,0 +1 @@
|
||||
Include /etc/apache2/sites-available/*.conf
|
10
certbot/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM phusion/baseimage:latest
|
||||
|
||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||
|
||||
COPY run-certbot.sh /root/certbot/run-certbot.sh
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y letsencrypt
|
||||
|
||||
ENTRYPOINT bash -c "bash /root/certbot/run-certbot.sh && sleep infinity"
|
0
certbot/letsencrypt/.well-known/.gitkeep
Normal file
6
certbot/run-certbot.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
letsencrypt certonly --webroot -w /var/www/letsencrypt -d "$CN" --agree-tos --email "$EMAIL" --non-interactive --text
|
||||
|
||||
cp /etc/letsencrypt/archive/"$CN"/cert1.pem /var/certs/cert1.pem
|
||||
cp /etc/letsencrypt/archive/"$CN"/privkey1.pem /var/certs/privkey1.pem
|
@ -5,384 +5,571 @@ services:
|
||||
### Applications Code Container #############################
|
||||
|
||||
applications:
|
||||
image: tianon/true
|
||||
volumes:
|
||||
- ../:/var/www
|
||||
# - ../sample/:/var/www/sample
|
||||
image: tianon/true
|
||||
volumes:
|
||||
- ${APPLICATION}:/var/www
|
||||
|
||||
### Workspace Utilities Container ###########################
|
||||
|
||||
workspace:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_XDEBUG=false
|
||||
- INSTALL_SOAP=false
|
||||
- INSTALL_MONGO=false
|
||||
- INSTALL_NODE=false
|
||||
- INSTALL_YARN=false
|
||||
- INSTALL_DRUSH=false
|
||||
- INSTALL_AEROSPIKE_EXTENSION=false
|
||||
- INSTALL_V8JS_EXTENSION=false
|
||||
- COMPOSER_GLOBAL_INSTALL=false
|
||||
- INSTALL_WORKSPACE_SSH=false
|
||||
- INSTALL_LARAVEL_ENVOY=false
|
||||
- INSTALL_DEPLOYER=false
|
||||
- INSTALL_LINUXBREW=false
|
||||
- INSTALL_MC=false
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- NODE_VERSION=stable
|
||||
- YARN_VERSION=latest
|
||||
- TZ=UTC
|
||||
volumes_from:
|
||||
- applications
|
||||
extra_hosts:
|
||||
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
|
||||
- "dockerhost:10.0.75.1"
|
||||
ports:
|
||||
- "2222:22"
|
||||
tty: true
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
|
||||
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
|
||||
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
|
||||
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
||||
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
|
||||
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
|
||||
- INSTALL_AEROSPIKE_EXTENSION=${WORKSPACE_INSTALL_AEROSPIKE_EXTENSION}
|
||||
- INSTALL_V8JS_EXTENSION=${WORKSPACE_INSTALL_INSTALL_V8JS_EXTENSION}
|
||||
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
|
||||
- INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
|
||||
- INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
|
||||
- INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
|
||||
- INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
|
||||
- INSTALL_MC=${WORKSPACE_INSTALL_MC}
|
||||
- INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY}
|
||||
- PUID=${WORKSPACE_PUID}
|
||||
- PGID=${WORKSPACE_PGID}
|
||||
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
|
||||
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
|
||||
- TZ=${WORKSPACE_TIMEZONE}
|
||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||
volumes_from:
|
||||
- applications
|
||||
extra_hosts:
|
||||
- "dockerhost:${DOCKER_HOST_IP}"
|
||||
ports:
|
||||
- "${WORKSPACE_SSH_PORT}:22"
|
||||
tty: true
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### PHP-FPM Container #######################################
|
||||
|
||||
php-fpm:
|
||||
build:
|
||||
context: ./php-fpm
|
||||
args:
|
||||
- INSTALL_XDEBUG=false
|
||||
- INSTALL_SOAP=false
|
||||
- INSTALL_MONGO=false
|
||||
- INSTALL_ZIP_ARCHIVE=false
|
||||
- INSTALL_BCMATH=false
|
||||
- INSTALL_PHPREDIS=false
|
||||
- INSTALL_MEMCACHED=false
|
||||
- INSTALL_OPCACHE=false
|
||||
- INSTALL_EXIF=false
|
||||
- INSTALL_AEROSPIKE_EXTENSION=false
|
||||
- CODEIGNITER=false
|
||||
dockerfile: Dockerfile-70
|
||||
volumes_from:
|
||||
- applications
|
||||
expose:
|
||||
- "9000"
|
||||
links:
|
||||
- workspace
|
||||
extra_hosts:
|
||||
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
|
||||
- "dockerhost:10.0.75.1"
|
||||
environment:
|
||||
# IMPORTANT: Set the Remote Interpreter entry matching name to `laravel`
|
||||
- PHP_IDE_CONFIG=serverName=laravel
|
||||
build:
|
||||
context: ./php-fpm
|
||||
args:
|
||||
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
|
||||
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
|
||||
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
|
||||
- INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
|
||||
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
||||
- INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS}
|
||||
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
|
||||
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
|
||||
- INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
|
||||
- INSTALL_AEROSPIKE_EXTENSION=${PHP_FPM_INSTALL_AEROSPIKE_EXTENSION}
|
||||
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
|
||||
- INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER}
|
||||
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
|
||||
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
|
||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||
volumes_from:
|
||||
- applications
|
||||
expose:
|
||||
- "9000"
|
||||
depends_on:
|
||||
- workspace
|
||||
extra_hosts:
|
||||
- "dockerhost:${DOCKER_HOST_IP}"
|
||||
environment:
|
||||
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### PHP Worker Container #####################################
|
||||
|
||||
php-worker:
|
||||
build:
|
||||
context: ./php-worker
|
||||
volumes_from:
|
||||
- applications
|
||||
depends_on:
|
||||
- workspace
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Nginx Server Container ##################################
|
||||
|
||||
nginx:
|
||||
build:
|
||||
context: ./nginx
|
||||
args:
|
||||
- PHP_UPSTREAM=php-fpm
|
||||
volumes_from:
|
||||
- applications
|
||||
volumes:
|
||||
- ./logs/nginx/:/var/log/nginx
|
||||
- ./nginx/sites/:/etc/nginx/sites-available
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
links:
|
||||
- php-fpm
|
||||
build:
|
||||
context: ./nginx
|
||||
args:
|
||||
- PHP_UPSTREAM=php-fpm
|
||||
volumes_from:
|
||||
- applications
|
||||
volumes:
|
||||
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
|
||||
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
|
||||
ports:
|
||||
- "${NGINX_HOST_HTTP_PORT}:80"
|
||||
- "${NGINX_HOST_HTTPS_PORT}:443"
|
||||
depends_on:
|
||||
- php-fpm
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### Apache Server Container #################################
|
||||
|
||||
apache2:
|
||||
build:
|
||||
context: ./apache2
|
||||
args:
|
||||
- PHP_SOCKET=php-fpm:9000
|
||||
volumes_from:
|
||||
- applications
|
||||
volumes:
|
||||
- ./logs/apache2:/var/log/apache2
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
links:
|
||||
- php-fpm
|
||||
build:
|
||||
context: ./apache2
|
||||
args:
|
||||
- PHP_SOCKET=${PHP_SOCKET}
|
||||
volumes_from:
|
||||
- applications
|
||||
volumes:
|
||||
- ${APACHE_HOST_LOG_PATH}:/var/log/apache2
|
||||
- ./apache2/sites:/etc/apache2/sites-available
|
||||
ports:
|
||||
- "${APACHE_HOST_HTTP_PORT}:80"
|
||||
- "${APACHE_HOST_HTTPS_PORT}:443"
|
||||
depends_on:
|
||||
- php-fpm
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### HHVM Container ##########################################
|
||||
|
||||
hhvm:
|
||||
build: ./hhvm
|
||||
volumes_from:
|
||||
- applications
|
||||
expose:
|
||||
- "9000"
|
||||
links:
|
||||
- workspace
|
||||
build: ./hhvm
|
||||
volumes_from:
|
||||
- applications
|
||||
expose:
|
||||
- "9000"
|
||||
depends_on:
|
||||
- workspace
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### Minio Container #########################################
|
||||
|
||||
minio:
|
||||
build: ./minio
|
||||
volumes:
|
||||
- minio:/export
|
||||
ports:
|
||||
- "9000:9000"
|
||||
environment:
|
||||
MINIO_ACCESS_KEY: access
|
||||
MINIO_SECRET_KEY: secretkey
|
||||
build: ./minio
|
||||
volumes:
|
||||
- minio:/export
|
||||
ports:
|
||||
- "${MINIO_PORT}:9000"
|
||||
environment:
|
||||
- MINIO_ACCESS_KEY=access
|
||||
- MINIO_SECRET_KEY=secretkey
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
### MySQL Container #########################################
|
||||
|
||||
mysql:
|
||||
build:
|
||||
context: ./mysql
|
||||
args:
|
||||
- MYSQL_DATABASE=homestead
|
||||
- MYSQL_USER=homestead
|
||||
- MYSQL_PASSWORD=secret
|
||||
- MYSQL_ROOT_PASSWORD=root
|
||||
volumes:
|
||||
- mysql:/var/lib/mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
build:
|
||||
context: ./mysql
|
||||
environment:
|
||||
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||
- MYSQL_USER=${MYSQL_USER}
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||
volumes:
|
||||
- mysql:/var/lib/mysql
|
||||
ports:
|
||||
- "${MYSQL_PORT}:3306"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### MSSQL Container #########################################
|
||||
|
||||
mssql:
|
||||
build:
|
||||
context: ./mssql
|
||||
environment:
|
||||
- MSSQL_DATABASE=${MSSQL_DATABASE}
|
||||
- SA_PASSWORD=${MSSQL_PASSWORD}
|
||||
- ACCEPT_EULA=Y
|
||||
volumes:
|
||||
- mssql:/var/opt/mssql
|
||||
ports:
|
||||
- "${MSSQL_PORT}:1433"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### MariaDB Container #######################################
|
||||
|
||||
mariadb:
|
||||
build: ./mariadb
|
||||
volumes:
|
||||
- mariadb:/var/lib/mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
MYSQL_DATABASE: homestead
|
||||
MYSQL_USER: homestead
|
||||
MYSQL_PASSWORD: secret
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
build: ./mariadb
|
||||
volumes:
|
||||
- mariadb:/var/lib/mysql
|
||||
ports:
|
||||
- "${MARIADB_PORT}:3306"
|
||||
environment:
|
||||
- MYSQL_DATABASE=${MARIADB_DATABASE}
|
||||
- MYSQL_USER=${MARIADB_USER}
|
||||
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
|
||||
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### PostgreSQL Container ####################################
|
||||
|
||||
postgres:
|
||||
build: ./postgres
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_DB: homestead
|
||||
POSTGRES_USER: homestead
|
||||
POSTGRES_PASSWORD: secret
|
||||
build: ./postgres
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "${POSTGRES_PORT}:5432"
|
||||
environment:
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### PostgreSQL PostGis Container ############################
|
||||
|
||||
postgres-postgis:
|
||||
build: ./postgres-postgis
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_DB: homestead
|
||||
POSTGRES_USER: homestead
|
||||
POSTGRES_PASSWORD: secret
|
||||
build: ./postgres-postgis
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "${POSTGRES_PORT}:5432"
|
||||
environment:
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Neo4j Container #########################################
|
||||
|
||||
neo4j:
|
||||
build: ./neo4j
|
||||
ports:
|
||||
- "7474:7474"
|
||||
- "1337:1337"
|
||||
environment:
|
||||
- NEO4J_AUTH=homestead:secret
|
||||
volumes:
|
||||
- neo4j:/var/lib/neo4j/data
|
||||
build: ./neo4j
|
||||
ports:
|
||||
- "7474:7474"
|
||||
- "1337:1337"
|
||||
environment:
|
||||
- NEO4J_AUTH=default:secret
|
||||
volumes:
|
||||
- neo4j:/var/lib/neo4j/data
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### MongoDB Container #######################################
|
||||
|
||||
mongo:
|
||||
build: ./mongo
|
||||
ports:
|
||||
- "27017:27017"
|
||||
volumes:
|
||||
- mongo:/data/db
|
||||
build: ./mongo
|
||||
ports:
|
||||
- "27017:27017"
|
||||
volumes:
|
||||
- mongo:/data/db
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### RethinkDB Container #######################################
|
||||
|
||||
rethinkdb:
|
||||
build: ./rethinkdb
|
||||
ports:
|
||||
- "8090:8080"
|
||||
volumes:
|
||||
- rethinkdb:/data/rethinkdb_data
|
||||
build: ./rethinkdb
|
||||
ports:
|
||||
- "8090:8080"
|
||||
volumes:
|
||||
- rethinkdb:/data/rethinkdb_data
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Redis Container #########################################
|
||||
|
||||
redis:
|
||||
build: ./redis
|
||||
volumes:
|
||||
- redis:/data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
build: ./redis
|
||||
volumes:
|
||||
- redis:/data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Aerospike c Container ###################################
|
||||
|
||||
aerospike:
|
||||
build: ./aerospike
|
||||
volumes_from:
|
||||
- workspace
|
||||
volumes:
|
||||
- aerospike:/opt/aerospike/data
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "3001:3001"
|
||||
- "3002:3002"
|
||||
- "3003:3003"
|
||||
|
||||
build: ./aerospike
|
||||
volumes_from:
|
||||
- workspace
|
||||
volumes:
|
||||
- aerospike:/opt/aerospike/data
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "3001:3001"
|
||||
- "3002:3002"
|
||||
- "3003:3003"
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Memcached Container #####################################
|
||||
|
||||
memcached:
|
||||
build: ./memcached
|
||||
volumes:
|
||||
- memcached:/var/lib/memcached
|
||||
ports:
|
||||
- "11211:11211"
|
||||
links:
|
||||
- php-fpm
|
||||
build: ./memcached
|
||||
volumes:
|
||||
- memcached:/var/lib/memcached
|
||||
ports:
|
||||
- "${MEMCACHED_HOST_PORT}:11211"
|
||||
depends_on:
|
||||
- php-fpm
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Beanstalkd Container ####################################
|
||||
|
||||
beanstalkd:
|
||||
build: ./beanstalkd
|
||||
ports:
|
||||
- "11300:11300"
|
||||
privileged: true
|
||||
links:
|
||||
- php-fpm
|
||||
build: ./beanstalkd
|
||||
ports:
|
||||
- "${BEANSTALKD_HOST_PORT}:11300"
|
||||
privileged: true
|
||||
depends_on:
|
||||
- php-fpm
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### RabbitMQ Container ######################################
|
||||
|
||||
rabbitmq:
|
||||
build: ./rabbitmq
|
||||
ports:
|
||||
- "5672:5672"
|
||||
- "15671:15671"
|
||||
- "8080:15672"
|
||||
privileged: true
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: guest
|
||||
RABBITMQ_DEFAULT_PASS: guest
|
||||
links:
|
||||
- php-fpm
|
||||
build: ./rabbitmq
|
||||
ports:
|
||||
- "${RABBITMQ_NODE_HOST_PORT}:5672"
|
||||
- "${RABBITMQ_MANAGEMENT_HTTP_HOST_PORT}:15672"
|
||||
- "${RABBITMQ_MANAGEMENT_HTTPS_HOST_PORT}:15671"
|
||||
privileged: true
|
||||
environment:
|
||||
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
|
||||
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
|
||||
depends_on:
|
||||
- php-fpm
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Beanstalkd Console Container ############################
|
||||
|
||||
beanstalkd-console:
|
||||
build: ./beanstalkd-console
|
||||
ports:
|
||||
- "2080:2080"
|
||||
links:
|
||||
- beanstalkd
|
||||
build: ./beanstalkd-console
|
||||
ports:
|
||||
- "2080:2080"
|
||||
depends_on:
|
||||
- beanstalkd
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### Caddy Server Container ##################################
|
||||
|
||||
caddy:
|
||||
build: ./caddy
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "2015:2015"
|
||||
volumes_from:
|
||||
- applications
|
||||
volumes:
|
||||
- ./caddy/Caddyfile:/etc/Caddyfile
|
||||
- ./logs/caddy:/var/log/caddy
|
||||
- caddy:/root/.caddy
|
||||
links:
|
||||
- php-fpm
|
||||
build: ./caddy
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "2015:2015"
|
||||
volumes_from:
|
||||
- applications
|
||||
volumes:
|
||||
- ./caddy/Caddyfile:/etc/Caddyfile
|
||||
- ./logs/caddy:/var/log/caddy
|
||||
- caddy:/root/.caddy
|
||||
depends_on:
|
||||
- php-fpm
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### phpMyAdmin Container ####################################
|
||||
|
||||
phpmyadmin:
|
||||
build: ./phpmyadmin
|
||||
environment:
|
||||
PMA_ARBITRARY: 1
|
||||
MYSQL_USER: homestead
|
||||
MYSQL_PASSWORD: secret
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
ports:
|
||||
- "8080:80"
|
||||
links:
|
||||
# for mysql container
|
||||
- "mysql:db"
|
||||
# for mariadb container
|
||||
# - "mariadb:db"
|
||||
build: ./phpmyadmin
|
||||
environment:
|
||||
- PMA_ARBITRARY=1
|
||||
- MYSQL_USER=${PMA_USER}
|
||||
- MYSQL_PASSWORD=${PMA_PASSWORD}
|
||||
- MYSQL_ROOT_PASSWORD=${PMA_ROOT_PASSWORD}
|
||||
ports:
|
||||
- "${PMA_PORT}:80"
|
||||
depends_on:
|
||||
- "${PMA_DB_ENGINE}"
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
|
||||
### Adminer Container ####################################
|
||||
|
||||
adminer:
|
||||
build: ./adminer
|
||||
ports:
|
||||
- "${ADM_PORT}:8080"
|
||||
depends_on:
|
||||
- php-fpm
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
### pgAdmin Container #######################################
|
||||
|
||||
pgadmin:
|
||||
build: ./pgadmin
|
||||
ports:
|
||||
- "5050:5050"
|
||||
links:
|
||||
- postgres
|
||||
build: ./pgadmin
|
||||
ports:
|
||||
- "5050:5050"
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
### ElasticSearch Container #################################
|
||||
|
||||
elasticsearch:
|
||||
build: ./elasticsearch
|
||||
volumes:
|
||||
- elasticsearch-data:/usr/share/elasticsearch/data
|
||||
- elasticsearch-plugins:/usr/share/elasticsearch/data
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
links:
|
||||
- php-fpm
|
||||
build: ./elasticsearch
|
||||
volumes:
|
||||
- elasticsearch-data:/usr/share/elasticsearch/data
|
||||
- elasticsearch-plugins:/usr/share/elasticsearch/plugins
|
||||
ports:
|
||||
- "${ELASTICSEARCH_HOST_HTTP_PORT}:9200"
|
||||
- "${ELASTICSEARCH_HOST_TRANSPORT_PORT}:9300"
|
||||
depends_on:
|
||||
- php-fpm
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
### Selenium Container #########################################
|
||||
### Certbot Container ##################################
|
||||
|
||||
certbot:
|
||||
build:
|
||||
context: ./certbot
|
||||
volumes:
|
||||
- ./data/certbot/certs/:/var/certs
|
||||
- ./certbot/letsencrypt/:/var/www/letsencrypt
|
||||
environment:
|
||||
- CN="fake.domain.com"
|
||||
- EMAIL="fake.email@gmail.com"
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
### Mailhog Container #########################################
|
||||
|
||||
mailhog:
|
||||
build: ./mailhog
|
||||
ports:
|
||||
- "1025:1025"
|
||||
- "8025:8025"
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
### Selenium Container ########################################
|
||||
|
||||
selenium:
|
||||
build: ./selenium
|
||||
ports:
|
||||
- "4444:4444"
|
||||
volumes:
|
||||
# see https://github.com/SeleniumHQ/docker-selenium#running-the-images
|
||||
- /dev/shm:/dev/shm
|
||||
build: ./selenium
|
||||
ports:
|
||||
- "${SELENIUM_PORT}:4444"
|
||||
volumes:
|
||||
- /dev/shm:/dev/shm
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
### Volumes Setup ###########################################
|
||||
### Varnish Proxy 1 ##########################################
|
||||
|
||||
proxy:
|
||||
build: ./varnish
|
||||
expose:
|
||||
- ${VARNISH_PORT}
|
||||
environment:
|
||||
- VARNISH_CONFIG=${VARNISH_CONFIG}
|
||||
- CACHE_SIZE=${VARNISH_PROXY1_CACHE_SIZE}
|
||||
- VARNISHD_PARAMS=${VARNISHD_PARAMS}
|
||||
- VARNISH_PORT=${VARNISH_PORT}
|
||||
- BACKEND_HOST=${VARNISH_PROXY1_BACKEND_HOST}
|
||||
- BACKEND_PORT=${VARNISH_BACKEND_PORT}
|
||||
- VARNISH_SERVER=${VARNISH_PROXY1_SERVER}
|
||||
links:
|
||||
- workspace
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
### Varnish Proxy 2 ##########################################
|
||||
|
||||
proxy2:
|
||||
build: ./varnish
|
||||
expose:
|
||||
- ${VARNISH_PORT}
|
||||
environment:
|
||||
- VARNISH_CONFIG=${VARNISH_CONFIG}
|
||||
- CACHE_SIZE=${VARNISH_PROXY2_CACHE_SIZE}
|
||||
- VARNISHD_PARAMS=${VARNISHD_PARAMS}
|
||||
- VARNISH_PORT=${VARNISH_PORT}
|
||||
- BACKEND_HOST=${VARNISH_PROXY2_BACKEND_HOST}
|
||||
- BACKEND_PORT=${VARNISH_BACKEND_PORT}
|
||||
- VARNISH_SERVER=${VARNISH_PROXY2_SERVER}
|
||||
links:
|
||||
- workspace
|
||||
networks:
|
||||
- frontend
|
||||
|
||||
### Balancer Haproxy ##########################################
|
||||
|
||||
balancer:
|
||||
build: ./haproxy
|
||||
ports:
|
||||
- "${HAPROXY_HOST_HTTP_PORT}:8085"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
links:
|
||||
- proxy
|
||||
- proxy2
|
||||
|
||||
### Jenkins ###################################################
|
||||
jenkins:
|
||||
build: ./jenkins
|
||||
environment:
|
||||
JAVA_OPTS: "-Djava.awt.headless=true"
|
||||
ports:
|
||||
- "${JENKINS_HOST_SLAVE_AGENT_PORT}:50000"
|
||||
- "${JENKINS_HOST_HTTP_PORT}:8080"
|
||||
privileged: true
|
||||
volumes:
|
||||
- ${JENKINS_HOME}:/var/jenkins_home
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
### Networks Setup ############################################
|
||||
|
||||
networks:
|
||||
frontend:
|
||||
driver: "bridge"
|
||||
backend:
|
||||
driver: "bridge"
|
||||
|
||||
### Volumes Setup #############################################
|
||||
|
||||
volumes:
|
||||
mysql:
|
||||
driver: "local"
|
||||
postgres:
|
||||
driver: "local"
|
||||
memcached:
|
||||
driver: "local"
|
||||
redis:
|
||||
driver: "local"
|
||||
neo4j:
|
||||
driver: "local"
|
||||
mariadb:
|
||||
driver: "local"
|
||||
mongo:
|
||||
driver: "local"
|
||||
minio:
|
||||
driver: "local"
|
||||
rethinkdb:
|
||||
driver: "local"
|
||||
phpmyadmin:
|
||||
driver: "local"
|
||||
aerospike:
|
||||
driver: "local"
|
||||
caddy:
|
||||
driver: "local"
|
||||
elasticsearch-data:
|
||||
driver: "local"
|
||||
elasticsearch-plugins:
|
||||
driver: "local"
|
||||
sessions: ## nothing is connected to this (- ./data/sessions:/sessions)
|
||||
driver: "local"
|
||||
mysql:
|
||||
driver: "local"
|
||||
mssql:
|
||||
driver: "local"
|
||||
postgres:
|
||||
driver: "local"
|
||||
memcached:
|
||||
driver: "local"
|
||||
redis:
|
||||
driver: "local"
|
||||
neo4j:
|
||||
driver: "local"
|
||||
mariadb:
|
||||
driver: "local"
|
||||
mongo:
|
||||
driver: "local"
|
||||
minio:
|
||||
driver: "local"
|
||||
rethinkdb:
|
||||
driver: "local"
|
||||
phpmyadmin:
|
||||
driver: "local"
|
||||
adminer:
|
||||
driver: "local"
|
||||
aerospike:
|
||||
driver: "local"
|
||||
caddy:
|
||||
driver: "local"
|
||||
elasticsearch-data:
|
||||
driver: "local"
|
||||
elasticsearch-plugins:
|
||||
driver: "local"
|
||||
|
@ -1,181 +0,0 @@
|
||||
---
|
||||
title: Getting Started
|
||||
type: index
|
||||
weight: 2
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
- [Docker](https://www.docker.com/products/docker/) `>= 1.12`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Choose the setup the best suits your needs.
|
||||
|
||||
#### A) Setup for Single Project:
|
||||
*(In case you want a Docker environment for each project)*
|
||||
|
||||
##### A.1) Setup environment in existing Project:
|
||||
*(In case you already have a project, and you want to setup an environment to run it)*
|
||||
|
||||
1 - Clone this repository on your project root directory:
|
||||
|
||||
```bash
|
||||
git submodule add https://github.com/Laradock/laradock.git
|
||||
```
|
||||
|
||||
*Note 1: If you are not yet using Git for your PHP project, you can use `git clone https://github.com/Laradock/laradock.git` instead.*
|
||||
|
||||
*Note 2: To keep track of your LaraDock changes, between your projects and also keep LaraDock updated. [Check this](#keep-tracking-LaraDock)*
|
||||
|
||||
*Note 3: In this case the folder structure will be like this:*
|
||||
|
||||
```
|
||||
- project1
|
||||
- laradock
|
||||
- project2
|
||||
- laradock
|
||||
```
|
||||
|
||||
##### A.2) Setup environment first then create project:
|
||||
*(In case you don't have a project, and you want to create your project inside the Docker environment)*
|
||||
|
||||
1 - Clone this repository anywhere on your machine:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/laradock/laradock.git
|
||||
```
|
||||
Note: In this case the folder structure will be like this:
|
||||
|
||||
```
|
||||
- projects
|
||||
- laradock
|
||||
- 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 ....
|
||||
```
|
||||
|
||||
|
||||
#### B) Setup for Multiple Projects:
|
||||
|
||||
1 - Clone this repository anywhere on your machine:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/laradock/laradock.git
|
||||
```
|
||||
|
||||
2 - Edit the `docker-compose.yml` file to map to your projects directories:
|
||||
|
||||
```
|
||||
applications:
|
||||
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 - Add the domains to the **hosts** files.
|
||||
|
||||
```
|
||||
127.0.0.1 project1.dev
|
||||
```
|
||||
|
||||
7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
**Read Before starting:**
|
||||
|
||||
If you are using **Docker Toolbox** (VM), do one of the following:
|
||||
|
||||
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading LaraDock](#upgrading-laradock)
|
||||
- Use LaraDock v3.* (Visit the `LaraDock-ToolBox` [Branch](https://github.com/laradock/laradock/tree/LaraDock-ToolBox)).
|
||||
|
||||
<br>
|
||||
|
||||
>**Warning:** If you used an older version of LaraDock it's highly recommended to rebuild the containers you need to use [see how you rebuild a container](#Build-Re-build-Containers) in order to prevent errors as much as possible.
|
||||
|
||||
<br>
|
||||
|
||||
1 - Run Containers: *(Make sure you are in the `laradock` folder before running the `docker-compose` commands).*
|
||||
|
||||
|
||||
**Example:** Running NGINX and MySQL:
|
||||
|
||||
```bash
|
||||
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`.
|
||||
|
||||
|
||||
You can select your own combination of Containers form the list below:
|
||||
|
||||
`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`, `aerospike`, `pgadmin`, `elasticsearch`, `rethinkdb`.
|
||||
|
||||
|
||||
<br>
|
||||
2 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...).
|
||||
|
||||
```bash
|
||||
docker-compose exec workspace bash
|
||||
```
|
||||
|
||||
Alternatively, for Windows PowerShell users: execute the following command to enter any running container:
|
||||
|
||||
```bash
|
||||
docker exec -it {workspace-container-id} bash
|
||||
```
|
||||
|
||||
**Note:** You can add `--user=laradock` (example `docker-compose exec --user=laradock workspace bash`) to have files created as your host's user. (you can change the PUID (User id) and PGID (group id) variables from the `docker-compose.yml`).
|
||||
|
||||
<br>
|
||||
3 - Edit your project configurations.
|
||||
|
||||
Open your `.env` file and set the `DB_HOST` to `mysql`:
|
||||
|
||||
```env
|
||||
DB_HOST=mysql
|
||||
```
|
||||
|
||||
*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).*
|
||||
|
||||
<br>
|
||||
4 - Open your browser and visit your localhost address (`http://localhost/`).
|
||||
|
||||
<br>
|
||||
**Debugging**: if you are facing any problem here check the [Debugging](#debugging) section.
|
||||
|
||||
If you need a special support. Contact me, more details in the [Help & Questions](#Help) section.
|
@ -1,78 +0,0 @@
|
||||
baseurl = "https://example.org/"
|
||||
languageCode = "en-us"
|
||||
title = "Material Docs"
|
||||
theme = "hugo-material-docs"
|
||||
metadataformat = "yaml"
|
||||
canonifyurls = true
|
||||
# Enable Google Analytics by entering your tracking id
|
||||
googleAnalytics = ""
|
||||
|
||||
[params]
|
||||
# General information
|
||||
author = "Digitalcraftsman"
|
||||
description = "A material design theme for documentations."
|
||||
copyright = "Released under the MIT license"
|
||||
|
||||
# Repository
|
||||
provider = "GitHub"
|
||||
repo_url = "https://github.com/digitalcraftsman/hugo-material-docs"
|
||||
|
||||
version = "1.0.0"
|
||||
logo = "images/logo.png"
|
||||
favicon = ""
|
||||
|
||||
permalink = "#"
|
||||
|
||||
# Custom assets
|
||||
custom_css = []
|
||||
custom_js = []
|
||||
|
||||
# Syntax highlighting theme
|
||||
highlight_css = ""
|
||||
|
||||
[params.palette]
|
||||
primary = "red"
|
||||
accent = "teal"
|
||||
|
||||
[params.font]
|
||||
text = "Ubuntu"
|
||||
code = "Ubuntu Mono"
|
||||
|
||||
|
||||
[social]
|
||||
twitter = ""
|
||||
github = "digitalcraftsman"
|
||||
email = "hello@email.com"
|
||||
|
||||
|
||||
[[menu.main]]
|
||||
name = "Material"
|
||||
url = "/"
|
||||
weight = 0
|
||||
|
||||
[[menu.main]]
|
||||
name = "Getting started"
|
||||
url = "getting-started/"
|
||||
weight = 10
|
||||
|
||||
[[menu.main]]
|
||||
name = "Adding content"
|
||||
url = "adding-content/"
|
||||
weight = 20
|
||||
|
||||
[[menu.main]]
|
||||
name = "Roadmap"
|
||||
url = "roadmap/"
|
||||
weight = 30
|
||||
|
||||
[[menu.main]]
|
||||
name = "License"
|
||||
url = "license/"
|
||||
weight = 40
|
||||
|
||||
|
||||
[blackfriday]
|
||||
smartypants = true
|
||||
fractions = true
|
||||
smartDashes = true
|
||||
plainIDAnchors = true
|
@ -1,61 +0,0 @@
|
||||
---
|
||||
date: 2016-03-09T19:56:50+01:00
|
||||
title: Adding content
|
||||
weight: 20
|
||||
---
|
||||
|
||||
## Hello world
|
||||
|
||||
Let's create our first content file for your documentation. Open a terminal and add the following command for each new file you want to add. Replace `<section-name>` with a general term that describes your document in detail.
|
||||
|
||||
```sh
|
||||
hugo new <section-name>/filename.md
|
||||
```
|
||||
|
||||
Visitors of your website will find the final document under `www.example.com/<section-name>/filename/`.
|
||||
|
||||
Since it's possible to have multiple content files in the same section I recommend to create at least one `index.md` file per section. This ensures that users will find an index page under `www.example.com/<section-name>`.
|
||||
|
||||
## Homepage
|
||||
|
||||
To add content to the homepage you need to add a small indicator to the frontmatter of the content file:
|
||||
|
||||
```toml
|
||||
type: index
|
||||
```
|
||||
|
||||
Otherwise the theme will not be able to find the corresponding content file.
|
||||
|
||||
## Table of contents
|
||||
|
||||
You maybe noticed that the menu on the left contains a small table of contents of the current page. All `<h2>` tags (`## Headline` in Markdown) will be added automatically.
|
||||
|
||||
## Admonitions
|
||||
|
||||
Admonition is a handy feature that adds block-styled side content to your documentation, for example hints, notes or warnings. It can be enabled by using the corresponding [shortcodes](http://gohugo.io/extras/shortcodes/) inside your content:
|
||||
|
||||
```go
|
||||
{{</* note title="Note" */>}}
|
||||
Nothing to see here, move along.
|
||||
{{</* /note */>}}
|
||||
```
|
||||
|
||||
This will print the following block:
|
||||
|
||||
{{< note title="Note" >}}
|
||||
Nothing to see here, move along.
|
||||
{{< /note >}}
|
||||
|
||||
The shortcode adds a neutral color for the note class and a red color for the warning class. You can also add a custom title:
|
||||
|
||||
```go
|
||||
{{</* warning title="Don't try this at home" */>}}
|
||||
Nothing to see here, move along.
|
||||
{{</* /warning */>}}
|
||||
```
|
||||
|
||||
This will print the following block:
|
||||
|
||||
{{< warning title="Don't try this at home" >}}
|
||||
Nothing to see here, move along.
|
||||
{{< /warning >}}
|
@ -1,240 +0,0 @@
|
||||
---
|
||||
date: 2016-03-09T00:11:02+01:00
|
||||
title: Getting started
|
||||
weight: 10
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
### Installing Hugo
|
||||
|
||||
Hugo itself is just a single binary without dependencies on expensive runtimes like Ruby, Python or PHP and without dependencies on any databases. You just need to download the [latest version](https://github.com/spf13/hugo/releases). For more information read the official [installation guides](http://gohugo.io/overview/installing/).
|
||||
|
||||
Let's make sure Hugo is set up as expected. You should see a similar version number in your terminal:
|
||||
|
||||
```sh
|
||||
hugo version
|
||||
# Hugo Static Site Generator v0.15 BuildDate: 2016-01-03T12:47:47+01:00
|
||||
```
|
||||
|
||||
### Installing Material
|
||||
|
||||
Next, assuming you have Hugo up and running the `hugo-material-docs` theme can be installed with `git`:
|
||||
|
||||
```sh
|
||||
# create a new Hugo website
|
||||
hugo new site my-awesome-docs
|
||||
|
||||
# move into the themes folder of your website
|
||||
cd my-awesome-docs/themes/
|
||||
|
||||
# download the theme
|
||||
git clone git@github.com:digitalcraftsman/hugo-material-docs.git
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
Next, take a look in the `exampleSite` folder at `themes/hugo-material-docs/`. This directory contains an example config file and the content that you are currently reading. It serves as an example setup for your documentation.
|
||||
|
||||
Copy at least the `config.toml` in the root directory of your website. Overwrite the existing config file if necessary.
|
||||
|
||||
Hugo includes a development server, so you can view your changes as you go -
|
||||
very handy. Spin it up with the following command:
|
||||
|
||||
``` sh
|
||||
hugo server
|
||||
```
|
||||
|
||||
Now you can go to [localhost:1313](http://localhost:1313) and the Material
|
||||
theme should be visible. You can now start writing your documentation, or read
|
||||
on and customize the theme through some options.
|
||||
|
||||
## Configuration
|
||||
|
||||
Before you are able to deploy your documentation you should take a few minute to adjust some information in the `config.toml`. Open the file in an editor:
|
||||
|
||||
```toml
|
||||
baseurl = "https://example.com/"
|
||||
languageCode = "en-us"
|
||||
title = "Material Docs"
|
||||
|
||||
[params]
|
||||
# General information
|
||||
author = "Digitalcraftsman"
|
||||
description = "A material design theme for documentations."
|
||||
copyright = "Released under the MIT license"
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### Github integration
|
||||
|
||||
If your project is hosted on GitHub, add the repository link to the
|
||||
configuration. If the `provider` equals **GitHub**, the Material theme will
|
||||
add a download and star button, and display the number of stars:
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Repository
|
||||
provider = "GitHub"
|
||||
repo_url = "https://github.com/digitalcraftsman/hugo-material-docs"
|
||||
```
|
||||
|
||||
### Adding a version
|
||||
|
||||
In order to add the current version next to the project banner inside the
|
||||
drawer, you can set the variable `version`:
|
||||
|
||||
```toml
|
||||
[params]
|
||||
version = "1.0.0"
|
||||
```
|
||||
|
||||
This will also change the link behind the download button to point to the
|
||||
archive with the respective version on GitHub, assuming a release tagged with
|
||||
this exact version identifier.
|
||||
|
||||
### Adding a logo
|
||||
|
||||
If your project has a logo, you can add it to the drawer/navigation by defining
|
||||
the variable `logo`. Ideally, the image of your logo should have
|
||||
rectangular shape with a minimum resolution of 128x128 and leave some room
|
||||
towards the edges. The logo will also be used as a web application icon on iOS.
|
||||
Either save your logo somewhere in the `static/` folder and reference the file relative to this location or use an external URL:
|
||||
|
||||
```toml
|
||||
[params]
|
||||
logo = "images/logo.png"
|
||||
```
|
||||
|
||||
### Adding a custom favicon
|
||||
|
||||
Favicons are small small icons that are displayed in the tabs right next to the title of the current page. As with the logo above you need to save your favicon in `static/` and link it relative to this folder or use an external URL:
|
||||
|
||||
```toml
|
||||
[params]
|
||||
favicon = "favicon.ico"
|
||||
```
|
||||
|
||||
### Google Analytics
|
||||
|
||||
You can enable Google Analytics by replacing `UA-XXXXXXXX-X` with your own tracking code.
|
||||
|
||||
```toml
|
||||
googleAnalytics = "UA-XXXXXXXX-X"
|
||||
```
|
||||
|
||||
### Small tweaks
|
||||
|
||||
This theme provides a simple way for making small adjustments, that is changing
|
||||
some margins, centering text, etc. The `custom_css` and `custom_js` option allow you to add further CSS and JS files. They can either reside locally in the `/static` folder or on an external server, e.g. a CDN. In both cases use either the relative path to `/static` or the absolute URL to the external ressource.
|
||||
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Custom assets
|
||||
custom_css = [
|
||||
"foo.css",
|
||||
"bar.css"
|
||||
]
|
||||
|
||||
custom_js = ["buzz.js"]
|
||||
```
|
||||
|
||||
### Changing the color palette
|
||||
|
||||
Material defines a default hue for every primary and accent color on Google's
|
||||
material design [color palette][]. This makes it very easy to change the overall look of the theme. Just set the variables `palette.primary` and `palette.accent` to one of the colors defined in the palette:
|
||||
|
||||
```toml
|
||||
[params.palette]
|
||||
primary = "red"
|
||||
accent = "light-green"
|
||||
```
|
||||
|
||||
Color names can be written upper- or lowercase but must match the names of the
|
||||
material design [color palette](http://www.materialui.co/colors). Valid values are: _red_, _pink_, _purple_, _deep purple_, _indigo_, _blue_, _light-blue_, _cyan_, _teal_, _green_, _light-green_,
|
||||
_lime_, _yellow_, _amber_, _orange_, _deep-orange_, _brown_, _grey_ and
|
||||
_blue-grey_. The last three colors can only be used as a primary color.
|
||||
|
||||

|
||||
|
||||
If the color is set via this configuration, an additional CSS file called
|
||||
`palettes.css` is included that defines the color palettes.
|
||||
|
||||
### Changing the font family
|
||||
|
||||
Material uses the [Ubuntu font family](http://font.ubuntu.com) by default, specifically the regular sans-serif type for text and the monospaced type for code. Both fonts are loaded from [Google Fonts](https://www.google.com/fonts) and can be easily changed to other fonts, like for example Google's own [Roboto font](https://www.google.com/fonts/specimen/Roboto):
|
||||
|
||||
```toml
|
||||
[params.font]
|
||||
text = "Roboto"
|
||||
code = "Roboto Mono"
|
||||
```
|
||||
|
||||
The text font will be loaded in font-weights 400 and **700**, the monospaced
|
||||
font in regular weight.
|
||||
|
||||
### Syntax highlighting
|
||||
|
||||
This theme uses the popular [Highlight.js](https://highlightjs.org/) library to colorize code examples. The default theme is called `Github` with a few small tweaks. You can link our own theme if you like. Again, store your stylesheet in the `static/` folder and set the relative path in the config file:
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Syntax highlighting theme
|
||||
highlight_css = "path/to/theme.css"
|
||||
```
|
||||
|
||||
### Adding a GitHub and Twitter account
|
||||
|
||||
If you have a GitHub and/or Twitter account, you can add links to your
|
||||
accounts to the drawer by setting the variables `github` and
|
||||
`twitter` respectively:
|
||||
|
||||
``` toml
|
||||
[social]
|
||||
twitter = ""
|
||||
github = "digitalcraftsman"
|
||||
```
|
||||
|
||||
### Adding menu entries
|
||||
|
||||
Once you created your first content files you can link them manually in the sidebar on the left. A menu entry has the following schema:
|
||||
|
||||
```toml
|
||||
[[menu.main]]
|
||||
name = "Material"
|
||||
url = "/"
|
||||
weight = 0
|
||||
pre = ""
|
||||
```
|
||||
|
||||
`name` is the title displayed in the menu and `url` the relative URL to the content. The `weight` attribute allows you to modify the order of the menu entries. A menu entry appears further down the more weight you add. The `pre` attribute is optional and allows you to *pre*pend elements to a menu link, e.g. an icon.
|
||||
|
||||
Instead of just linking a single file you can enhance the sidebar by creating a nested menu. This way you can list all pages of a section instead of linking them one by one (without nesting).
|
||||
|
||||
You need extend the frontmatter of each file content file in a section slightly. The snippet below registers this content file as 'child' of a menu entry that already exists.
|
||||
|
||||
```yaml
|
||||
menu:
|
||||
main:
|
||||
parent: Material
|
||||
identifier: <link name>
|
||||
weight: 0
|
||||
```
|
||||
|
||||
`main` specifies to which menu the content file should be added. `main` is the only menu in this theme by default. `parent` let's you register this content file to an existing menu entry, in this case the `Material` link. Note that the parent in the frontmatter needs to match the name in `config.toml`.
|
||||
|
||||
`identifier` is the link that is shown in the menu. Ideally you choose the same name for the `identifier` and the `title` of the page. Again, `weight` allows you to change the order of the nested links in a section.
|
||||
|
||||
### Markdown extensions
|
||||
|
||||
Hugo uses [Blackfriday](https://github.com/russross/blackfriday) to process your content. For a detailed description of all options take a look at the [Blackfriday configuration](http://gohugo.io/overview/configuration/#configure-blackfriday-rendering) section in the Hugo documentation.
|
||||
|
||||
```toml
|
||||
[blackfriday]
|
||||
smartypants = true
|
||||
fractions = true
|
||||
smartDashes = true
|
||||
plainIDAnchors = true
|
||||
```
|
@ -1,55 +0,0 @@
|
||||
---
|
||||
date: 2016-03-08T21:07:13+01:00
|
||||
title: Material for Hugo
|
||||
type: index
|
||||
weight: 0
|
||||
---
|
||||
|
||||
## Beautiful documentation
|
||||
|
||||
Material is a theme for [Hugo](https://gohugo.io), a fast and flexible static site generator. It is built using Google's [material design](https://www.google.com/design/spec/material-design/introduction.html)
|
||||
guidelines, fully responsive, optimized for touch and pointer devices as well
|
||||
as all sorts of screen sizes.
|
||||
|
||||

|
||||
|
||||
Material is very lightweight – it is built from scratch using Javascript and
|
||||
CSS that weighs less than 30kb (minified, gzipped and excluding Google Fonts
|
||||
and Analytics). Yet, it is highly customizable and degrades gracefully in older
|
||||
browsers.
|
||||
|
||||
## Quick start
|
||||
|
||||
Install with `git`:
|
||||
|
||||
```sh
|
||||
git clone git@github.com:digitalcraftsman/hugo-material-docs.git themes/hugo-material-docs
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Beautiful, readable and very user-friendly design based on Google's material
|
||||
design guidelines, packed in a full responsive template with a well-defined
|
||||
and [easily customizable color palette]({{< relref "getting-started/index.md#changing-the-color-palette" >}}), great typography, as well as a
|
||||
beautiful search interface and footer.
|
||||
|
||||
- Well-tested and optimized Javascript and CSS including a cross-browser
|
||||
fixed/sticky header, a drawer that even works without Javascript using
|
||||
the [checkbox hack](http://tutorialzine.com/2015/08/quick-tip-css-only-dropdowns-with-the-checkbox-hack/) with fallbacks, responsive tables that scroll when
|
||||
the screen is too small and well-defined print styles.
|
||||
|
||||
- Extra configuration options like a [project logo]({{< relref "getting-started/index.md#adding-a-logo" >}}), links to the authors
|
||||
[GitHub and Twitter accounts]({{< relref "getting-started/index.md#adding-a-github-and-twitter-account" >}}) and display of the amount of stars the
|
||||
project has on GitHub.
|
||||
|
||||
- Web application capability on iOS – when the page is saved to the homescreen,
|
||||
it behaves and looks like a native application.
|
||||
|
||||
See the [getting started guide]({{< relref "getting-started/index.md" >}}) for instructions how to get
|
||||
it up and running.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Last but not least a big thank you to [Martin Donath](https://github.com/squidfunk). He created the original [Material theme](https://github.com/squidfunk/mkdocs-material) for Hugo's companion [MkDocs](http://www.mkdocs.org/). This port wouldn't be possible without him.
|
||||
|
||||
Furthermore, thanks to [Steve Francia](https://gihub.com/spf13) for creating Hugo and the [awesome community](https://github.com/spf13/hugo/graphs/contributors) around the project.
|
@ -1,27 +0,0 @@
|
||||
---
|
||||
date: 2016-03-09T20:10:46+01:00
|
||||
title: License
|
||||
weight: 40
|
||||
---
|
||||
|
||||
Copyright (c) 2016 Digitalcraftsman <digitalcraftsman@protonmail.com><br>
|
||||
Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
|
@ -1,27 +0,0 @@
|
||||
---
|
||||
date: 2016-03-09T20:08:11+01:00
|
||||
title: Roadmap
|
||||
weight: 30
|
||||
---
|
||||
|
||||
Quo vadis? The port of the original [Material theme](https://github.com/squidfunk/mkdocs-material) has replicated nearly all of its features. A few are still missing but I've good news: the Hugo community is actively working on this issues. Maybe with the next release of Hugo we can abandon this list. Stay tuned.
|
||||
|
||||
## Localization
|
||||
|
||||
Currently, it is possible to collect all strings in a single place for easy customization. However, this only enables you to define all strings in a single language. This approach is quite limiting in terms of localization support. Therefore, I decided to wait for a native integration. This way we can avoid a second setup of all strings in your website.
|
||||
|
||||
Keep an eye on [#1734](https://github.com/spf13/hugo/issues/1734).
|
||||
|
||||
## Search
|
||||
|
||||
Beside third-party services, some hacky workarounds and Grunt-/Gulp-based scripts that only require unnecessary dependencies, future versions of Hugo will support the generation of a content index as a core feature.
|
||||
|
||||
This approach plays well with this theme since MkDocs does the same.
|
||||
|
||||
Keep an eye on [#1853](https://github.com/spf13/hugo/pull/1853).
|
||||
|
||||
## Contributing
|
||||
|
||||
Did you found an bug or you would like to suggest a new feature? I'm open for feedback. Please open a new [issue](https://github.com/digitalcraftsman/hugo-material-docs/issues) and let me know.
|
||||
|
||||
You're also welcome to contribute with [pull requests](https://github.com/digitalcraftsman/hugo-material-docs/pulls).
|
@ -9,8 +9,8 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10" />
|
||||
<title>Contributing - Laradock Docs</title>
|
||||
<meta name="generator" content="Hugo 0.18.1" />
|
||||
<title>Contributing - Laradock</title>
|
||||
<meta name="generator" content="Hugo 0.19" />
|
||||
|
||||
|
||||
<meta name="description" content="Laradock documentations.">
|
||||
@ -21,9 +21,9 @@
|
||||
|
||||
|
||||
<meta property="og:url" content="http://laradock.io/contributing/">
|
||||
<meta property="og:title" content="Laradock Docs">
|
||||
<meta property="og:title" content="Laradock">
|
||||
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock Docs">
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
@ -71,10 +71,7 @@
|
||||
|
||||
|
||||
</head>
|
||||
<body class="palette-primary-purple palette-accent-deep-purple">
|
||||
|
||||
|
||||
|
||||
<body class="palette-primary-deep-purple palette-accent-purple">
|
||||
|
||||
|
||||
|
||||
@ -97,7 +94,7 @@
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="title">
|
||||
Contributing
|
||||
<b>Laradock</b> <span style="color: rgba(249, 245, 255, 0.63);"> / Contributing</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -105,8 +102,9 @@
|
||||
|
||||
|
||||
<div class="button button-github" role="button" aria-label="GitHub">
|
||||
<a href="https://github.com/laradock" title="@laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
<a style="padding: 0px; font-size:40px" href="https://github.com/laradock/laradock" title="@laradock/laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
</div>
|
||||
<p style="font-size: 18px; padding: 8px">Github</p>
|
||||
|
||||
|
||||
|
||||
@ -125,42 +123,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
<nav aria-label="Navigation">
|
||||
<a href="https://github.com/laradock/laradock" class="project">
|
||||
<div class="banner">
|
||||
|
||||
<div class="name">
|
||||
<strong>Laradock Docs </strong>
|
||||
|
||||
<br>
|
||||
laradock/laradock
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
|
||||
<ul class="repo">
|
||||
<li class="repo-download">
|
||||
<a href="https://github.com/laradock/laradock/archive/master.zip" target="_blank" title="Download" data-action="download">
|
||||
<i class="icon icon-download"></i> Download
|
||||
</a>
|
||||
</li>
|
||||
<li class="repo-stars">
|
||||
<a href="https://github.com/laradock/laradock/stargazers" target="_blank" title="Stargazers" data-action="star">
|
||||
<i class="icon icon-star"></i> Stars
|
||||
<span class="count">–</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="toc">
|
||||
|
||||
@ -302,18 +283,18 @@
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<span class="section">The author</span>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/laradock" target="_blank" title="@laradock on GitHub">
|
||||
@laradock on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -334,39 +315,52 @@
|
||||
|
||||
<p>Your contribution is more than welcome.</p>
|
||||
|
||||
<h2 id="got-a-question-or-problem">Got a Question or Problem?</h2>
|
||||
<h2 id="i-have-a-question-problem">I have a Question/Problem</h2>
|
||||
|
||||
<p>If you have questions about how to use LaraDock, please direct your questions to the discussion on <a href="https://gitter.im/LaraDock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as Question).</p>
|
||||
<p>If you have questions about how to use Laradock, please direct your questions to the discussion on <a href="https://gitter.im/Laradock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as <code>Question</code>) And you can still seek help on Gitter for it.</p>
|
||||
|
||||
<h2 id="found-an-issue">Found an Issue?</h2>
|
||||
<h2 id="i-found-an-issue">I found an Issue</h2>
|
||||
|
||||
<p>If you find a bug in the source code or a mistake in the documentation, you can help us by
|
||||
submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a>. Even better you can submit a Pull Request with a fix.</p>
|
||||
<p>If have an issue or you found a typo in the documentation, you can help us by
|
||||
opnening an <a href="https://github.com/laradock/laradock/issues">Issue</a>.</p>
|
||||
|
||||
<h2 id="want-a-feature">Want a Feature?</h2>
|
||||
<p><strong>Steps to do before opening an Issue:</strong></p>
|
||||
|
||||
<p>You can request a new feature by submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request.</p>
|
||||
<ol>
|
||||
<li><p>Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).</p></li>
|
||||
|
||||
<h2 id="edit-the-documentation">Edit the documentation</h2>
|
||||
<li><p>Decide if the Issue belongs to this project or to <a href="https://github.com/docker">Docker</a> itself! or even the tool you are using such as Nginx or MongoDB…</p></li>
|
||||
</ol>
|
||||
|
||||
<p>If your issue appears to be a bug, and hasn’t been reported, then open a new issue.</p>
|
||||
|
||||
<p><em>This Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.</em></p>
|
||||
|
||||
<h2 id="i-want-a-feature">I want a Feature</h2>
|
||||
|
||||
<p>You can request a new feature by submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as <code>Feature Suggestion</code>). If you would like to implement a new feature then consider submitting a Pull Request yourself.</p>
|
||||
|
||||
<h2 id="i-want-to-update-the-documentation-site">I want to update the Documentation (Site)</h2>
|
||||
|
||||
<p>Laradock uses <a href="https://gohugo.io/">Hugo</a> as website generator tool, with the <a href="http://themes.gohugo.io/theme/material-docs/">Material Docs theme</a>. You might need to check their docs quickly.</p>
|
||||
|
||||
<ol>
|
||||
<li>Install <a href="https://gohugo.io/">Hugo</a> on your machine.</li>
|
||||
<li>Clone laradock.</li>
|
||||
<li>Go to <code>/docs</code>.</li>
|
||||
<li>Delete everything except the <code>_settings</code> folder & the <code>CNAME</code> file.</li>
|
||||
<li>Open <code>docs/_settings</code> from your terminal and run <code>hugo serve</code> to host the website locally.</li>
|
||||
<li>Open the <code>docs/_settings/content</code> and search for the folder of the section you want to edit.</li>
|
||||
<li>In each secion there’s an <code>index.md</code> file, that’s the file you need to edit.</li>
|
||||
<li>To edit the sidebar (in case you are adding new section) go to <code>docs/_settings/config.toml</code> and add the section there.</li>
|
||||
<li>After done editing, run the this command <code>hugo</code> to generate the updated site inside the <code>docs</code> folder.</li>
|
||||
<li>Go back to the project root directory, commit and push..</li>
|
||||
<li>Install <a href="https://gohugo.io/">Hugo</a> on your machine (easy thing).</li>
|
||||
<li>Open the <code>DOCUMENTATION/_settings/content</code> and search for the markdown file you want to edit (every folder represents a section in the menu).</li>
|
||||
<li>Delete the <code>/docs</code> folder from the root.</li>
|
||||
<li>When you finish editing, go to <code>DOCUMENTATION/_settings/</code> and run the <code>hugo</code> command to generate the HTML docs (inside new <code>/docs</code> folder).</li>
|
||||
</ol>
|
||||
|
||||
<h2 id="coding-guidelines">Coding Guidelines</h2>
|
||||
<h3 id="to-host-the-website-locally">To Host the website locally</h3>
|
||||
|
||||
<h2 id="support-new-software">Support new Software</h2>
|
||||
<p>Go to <code>DOCUMENTATION/_settings</code> in your terminal and run <code>hugo serve</code> to host the website locally.</p>
|
||||
|
||||
<h3 id="edit-the-sidebar">Edit the sidebar</h3>
|
||||
|
||||
<p>To add a new section to the sidebar or edit existing one, you need to edit this file <code>DOCUMENTATION/_settings/config.toml</code>.</p>
|
||||
|
||||
<h2 id="how-to-support-new-software-add-new-container">How to support new Software (Add new Container)</h2>
|
||||
|
||||
<ul>
|
||||
<li><p>Create folder with the software name.</p></li>
|
||||
@ -379,10 +373,10 @@ submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a>. E
|
||||
|
||||
<li><p>Make sure you follow our commenting style.</p></li>
|
||||
|
||||
<li><p>Add the software in the <code>Readme</code>.</p></li>
|
||||
<li><p>Add the software in the <code>Documentation</code>.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="edit-existing-software">Edit existing Software</h2>
|
||||
<h2 id="edit-existing-software-edit-a-container">Edit existing Software (Edit a Container)</h2>
|
||||
|
||||
<ul>
|
||||
<li><p>Open the software (container) folder.</p></li>
|
||||
@ -390,22 +384,14 @@ submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a>. E
|
||||
<li><p>Edit the files you want to update.</p></li>
|
||||
|
||||
<li><p><strong>Note:</strong> If you want to edit the base image of the <code>Workspace</code> or the <code>php-fpm</code> Containers,
|
||||
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the LaraDock repository.</p></li>
|
||||
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the Laradock repository.</p></li>
|
||||
|
||||
<li><p>Make sure to update the <code>Readme</code> in case you made any changes.</p></li>
|
||||
<li><p>Make sure to update the <code>Documentation</code> in case you made any changes.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="issue-pr-submission-guidelines">Issue/PR Submission Guidelines</h2>
|
||||
<h2 id="pull-request">Pull Request</h2>
|
||||
|
||||
<h2 id="submitting-an-issue">Submitting an Issue</h2>
|
||||
|
||||
<p>Before you submit your issue search the archive, maybe your question was already answered.</p>
|
||||
|
||||
<p>If your issue appears to be a bug, and hasn’t been reported, open a new issue.
|
||||
Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.</p>
|
||||
|
||||
<h2 id="before-submitting-a-pull-request-pr">Before Submitting a Pull Request (PR)</h2>
|
||||
<h3 id="1-before-submitting-a-pull-request-pr">1. Before Submitting a Pull Request (PR)</h3>
|
||||
|
||||
<p>Always Test everything and make sure its working:</p>
|
||||
|
||||
@ -421,16 +407,16 @@ features, by not reporting duplicate issues.</p>
|
||||
|
||||
<ul>
|
||||
<li>Testing building the container (docker-compose build container-name) with no errors.</li>
|
||||
<li>Test it in real App.</li>
|
||||
<li>Test it in a real App if possible.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="submitting-a-pr">Submitting a PR</h2>
|
||||
<h3 id="2-submitting-a-pr">2. Submitting a PR</h3>
|
||||
|
||||
<p>Consider the following guidelines:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Search <a href="https://github.com/laradock/laradock/pulls">GitHub</a> for an open or closed Pull Request that relates to your submission. You don’t want to duplicate effort.</p></li>
|
||||
<li><p>Search <a href="https://github.com/laradock/laradock/pulls">GitHub</a> for an open or closed Pull Request that relates to your submission. You don’t want to duplicate efforts.</p></li>
|
||||
|
||||
<li><p>Make your changes in a new git branch:</p>
|
||||
|
||||
@ -465,10 +451,9 @@ git push origin my-fix-branch -f
|
||||
|
||||
<p><em>WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.</em></p>
|
||||
|
||||
<h2 id="after-your-pr-is-merged">After your PR is merged</h2>
|
||||
<h3 id="3-after-your-pr-is-merged">3. After your PR is merged</h3>
|
||||
|
||||
<p>After your pull request is merged, you can safely delete your branch and pull the changes
|
||||
from the main (upstream) repository:</p>
|
||||
<p>After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:</p>
|
||||
@ -494,7 +479,7 @@ from the main (upstream) repository:</p>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<h2 id="happy-coding">Happy Coding :)</h2>
|
||||
<h4 id="happy-coding">Happy Coding :)</h4>
|
||||
|
||||
|
||||
<aside class="copyright" role="note">
|
||||
@ -570,8 +555,8 @@ from the main (upstream) repository:</p>
|
||||
|
||||
<script>
|
||||
|
||||
var base_url = 'http:\/\/laradock.io\/';
|
||||
var repo_id = 'laradock\/laradock';
|
||||
var base_url = '';
|
||||
var repo_id = '';
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Contributings on Laradock Docs</title>
|
||||
<title>Contributings on Laradock</title>
|
||||
<link>http://laradock.io/contributing/index.xml</link>
|
||||
<description>Recent content in Contributings on Laradock Docs</description>
|
||||
<description>Recent content in Contributings on Laradock</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<atom:link href="http://laradock.io/contributing/index.xml" rel="self" type="application/rss+xml" />
|
||||
@ -18,39 +18,52 @@
|
||||
|
||||
<p>Your contribution is more than welcome.</p>
|
||||
|
||||
<h2 id="got-a-question-or-problem">Got a Question or Problem?</h2>
|
||||
<h2 id="i-have-a-question-problem">I have a Question/Problem</h2>
|
||||
|
||||
<p>If you have questions about how to use LaraDock, please direct your questions to the discussion on <a href="https://gitter.im/LaraDock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as Question).</p>
|
||||
<p>If you have questions about how to use Laradock, please direct your questions to the discussion on <a href="https://gitter.im/Laradock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as <code>Question</code>) And you can still seek help on Gitter for it.</p>
|
||||
|
||||
<h2 id="found-an-issue">Found an Issue?</h2>
|
||||
<h2 id="i-found-an-issue">I found an Issue</h2>
|
||||
|
||||
<p>If you find a bug in the source code or a mistake in the documentation, you can help us by
|
||||
submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a>. Even better you can submit a Pull Request with a fix.</p>
|
||||
<p>If have an issue or you found a typo in the documentation, you can help us by
|
||||
opnening an <a href="https://github.com/laradock/laradock/issues">Issue</a>.</p>
|
||||
|
||||
<h2 id="want-a-feature">Want a Feature?</h2>
|
||||
<p><strong>Steps to do before opening an Issue:</strong></p>
|
||||
|
||||
<p>You can request a new feature by submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request.</p>
|
||||
<ol>
|
||||
<li><p>Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).</p></li>
|
||||
|
||||
<h2 id="edit-the-documentation">Edit the documentation</h2>
|
||||
<li><p>Decide if the Issue belongs to this project or to <a href="https://github.com/docker">Docker</a> itself! or even the tool you are using such as Nginx or MongoDB&hellip;</p></li>
|
||||
</ol>
|
||||
|
||||
<p>If your issue appears to be a bug, and hasn&rsquo;t been reported, then open a new issue.</p>
|
||||
|
||||
<p><em>This Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.</em></p>
|
||||
|
||||
<h2 id="i-want-a-feature">I want a Feature</h2>
|
||||
|
||||
<p>You can request a new feature by submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as <code>Feature Suggestion</code>). If you would like to implement a new feature then consider submitting a Pull Request yourself.</p>
|
||||
|
||||
<h2 id="i-want-to-update-the-documentation-site">I want to update the Documentation (Site)</h2>
|
||||
|
||||
<p>Laradock uses <a href="https://gohugo.io/">Hugo</a> as website generator tool, with the <a href="http://themes.gohugo.io/theme/material-docs/">Material Docs theme</a>. You might need to check their docs quickly.</p>
|
||||
|
||||
<ol>
|
||||
<li>Install <a href="https://gohugo.io/">Hugo</a> on your machine.</li>
|
||||
<li>Clone laradock.</li>
|
||||
<li>Go to <code>/docs</code>.</li>
|
||||
<li>Delete everything except the <code>_settings</code> folder &amp; the <code>CNAME</code> file.</li>
|
||||
<li>Open <code>docs/_settings</code> from your terminal and run <code>hugo serve</code> to host the website locally.</li>
|
||||
<li>Open the <code>docs/_settings/content</code> and search for the folder of the section you want to edit.</li>
|
||||
<li>In each secion there&rsquo;s an <code>index.md</code> file, that&rsquo;s the file you need to edit.</li>
|
||||
<li>To edit the sidebar (in case you are adding new section) go to <code>docs/_settings/config.toml</code> and add the section there.</li>
|
||||
<li>After done editing, run the this command <code>hugo</code> to generate the updated site inside the <code>docs</code> folder.</li>
|
||||
<li>Go back to the project root directory, commit and push..</li>
|
||||
<li>Install <a href="https://gohugo.io/">Hugo</a> on your machine (easy thing).</li>
|
||||
<li>Open the <code>DOCUMENTATION/_settings/content</code> and search for the markdown file you want to edit (every folder represents a section in the menu).</li>
|
||||
<li>Delete the <code>/docs</code> folder from the root.</li>
|
||||
<li>When you finish editing, go to <code>DOCUMENTATION/_settings/</code> and run the <code>hugo</code> command to generate the HTML docs (inside new <code>/docs</code> folder).</li>
|
||||
</ol>
|
||||
|
||||
<h2 id="coding-guidelines">Coding Guidelines</h2>
|
||||
<h3 id="to-host-the-website-locally">To Host the website locally</h3>
|
||||
|
||||
<h2 id="support-new-software">Support new Software</h2>
|
||||
<p>Go to <code>DOCUMENTATION/_settings</code> in your terminal and run <code>hugo serve</code> to host the website locally.</p>
|
||||
|
||||
<h3 id="edit-the-sidebar">Edit the sidebar</h3>
|
||||
|
||||
<p>To add a new section to the sidebar or edit existing one, you need to edit this file <code>DOCUMENTATION/_settings/config.toml</code>.</p>
|
||||
|
||||
<h2 id="how-to-support-new-software-add-new-container">How to support new Software (Add new Container)</h2>
|
||||
|
||||
<ul>
|
||||
<li><p>Create folder with the software name.</p></li>
|
||||
@ -63,10 +76,10 @@ submitting an <a href="https://github.com/laradock/laradock/issues"&g
|
||||
|
||||
<li><p>Make sure you follow our commenting style.</p></li>
|
||||
|
||||
<li><p>Add the software in the <code>Readme</code>.</p></li>
|
||||
<li><p>Add the software in the <code>Documentation</code>.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="edit-existing-software">Edit existing Software</h2>
|
||||
<h2 id="edit-existing-software-edit-a-container">Edit existing Software (Edit a Container)</h2>
|
||||
|
||||
<ul>
|
||||
<li><p>Open the software (container) folder.</p></li>
|
||||
@ -74,22 +87,14 @@ submitting an <a href="https://github.com/laradock/laradock/issues"&g
|
||||
<li><p>Edit the files you want to update.</p></li>
|
||||
|
||||
<li><p><strong>Note:</strong> If you want to edit the base image of the <code>Workspace</code> or the <code>php-fpm</code> Containers,
|
||||
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the LaraDock repository.</p></li>
|
||||
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the Laradock repository.</p></li>
|
||||
|
||||
<li><p>Make sure to update the <code>Readme</code> in case you made any changes.</p></li>
|
||||
<li><p>Make sure to update the <code>Documentation</code> in case you made any changes.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="issue-pr-submission-guidelines">Issue/PR Submission Guidelines</h2>
|
||||
<h2 id="pull-request">Pull Request</h2>
|
||||
|
||||
<h2 id="submitting-an-issue">Submitting an Issue</h2>
|
||||
|
||||
<p>Before you submit your issue search the archive, maybe your question was already answered.</p>
|
||||
|
||||
<p>If your issue appears to be a bug, and hasn&rsquo;t been reported, open a new issue.
|
||||
Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.</p>
|
||||
|
||||
<h2 id="before-submitting-a-pull-request-pr">Before Submitting a Pull Request (PR)</h2>
|
||||
<h3 id="1-before-submitting-a-pull-request-pr">1. Before Submitting a Pull Request (PR)</h3>
|
||||
|
||||
<p>Always Test everything and make sure its working:</p>
|
||||
|
||||
@ -105,16 +110,16 @@ features, by not reporting duplicate issues.</p>
|
||||
|
||||
<ul>
|
||||
<li>Testing building the container (docker-compose build container-name) with no errors.</li>
|
||||
<li>Test it in real App.</li>
|
||||
<li>Test it in a real App if possible.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="submitting-a-pr">Submitting a PR</h2>
|
||||
<h3 id="2-submitting-a-pr">2. Submitting a PR</h3>
|
||||
|
||||
<p>Consider the following guidelines:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Search <a href="https://github.com/laradock/laradock/pulls">GitHub</a> for an open or closed Pull Request that relates to your submission. You don&rsquo;t want to duplicate effort.</p></li>
|
||||
<li><p>Search <a href="https://github.com/laradock/laradock/pulls">GitHub</a> for an open or closed Pull Request that relates to your submission. You don&rsquo;t want to duplicate efforts.</p></li>
|
||||
|
||||
<li><p>Make your changes in a new git branch:</p>
|
||||
|
||||
@ -149,10 +154,9 @@ git push origin my-fix-branch -f
|
||||
|
||||
<p><em>WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.</em></p>
|
||||
|
||||
<h2 id="after-your-pr-is-merged">After your PR is merged</h2>
|
||||
<h3 id="3-after-your-pr-is-merged">3. After your PR is merged</h3>
|
||||
|
||||
<p>After your pull request is merged, you can safely delete your branch and pull the changes
|
||||
from the main (upstream) repository:</p>
|
||||
<p>After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:</p>
|
||||
@ -178,7 +182,7 @@ from the main (upstream) repository:</p>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<h2 id="happy-coding">Happy Coding :)</h2>
|
||||
<h4 id="happy-coding">Happy Coding :)</h4>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10" />
|
||||
<title>Documentation - Laradock Docs</title>
|
||||
<meta name="generator" content="Hugo 0.18.1" />
|
||||
<title>Documentation - Laradock</title>
|
||||
<meta name="generator" content="Hugo 0.19" />
|
||||
|
||||
|
||||
<meta name="description" content="Laradock documentations.">
|
||||
@ -21,9 +21,9 @@
|
||||
|
||||
|
||||
<meta property="og:url" content="http://laradock.io/documentation/">
|
||||
<meta property="og:title" content="Laradock Docs">
|
||||
<meta property="og:title" content="Laradock">
|
||||
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock Docs">
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
@ -71,10 +71,7 @@
|
||||
|
||||
|
||||
</head>
|
||||
<body class="palette-primary-purple palette-accent-deep-purple">
|
||||
|
||||
|
||||
|
||||
<body class="palette-primary-deep-purple palette-accent-purple">
|
||||
|
||||
|
||||
|
||||
@ -97,7 +94,7 @@
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="title">
|
||||
Documentation
|
||||
<b>Laradock</b> <span style="color: rgba(249, 245, 255, 0.63);"> / Documentation</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -105,8 +102,9 @@
|
||||
|
||||
|
||||
<div class="button button-github" role="button" aria-label="GitHub">
|
||||
<a href="https://github.com/laradock" title="@laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
<a style="padding: 0px; font-size:40px" href="https://github.com/laradock/laradock" title="@laradock/laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
</div>
|
||||
<p style="font-size: 18px; padding: 8px">Github</p>
|
||||
|
||||
|
||||
|
||||
@ -125,42 +123,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
<nav aria-label="Navigation">
|
||||
<a href="https://github.com/laradock/laradock" class="project">
|
||||
<div class="banner">
|
||||
|
||||
<div class="name">
|
||||
<strong>Laradock Docs </strong>
|
||||
|
||||
<br>
|
||||
laradock/laradock
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
|
||||
<ul class="repo">
|
||||
<li class="repo-download">
|
||||
<a href="https://github.com/laradock/laradock/archive/master.zip" target="_blank" title="Download" data-action="download">
|
||||
<i class="icon icon-download"></i> Download
|
||||
</a>
|
||||
</li>
|
||||
<li class="repo-stars">
|
||||
<a href="https://github.com/laradock/laradock/stargazers" target="_blank" title="Stargazers" data-action="star">
|
||||
<i class="icon icon-star"></i> Stars
|
||||
<span class="count">–</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="toc">
|
||||
|
||||
@ -302,18 +283,18 @@
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<span class="section">The author</span>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/laradock" target="_blank" title="@laradock on GitHub">
|
||||
@laradock on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -466,6 +447,11 @@ example for <code>mysql</code> it will be <code>mysql/Dockerfile</code>.</p>
|
||||
<pre><code class="language-bash">docker logs {container-name}
|
||||
</code></pre>
|
||||
|
||||
<p>More <a href="https://docs.docker.com/compose/reference/logs/">options</a></p>
|
||||
|
||||
<pre><code class="language-bash">docker logs -f {container-name}
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
<a name="PHP"></a></p>
|
||||
|
||||
@ -596,7 +582,7 @@ xdebug.remote_connect_back=1
|
||||
|
||||
<p>By installing xDebug, you are enabling it to run on startup by default.</p>
|
||||
|
||||
<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the LaraDock root folder, (at the same prompt where you run docker-compose):</p>
|
||||
<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the Laradock root folder, (at the same prompt where you run docker-compose):</p>
|
||||
|
||||
<ul>
|
||||
<li>Stop xDebug from running by default: <code>./xdebugPhpFpm stop</code>.</li>
|
||||
@ -636,11 +622,11 @@ xdebug.remote_connect_back=1
|
||||
<a name="Production"></a></p>
|
||||
|
||||
<p><br>
|
||||
<a name="LaraDock-for-Production"></a></p>
|
||||
<a name="Laradock-for-Production"></a></p>
|
||||
|
||||
<h2 id="prepare-laradock-for-production">Prepare LaraDock for Production</h2>
|
||||
<h2 id="prepare-laradock-for-production">Prepare Laradock for Production</h2>
|
||||
|
||||
<p>It’s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, LaraDock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p>
|
||||
<p>It’s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, Laradock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p>
|
||||
|
||||
<p>Note: The Database (MySQL/MariaDB/…) ports should not be forwarded on production, because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. So make sure to remove these lines:</p>
|
||||
|
||||
@ -681,7 +667,7 @@ xdebug.remote_connect_back=1
|
||||
|
||||
<p>3 - Edit <code>docker-compose.yml</code> to Map the new application path:</p>
|
||||
|
||||
<p>By default, LaraDock assumes the Laravel application is living in the parent directory of the laradock folder.</p>
|
||||
<p>By default, Laradock assumes the Laravel application is living in the parent directory of the laradock folder.</p>
|
||||
|
||||
<p>Since the new Laravel application is in the <code>my-cool-app</code> folder, we need to replace <code>../:/var/www</code> with <code>../my-cool-app/:/var/www</code>, as follow:</p>
|
||||
|
||||
@ -697,7 +683,7 @@ xdebug.remote_connect_back=1
|
||||
<pre><code class="language-bash">cd my-cool-app
|
||||
</code></pre>
|
||||
|
||||
<p>5 - Go back to the LaraDock installation steps to see how to edit the <code>.env</code> file.</p>
|
||||
<p>5 - Go back to the Laradock installation steps to see how to edit the <code>.env</code> file.</p>
|
||||
|
||||
<p><br>
|
||||
<a name="Run-Artisan-Commands"></a></p>
|
||||
@ -799,7 +785,7 @@ SESSION_DRIVER=redis
|
||||
|
||||
<p>5 - You can manually test it from Laravel with this code:</p>
|
||||
|
||||
<pre><code class="language-php">\Cache::store('redis')->put('LaraDock', 'Awesome', 10);
|
||||
<pre><code class="language-php">\Cache::store('redis')->put('Laradock', 'Awesome', 10);
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
@ -902,6 +888,18 @@ docker-compose up -d mariadb phpmyadmin
|
||||
|
||||
<p>2 - Open your browser and visit the localhost on port <strong>8080</strong>: <code>http://localhost:8080</code></p>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-Adminer"></a></p>
|
||||
|
||||
<h2 id="use-adminer">Use Adminer</h2>
|
||||
|
||||
<p>1 - Run the Adminer Container (<code>adminer</code>) with the <code>docker-compose up</code> command. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d adminer
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Open your browser and visit the localhost on port <strong>8080</strong>: <code>http://localhost:8080</code></p>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-pgAdmin"></a></p>
|
||||
|
||||
@ -1028,6 +1026,36 @@ A package (<a href="https://github.com/duxet/laravel-rethinkdb">Laravel RethinkD
|
||||
<li>set the <code>DB_DATABASE</code> to <code>database</code>.</li>
|
||||
</ul>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-Minio"></a></p>
|
||||
|
||||
<h2 id="use-minio">Use Minio</h2>
|
||||
|
||||
<p>1 - Configure Minio:
|
||||
- On the workspace container, change <code>INSTALL_MC</code> to true to get the client
|
||||
- Set <code>MINIO_ACCESS_KEY</code> and <code>MINIO_ACCESS_SECRET</code> if you wish to set proper keys</p>
|
||||
|
||||
<p>2 - Run the Minio Container (<code>minio</code>) with the <code>docker-compose up</code> command. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d minio
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Open your browser and visit the localhost on port <strong>9000</strong> at the following URL: <code>http://localhost:9000</code></p>
|
||||
|
||||
<p>4 - Create a bucket either through the webui or using the mc client:</p>
|
||||
|
||||
<pre><code class="language-bash"> mc mb minio/bucket
|
||||
</code></pre>
|
||||
|
||||
<p>5 - When configuring your other clients use the following details:</p>
|
||||
|
||||
<pre><code> S3_HOST=http://minio
|
||||
S3_KEY=access
|
||||
S3_SECRET=secretkey
|
||||
S3_REGION=us-east-1
|
||||
S3_BUCKET=bucket
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
<a name="CodeIgniter"></a></p>
|
||||
|
||||
@ -1036,7 +1064,7 @@ A package (<a href="https://github.com/duxet/laravel-rethinkdb">Laravel RethinkD
|
||||
|
||||
<h2 id="install-codeigniter">Install CodeIgniter</h2>
|
||||
|
||||
<p>To install CodeIgniter 3 on LaraDock all you have to do is the following simple steps:</p>
|
||||
<p>To install CodeIgniter 3 on Laradock all you have to do is the following simple steps:</p>
|
||||
|
||||
<p>1 - Open the <code>docker-compose.yml</code> file.</p>
|
||||
|
||||
@ -1276,7 +1304,7 @@ port=1234
|
||||
|
||||
<h2 id="common-terminal-aliases">Common Terminal Aliases</h2>
|
||||
|
||||
<p>When you start your docker container, LaraDock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p>
|
||||
<p>When you start your docker container, Laradock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p>
|
||||
|
||||
<p>You are free to modify the <code>aliases.sh</code> as you see fit, adding your own aliases (or function macros) to suit your requirements.</p>
|
||||
|
||||
@ -1351,12 +1379,12 @@ e) set it to <code>true</code></p>
|
||||
<p><a href="https://github.com/laradock/laradock/blob/master/_guides/phpstorm.md"><strong>Debugging Guide Here</strong></a></p>
|
||||
|
||||
<p><br>
|
||||
<a name="keep-tracking-LaraDock"></a></p>
|
||||
<a name="keep-tracking-Laradock"></a></p>
|
||||
|
||||
<h2 id="keep-track-of-your-laradock-changes">Keep track of your LaraDock changes</h2>
|
||||
<h2 id="keep-track-of-your-laradock-changes">Keep track of your Laradock changes</h2>
|
||||
|
||||
<ol>
|
||||
<li>Fork the LaraDock repository.</li>
|
||||
<li>Fork the Laradock repository.</li>
|
||||
<li>Use that fork as a submodule.</li>
|
||||
<li>Commit all your changes to your fork.</li>
|
||||
<li>Pull new stuff from the main repository from time to time.</li>
|
||||
@ -1365,15 +1393,15 @@ e) set it to <code>true</code></p>
|
||||
<p><br>
|
||||
<a name="upgrading-laradock"></a></p>
|
||||
|
||||
<h2 id="upgrading-laradock">Upgrading LaraDock</h2>
|
||||
<h2 id="upgrading-laradock">Upgrading Laradock</h2>
|
||||
|
||||
<p>Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading LaraDock from v3.* to v4.*:</p>
|
||||
<p>Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading Laradock from v3.* to v4.*:</p>
|
||||
|
||||
<ol>
|
||||
<li>Stop the docker VM <code>docker-machine stop {default}</code></li>
|
||||
<li>Install Docker for <a href="https://docs.docker.com/docker-for-mac/">Mac</a> or <a href="https://docs.docker.com/docker-for-windows/">Windows</a>.</li>
|
||||
<li>Upgrade LaraDock to <code>v4.*.*</code> (<code>git pull origin master</code>)</li>
|
||||
<li>Use LaraDock as you used to do: <code>docker-compose up -d nginx mysql</code>.</li>
|
||||
<li>Upgrade Laradock to <code>v4.*.*</code> (<code>git pull origin master</code>)</li>
|
||||
<li>Use Laradock as you used to do: <code>docker-compose up -d nginx mysql</code>.</li>
|
||||
</ol>
|
||||
|
||||
<p><strong>Note:</strong> If you face any problem with the last step above: rebuild all your containers
|
||||
@ -1385,13 +1413,27 @@ e) set it to <code>true</code></p>
|
||||
|
||||
<h2 id="improve-speed-on-macos">Improve speed on MacOS</h2>
|
||||
|
||||
<p>Sharing code into Docker containers with osxfs have very poor performance compared to Linux. You can get around this issue by using NFS to share your files betwen your host and your container.</p>
|
||||
<p>Sharing code into Docker containers with osxfs have very poor performance compared to Linux. Likely there are some workarounds:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>How to share files using NFS (d4m-nfs)</p>
|
||||
</blockquote>
|
||||
<h3 id="workaround-a-using-dinghy">Workaround A: using dinghy</h3>
|
||||
|
||||
<p><a href="https://github.com/IFSight/d4m-nfs">d4m-nfs</a> automatically mount NFS volume instead of osxfs one.</p>
|
||||
<p><a href="https://github.com/codekitchen/dinghy">Dinghy</a> creates its own VM using docker-machine, it will not modify your existing docker-machine VMs.</p>
|
||||
|
||||
<p>Quick Setup giude, (we recommend you check their docs)</p>
|
||||
|
||||
<p>1) <code>brew tap codekitchen/dinghy</code></p>
|
||||
|
||||
<p>2) <code>brew install dinghy</code></p>
|
||||
|
||||
<p>3) <code>dinghy create --provider virtualbox</code> (must have virtualbox installed, but they support other providers if you prefer)</p>
|
||||
|
||||
<p>4) after the above command is done it will display some env variables, copy them to the bash profile or zsh or.. (this will instruct docker to use the server running inside the VM)</p>
|
||||
|
||||
<p>5) <code>docker-compose up ...</code></p>
|
||||
|
||||
<h3 id="workaround-b-using-d4m-nfs">Workaround B: using d4m-nfs</h3>
|
||||
|
||||
<p><a href="https://github.com/IFSight/d4m-nfs">D4m-nfs</a> automatically mount NFS volume instead of osxfs one.</p>
|
||||
|
||||
<p>1) Update the Docker [File Sharing] preferences:</p>
|
||||
|
||||
@ -1407,23 +1449,30 @@ e) set it to <code>true</code></p>
|
||||
<p>4) Create (or edit) the file <code>~/d4m-nfs/etc/d4m-nfs-mounts.txt</code>, and write the follwing configuration in it:</p>
|
||||
|
||||
<pre><code class="language-txt">/Users:/Users
|
||||
/Volumes:/Volumes
|
||||
/private:/private
|
||||
</code></pre>
|
||||
|
||||
<p>5) Create (or edit) the file <code>/etc/exports</code>, make sure it exists and is empty. (There may be collisions if you come from Vagrant or if you already executed the <code>d4m-nfs.sh</code> script before).</p>
|
||||
|
||||
<p>6) Run the <code>d4m-nfs.sh</code> script:</p>
|
||||
<p>6) Run the <code>d4m-nfs.sh</code> script (might need Sudo):</p>
|
||||
|
||||
<pre><code class="language-bash">~/d4m-nfs/d4m-nfs.sh
|
||||
</code></pre>
|
||||
|
||||
<p>That’s it! Run your containers.. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d nginx mysql
|
||||
<pre><code class="language-bash">docker-compose up ...
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note:</strong> If you faced any errors, try restarting Docker, and make sure you have no spaces in the <code>d4m-nfs-mounts.txt</code> file, and your <code>/etc/exports</code> file is clear.</p>
|
||||
<p><em>Note: If you faced any errors, try restarting Docker, and make sure you have no spaces in the <code>d4m-nfs-mounts.txt</code> file, and your <code>/etc/exports</code> file is clear.</em></p>
|
||||
|
||||
<h3 id="other-good-workarounds">Other good workarounds:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/EugenMayer/docker-sync">docker-sync</a></li>
|
||||
<li>Add more here..</li>
|
||||
</ul>
|
||||
|
||||
<p>More details about this issue <a href="https://github.com/docker/for-mac/issues/77">here</a>.</p>
|
||||
|
||||
<p><br>
|
||||
<a name="Common-Problems"></a></p>
|
||||
@ -1489,7 +1538,7 @@ e) set it to <code>true</code></p>
|
||||
<li>Option B
|
||||
|
||||
<ol>
|
||||
<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The LaraDock docker-compose file currently has this as <code>mysql</code></li>
|
||||
<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as <code>mysql</code></li>
|
||||
</ol></li>
|
||||
</ul>
|
||||
|
||||
@ -1567,8 +1616,8 @@ e) set it to <code>true</code></p>
|
||||
|
||||
<script>
|
||||
|
||||
var base_url = 'http:\/\/laradock.io\/';
|
||||
var repo_id = 'laradock\/laradock';
|
||||
var base_url = '';
|
||||
var repo_id = '';
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Documentations on Laradock Docs</title>
|
||||
<title>Documentations on Laradock</title>
|
||||
<link>http://laradock.io/documentation/index.xml</link>
|
||||
<description>Recent content in Documentations on Laradock Docs</description>
|
||||
<description>Recent content in Documentations on Laradock</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<atom:link href="http://laradock.io/documentation/index.xml" rel="self" type="application/rss+xml" />
|
||||
@ -150,6 +150,11 @@ example for <code>mysql</code> it will be <code>mysql/Dockerfi
|
||||
<pre><code class="language-bash">docker logs {container-name}
|
||||
</code></pre>
|
||||
|
||||
<p>More <a href="https://docs.docker.com/compose/reference/logs/">options</a></p>
|
||||
|
||||
<pre><code class="language-bash">docker logs -f {container-name}
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
<a name="PHP"></a></p>
|
||||
|
||||
@ -280,7 +285,7 @@ xdebug.remote_connect_back=1
|
||||
|
||||
<p>By installing xDebug, you are enabling it to run on startup by default.</p>
|
||||
|
||||
<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the LaraDock root folder, (at the same prompt where you run docker-compose):</p>
|
||||
<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the Laradock root folder, (at the same prompt where you run docker-compose):</p>
|
||||
|
||||
<ul>
|
||||
<li>Stop xDebug from running by default: <code>./xdebugPhpFpm stop</code>.</li>
|
||||
@ -320,11 +325,11 @@ xdebug.remote_connect_back=1
|
||||
<a name="Production"></a></p>
|
||||
|
||||
<p><br>
|
||||
<a name="LaraDock-for-Production"></a></p>
|
||||
<a name="Laradock-for-Production"></a></p>
|
||||
|
||||
<h2 id="prepare-laradock-for-production">Prepare LaraDock for Production</h2>
|
||||
<h2 id="prepare-laradock-for-production">Prepare Laradock for Production</h2>
|
||||
|
||||
<p>It&rsquo;s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, LaraDock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p>
|
||||
<p>It&rsquo;s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, Laradock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p>
|
||||
|
||||
<p>Note: The Database (MySQL/MariaDB/&hellip;) ports should not be forwarded on production, because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. So make sure to remove these lines:</p>
|
||||
|
||||
@ -365,7 +370,7 @@ xdebug.remote_connect_back=1
|
||||
|
||||
<p>3 - Edit <code>docker-compose.yml</code> to Map the new application path:</p>
|
||||
|
||||
<p>By default, LaraDock assumes the Laravel application is living in the parent directory of the laradock folder.</p>
|
||||
<p>By default, Laradock assumes the Laravel application is living in the parent directory of the laradock folder.</p>
|
||||
|
||||
<p>Since the new Laravel application is in the <code>my-cool-app</code> folder, we need to replace <code>../:/var/www</code> with <code>../my-cool-app/:/var/www</code>, as follow:</p>
|
||||
|
||||
@ -381,7 +386,7 @@ xdebug.remote_connect_back=1
|
||||
<pre><code class="language-bash">cd my-cool-app
|
||||
</code></pre>
|
||||
|
||||
<p>5 - Go back to the LaraDock installation steps to see how to edit the <code>.env</code> file.</p>
|
||||
<p>5 - Go back to the Laradock installation steps to see how to edit the <code>.env</code> file.</p>
|
||||
|
||||
<p><br>
|
||||
<a name="Run-Artisan-Commands"></a></p>
|
||||
@ -483,7 +488,7 @@ SESSION_DRIVER=redis
|
||||
|
||||
<p>5 - You can manually test it from Laravel with this code:</p>
|
||||
|
||||
<pre><code class="language-php">\Cache::store('redis')-&gt;put('LaraDock', 'Awesome', 10);
|
||||
<pre><code class="language-php">\Cache::store('redis')-&gt;put('Laradock', 'Awesome', 10);
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
@ -586,6 +591,18 @@ docker-compose up -d mariadb phpmyadmin
|
||||
|
||||
<p>2 - Open your browser and visit the localhost on port <strong>8080</strong>: <code>http://localhost:8080</code></p>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-Adminer"></a></p>
|
||||
|
||||
<h2 id="use-adminer">Use Adminer</h2>
|
||||
|
||||
<p>1 - Run the Adminer Container (<code>adminer</code>) with the <code>docker-compose up</code> command. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d adminer
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Open your browser and visit the localhost on port <strong>8080</strong>: <code>http://localhost:8080</code></p>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-pgAdmin"></a></p>
|
||||
|
||||
@ -712,6 +729,36 @@ A package (<a href="https://github.com/duxet/laravel-rethinkdb">La
|
||||
<li>set the <code>DB_DATABASE</code> to <code>database</code>.</li>
|
||||
</ul>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-Minio"></a></p>
|
||||
|
||||
<h2 id="use-minio">Use Minio</h2>
|
||||
|
||||
<p>1 - Configure Minio:
|
||||
- On the workspace container, change <code>INSTALL_MC</code> to true to get the client
|
||||
- Set <code>MINIO_ACCESS_KEY</code> and <code>MINIO_ACCESS_SECRET</code> if you wish to set proper keys</p>
|
||||
|
||||
<p>2 - Run the Minio Container (<code>minio</code>) with the <code>docker-compose up</code> command. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d minio
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Open your browser and visit the localhost on port <strong>9000</strong> at the following URL: <code>http://localhost:9000</code></p>
|
||||
|
||||
<p>4 - Create a bucket either through the webui or using the mc client:</p>
|
||||
|
||||
<pre><code class="language-bash"> mc mb minio/bucket
|
||||
</code></pre>
|
||||
|
||||
<p>5 - When configuring your other clients use the following details:</p>
|
||||
|
||||
<pre><code> S3_HOST=http://minio
|
||||
S3_KEY=access
|
||||
S3_SECRET=secretkey
|
||||
S3_REGION=us-east-1
|
||||
S3_BUCKET=bucket
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
<a name="CodeIgniter"></a></p>
|
||||
|
||||
@ -720,7 +767,7 @@ A package (<a href="https://github.com/duxet/laravel-rethinkdb">La
|
||||
|
||||
<h2 id="install-codeigniter">Install CodeIgniter</h2>
|
||||
|
||||
<p>To install CodeIgniter 3 on LaraDock all you have to do is the following simple steps:</p>
|
||||
<p>To install CodeIgniter 3 on Laradock all you have to do is the following simple steps:</p>
|
||||
|
||||
<p>1 - Open the <code>docker-compose.yml</code> file.</p>
|
||||
|
||||
@ -960,7 +1007,7 @@ port=1234
|
||||
|
||||
<h2 id="common-terminal-aliases">Common Terminal Aliases</h2>
|
||||
|
||||
<p>When you start your docker container, LaraDock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p>
|
||||
<p>When you start your docker container, Laradock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p>
|
||||
|
||||
<p>You are free to modify the <code>aliases.sh</code> as you see fit, adding your own aliases (or function macros) to suit your requirements.</p>
|
||||
|
||||
@ -1035,12 +1082,12 @@ e) set it to <code>true</code></p>
|
||||
<p><a href="https://github.com/laradock/laradock/blob/master/_guides/phpstorm.md"><strong>Debugging Guide Here</strong></a></p>
|
||||
|
||||
<p><br>
|
||||
<a name="keep-tracking-LaraDock"></a></p>
|
||||
<a name="keep-tracking-Laradock"></a></p>
|
||||
|
||||
<h2 id="keep-track-of-your-laradock-changes">Keep track of your LaraDock changes</h2>
|
||||
<h2 id="keep-track-of-your-laradock-changes">Keep track of your Laradock changes</h2>
|
||||
|
||||
<ol>
|
||||
<li>Fork the LaraDock repository.</li>
|
||||
<li>Fork the Laradock repository.</li>
|
||||
<li>Use that fork as a submodule.</li>
|
||||
<li>Commit all your changes to your fork.</li>
|
||||
<li>Pull new stuff from the main repository from time to time.</li>
|
||||
@ -1049,15 +1096,15 @@ e) set it to <code>true</code></p>
|
||||
<p><br>
|
||||
<a name="upgrading-laradock"></a></p>
|
||||
|
||||
<h2 id="upgrading-laradock">Upgrading LaraDock</h2>
|
||||
<h2 id="upgrading-laradock">Upgrading Laradock</h2>
|
||||
|
||||
<p>Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading LaraDock from v3.* to v4.*:</p>
|
||||
<p>Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading Laradock from v3.* to v4.*:</p>
|
||||
|
||||
<ol>
|
||||
<li>Stop the docker VM <code>docker-machine stop {default}</code></li>
|
||||
<li>Install Docker for <a href="https://docs.docker.com/docker-for-mac/">Mac</a> or <a href="https://docs.docker.com/docker-for-windows/">Windows</a>.</li>
|
||||
<li>Upgrade LaraDock to <code>v4.*.*</code> (<code>git pull origin master</code>)</li>
|
||||
<li>Use LaraDock as you used to do: <code>docker-compose up -d nginx mysql</code>.</li>
|
||||
<li>Upgrade Laradock to <code>v4.*.*</code> (<code>git pull origin master</code>)</li>
|
||||
<li>Use Laradock as you used to do: <code>docker-compose up -d nginx mysql</code>.</li>
|
||||
</ol>
|
||||
|
||||
<p><strong>Note:</strong> If you face any problem with the last step above: rebuild all your containers
|
||||
@ -1069,13 +1116,27 @@ e) set it to <code>true</code></p>
|
||||
|
||||
<h2 id="improve-speed-on-macos">Improve speed on MacOS</h2>
|
||||
|
||||
<p>Sharing code into Docker containers with osxfs have very poor performance compared to Linux. You can get around this issue by using NFS to share your files betwen your host and your container.</p>
|
||||
<p>Sharing code into Docker containers with osxfs have very poor performance compared to Linux. Likely there are some workarounds:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>How to share files using NFS (d4m-nfs)</p>
|
||||
</blockquote>
|
||||
<h3 id="workaround-a-using-dinghy">Workaround A: using dinghy</h3>
|
||||
|
||||
<p><a href="https://github.com/IFSight/d4m-nfs">d4m-nfs</a> automatically mount NFS volume instead of osxfs one.</p>
|
||||
<p><a href="https://github.com/codekitchen/dinghy">Dinghy</a> creates its own VM using docker-machine, it will not modify your existing docker-machine VMs.</p>
|
||||
|
||||
<p>Quick Setup giude, (we recommend you check their docs)</p>
|
||||
|
||||
<p>1) <code>brew tap codekitchen/dinghy</code></p>
|
||||
|
||||
<p>2) <code>brew install dinghy</code></p>
|
||||
|
||||
<p>3) <code>dinghy create --provider virtualbox</code> (must have virtualbox installed, but they support other providers if you prefer)</p>
|
||||
|
||||
<p>4) after the above command is done it will display some env variables, copy them to the bash profile or zsh or.. (this will instruct docker to use the server running inside the VM)</p>
|
||||
|
||||
<p>5) <code>docker-compose up ...</code></p>
|
||||
|
||||
<h3 id="workaround-b-using-d4m-nfs">Workaround B: using d4m-nfs</h3>
|
||||
|
||||
<p><a href="https://github.com/IFSight/d4m-nfs">D4m-nfs</a> automatically mount NFS volume instead of osxfs one.</p>
|
||||
|
||||
<p>1) Update the Docker [File Sharing] preferences:</p>
|
||||
|
||||
@ -1091,23 +1152,30 @@ e) set it to <code>true</code></p>
|
||||
<p>4) Create (or edit) the file <code>~/d4m-nfs/etc/d4m-nfs-mounts.txt</code>, and write the follwing configuration in it:</p>
|
||||
|
||||
<pre><code class="language-txt">/Users:/Users
|
||||
/Volumes:/Volumes
|
||||
/private:/private
|
||||
</code></pre>
|
||||
|
||||
<p>5) Create (or edit) the file <code>/etc/exports</code>, make sure it exists and is empty. (There may be collisions if you come from Vagrant or if you already executed the <code>d4m-nfs.sh</code> script before).</p>
|
||||
|
||||
<p>6) Run the <code>d4m-nfs.sh</code> script:</p>
|
||||
<p>6) Run the <code>d4m-nfs.sh</code> script (might need Sudo):</p>
|
||||
|
||||
<pre><code class="language-bash">~/d4m-nfs/d4m-nfs.sh
|
||||
</code></pre>
|
||||
|
||||
<p>That&rsquo;s it! Run your containers.. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d nginx mysql
|
||||
<pre><code class="language-bash">docker-compose up ...
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note:</strong> If you faced any errors, try restarting Docker, and make sure you have no spaces in the <code>d4m-nfs-mounts.txt</code> file, and your <code>/etc/exports</code> file is clear.</p>
|
||||
<p><em>Note: If you faced any errors, try restarting Docker, and make sure you have no spaces in the <code>d4m-nfs-mounts.txt</code> file, and your <code>/etc/exports</code> file is clear.</em></p>
|
||||
|
||||
<h3 id="other-good-workarounds">Other good workarounds:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/EugenMayer/docker-sync">docker-sync</a></li>
|
||||
<li>Add more here..</li>
|
||||
</ul>
|
||||
|
||||
<p>More details about this issue <a href="https://github.com/docker/for-mac/issues/77">here</a>.</p>
|
||||
|
||||
<p><br>
|
||||
<a name="Common-Problems"></a></p>
|
||||
@ -1173,7 +1241,7 @@ e) set it to <code>true</code></p>
|
||||
<li>Option B
|
||||
|
||||
<ol>
|
||||
<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The LaraDock docker-compose file currently has this as <code>mysql</code></li>
|
||||
<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as <code>mysql</code></li>
|
||||
</ol></li>
|
||||
</ul>
|
||||
</description>
|
||||
|
@ -9,8 +9,8 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10" />
|
||||
<title>Getting Started - Laradock Docs</title>
|
||||
<meta name="generator" content="Hugo 0.18.1" />
|
||||
<title>Getting Started - Laradock</title>
|
||||
<meta name="generator" content="Hugo 0.19" />
|
||||
|
||||
|
||||
<meta name="description" content="Laradock documentations.">
|
||||
@ -21,9 +21,9 @@
|
||||
|
||||
|
||||
<meta property="og:url" content="http://laradock.io/getting-started/">
|
||||
<meta property="og:title" content="Laradock Docs">
|
||||
<meta property="og:title" content="Laradock">
|
||||
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock Docs">
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
@ -71,10 +71,7 @@
|
||||
|
||||
|
||||
</head>
|
||||
<body class="palette-primary-purple palette-accent-deep-purple">
|
||||
|
||||
|
||||
|
||||
<body class="palette-primary-deep-purple palette-accent-purple">
|
||||
|
||||
|
||||
|
||||
@ -97,7 +94,7 @@
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="title">
|
||||
Getting Started
|
||||
<b>Laradock</b> <span style="color: rgba(249, 245, 255, 0.63);"> / Getting Started</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -105,8 +102,9 @@
|
||||
|
||||
|
||||
<div class="button button-github" role="button" aria-label="GitHub">
|
||||
<a href="https://github.com/laradock" title="@laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
<a style="padding: 0px; font-size:40px" href="https://github.com/laradock/laradock" title="@laradock/laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
</div>
|
||||
<p style="font-size: 18px; padding: 8px">Github</p>
|
||||
|
||||
|
||||
|
||||
@ -125,42 +123,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
<nav aria-label="Navigation">
|
||||
<a href="https://github.com/laradock/laradock" class="project">
|
||||
<div class="banner">
|
||||
|
||||
<div class="name">
|
||||
<strong>Laradock Docs </strong>
|
||||
|
||||
<br>
|
||||
laradock/laradock
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
|
||||
<ul class="repo">
|
||||
<li class="repo-download">
|
||||
<a href="https://github.com/laradock/laradock/archive/master.zip" target="_blank" title="Download" data-action="download">
|
||||
<i class="icon icon-download"></i> Download
|
||||
</a>
|
||||
</li>
|
||||
<li class="repo-stars">
|
||||
<a href="https://github.com/laradock/laradock/stargazers" target="_blank" title="Stargazers" data-action="star">
|
||||
<i class="icon icon-star"></i> Stars
|
||||
<span class="count">–</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="toc">
|
||||
|
||||
@ -302,18 +283,18 @@
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<span class="section">The author</span>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/laradock" target="_blank" title="@laradock on GitHub">
|
||||
@laradock on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -343,88 +324,123 @@
|
||||
|
||||
<p>Choose the setup the best suits your needs.</p>
|
||||
|
||||
<h4 id="a-setup-for-single-project">A) Setup for Single Project:</h4>
|
||||
<ul>
|
||||
<li><a href="#A">A) Setup for Single Project</a>
|
||||
|
||||
<p><em>(In case you want a Docker environment for each project)</em></p>
|
||||
<ul>
|
||||
<li><a href="#A1">A.1) Already have a PHP project</a></li>
|
||||
<li><a href="#A2">A.2) Don’t have a PHP project yet</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#B">B) Setup for Multiple Projects</a></li>
|
||||
</ul>
|
||||
|
||||
<h5 id="a-1-setup-environment-in-existing-project">A.1) Setup environment in existing Project:</h5>
|
||||
<p><a name="A"></a></p>
|
||||
|
||||
<p><em>(In case you already have a project, and you want to setup an environment to run it)</em></p>
|
||||
<h3 id="a-setup-for-single-project">A) Setup for Single Project</h3>
|
||||
|
||||
<p>1 - Clone this repository on your project root directory:</p>
|
||||
<blockquote>
|
||||
<p>(Follow these steps if you want a separate Docker environment for each project)</p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="A1"></a></p>
|
||||
|
||||
<h3 id="a-1-already-have-a-php-project">A.1) Already have a PHP project:</h3>
|
||||
|
||||
<p>1 - Clone laradock on your project root directory:</p>
|
||||
|
||||
<pre><code class="language-bash">git submodule add https://github.com/Laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p><em>Note 1: If you are not yet using Git for your PHP project, you can use <code>git clone https://github.com/Laradock/laradock.git</code> instead.</em></p>
|
||||
<p><strong>Notes:</strong></p>
|
||||
|
||||
<p><em>Note 2: To keep track of your LaraDock changes, between your projects and also keep LaraDock updated. <a href="#keep-tracking-LaraDock">Check this</a></em></p>
|
||||
<ul>
|
||||
<li><p>If you are not using Git yet for your project, you can use <code>git clone</code> instead of <code>git submodule</code>.</p></li>
|
||||
|
||||
<p><em>Note 3: In this case the folder structure will be like this:</em></p>
|
||||
<li><p>Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. <a href="http://laradock.io/documentation/#keep-track-of-your-laradock-changes">Check this</a></p></li>
|
||||
</ul>
|
||||
|
||||
<pre><code>- project1
|
||||
- laradock
|
||||
- project2
|
||||
- laradock
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code>+ project-a
|
||||
+ laradock-a
|
||||
+ project-b
|
||||
+ laradock-b
|
||||
</code></pre>
|
||||
|
||||
<h5 id="a-2-setup-environment-first-then-create-project">A.2) Setup environment first then create project:</h5>
|
||||
<p>(It’s important to rename the folders differently in each project.)</p>
|
||||
|
||||
<p><em>(In case you don’t have a project, and you want to create your project inside the Docker environment)</em></p>
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="A2"></a></p>
|
||||
|
||||
<h3 id="a-2-don-t-have-a-php-project-yet">A.2) Don’t have a PHP project yet:</h3>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine:</p>
|
||||
|
||||
<pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>Note: In this case the folder structure will be like this:</p>
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code>- projects
|
||||
- laradock
|
||||
- myProject
|
||||
<pre><code>+ laradock
|
||||
+ project-z
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Edit the <code>docker-compose.yml</code> file to map to your project directory once you have it (example: <code>- ../myProject:/var/www</code>).</p>
|
||||
<p>2 - Edit your web server sites configuration.</p>
|
||||
|
||||
<p>3 - Stop and re-run your docker-compose command for the changes to take place.</p>
|
||||
<p><strong>In case of NGINX:</strong> open <code>nginx/sites/default.conf</code> and change the <code>root</code> from <code>/var/www/public</code> to <code>/var/www/{my-project-folder-name}/public</code>.</p>
|
||||
|
||||
<pre><code>docker-compose stop && docker-compose up -d XXXX YYYY ZZZZ ....
|
||||
</code></pre>
|
||||
<p><em>Or you can keep <code>default.conf</code> as it is, and create a separate config <code>my-site.conf</code> file for it.</em></p>
|
||||
|
||||
<h4 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h4>
|
||||
<p><strong>In case of Apache:</strong> :P</p>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine:</p>
|
||||
<p><br></p>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="B"></a></p>
|
||||
|
||||
<h3 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h3>
|
||||
|
||||
<blockquote>
|
||||
<p>(Follow these steps if you want a single Docker environment for all your project)</p>
|
||||
</blockquote>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine (similar to <a href="#A2">Steps A.2. from above</a>):</p>
|
||||
|
||||
<pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Edit the <code>docker-compose.yml</code> file to map to your projects directories:</p>
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code> applications:
|
||||
image: tianon/true
|
||||
volumes:
|
||||
- ../project1/:/var/www/project1
|
||||
- ../project2/:/var/www/project2
|
||||
<pre><code>+ laradock
|
||||
+ project-1
|
||||
+ project-2
|
||||
</code></pre>
|
||||
|
||||
<p>3 - You can access all sites by visiting <code>http://localhost/project1/public</code> and <code>http://localhost/project2/public</code> but of course that’s not very useful so let’s setup NGINX quickly.</p>
|
||||
<p>2 - Go to <code>nginx/sites</code> and create config files to point to different project directory when visiting different domains.</p>
|
||||
|
||||
<p>4 - Go to <code>nginx/sites</code> and copy <code>sample.conf.example</code> to <code>project1.conf</code> then to <code>project2.conf</code></p>
|
||||
<p>Laradock by default includes <code>project-1.conf</code> and <code>project-2.conf</code> as working samples.</p>
|
||||
|
||||
<p>5 - Open the <code>project1.conf</code> file and edit the <code>server_name</code> and the <code>root</code> as follow:</p>
|
||||
<p>3 - change the default names <code>project-n</code>:</p>
|
||||
|
||||
<pre><code> server_name project1.dev;
|
||||
root /var/www/project1/public;
|
||||
<p>You can rename the config files, project folders and domains as you like, just make sure the <code>root</code> in the config files, is pointing to the correct project folder name.</p>
|
||||
|
||||
<p>4 - Add the domains to the <strong>hosts</strong> files.</p>
|
||||
|
||||
<pre><code>127.0.0.1 project-1.dev
|
||||
127.0.0.1 project-2.dev
|
||||
</code></pre>
|
||||
|
||||
<p>Do the same for each project <code>project2.conf</code>, <code>project3.conf</code>,…</p>
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p>6 - Add the domains to the <strong>hosts</strong> files.</p>
|
||||
|
||||
<pre><code>127.0.0.1 project1.dev
|
||||
</code></pre>
|
||||
|
||||
<p>7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.</p>
|
||||
<p><a name="Usage"></a></p>
|
||||
|
||||
<h2 id="usage">Usage</h2>
|
||||
|
||||
@ -433,61 +449,72 @@
|
||||
<p>If you are using <strong>Docker Toolbox</strong> (VM), do one of the following:</p>
|
||||
|
||||
<ul>
|
||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="#upgrading-laradock">Upgrading LaraDock</a></li>
|
||||
<li>Use LaraDock v3.* (Visit the <code>LaraDock-ToolBox</code> <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">Branch</a>).</li>
|
||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
||||
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">LaraDock-ToolBox</a> branch. <em>(outdated)</em></li>
|
||||
</ul>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Warning:</strong> If you used an older version of LaraDock it’s highly recommended to rebuild the containers you need to use <a href="#Build-Re-build-Containers">see how you rebuild a container</a> in order to prevent errors as much as possible.</p>
|
||||
<p><strong>Warning:</strong> If you used an older version of Laradock it’s highly recommended to rebuild the containers you need to use <a href="#Build-Re-build-Containers">see how you rebuild a container</a> in order to prevent as much errors as possible.</p>
|
||||
</blockquote>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<p>1 - Run Containers: <em>(Make sure you are in the <code>laradock</code> folder before running the <code>docker-compose</code> commands).</em></p>
|
||||
<p>1 - Enter the laradock folder and rename <code>env-example</code> to <code>.env</code></p>
|
||||
|
||||
<p><strong>Example:</strong> Running NGINX and MySQL:</p>
|
||||
<pre><code class="language-shell">cp env-example .env
|
||||
</code></pre>
|
||||
|
||||
<p>You can edit the <code>.env</code> file to chose which software’s you want to be installed in your environment. You can always refer to the <code>docker-compose.yml</code> file to see how those variables are been used.</p>
|
||||
|
||||
<p>2 - Build the enviroment and run it using <code>docker-compose</code></p>
|
||||
|
||||
<p>In this example we’ll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d nginx mysql
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note</strong>: The <code>workspace</code> and <code>php-fpm</code> will run automatically in most of the cases, so no need to specify them in the <code>up</code> command. If you couldn’t find them running then you need specify them as follow: <code>docker-compose up -d nginx php-fpm mysql workspace</code>.</p>
|
||||
|
||||
<p>You can select your own combination of Containers form the list below:</p>
|
||||
<p>You can select your own combination of containers form the list below:</p>
|
||||
|
||||
<p><code>nginx</code>, <code>hhvm</code>, <code>php-fpm</code>, <code>mysql</code>, <code>redis</code>, <code>postgres</code>, <code>mariadb</code>, <code>neo4j</code>, <code>mongo</code>, <code>apache2</code>, <code>caddy</code>, <code>memcached</code>, <code>beanstalkd</code>, <code>beanstalkd-console</code>, <code>rabbitmq</code>, <code>workspace</code>, <code>phpmyadmin</code>, <code>aerospike</code>, <code>pgadmin</code>, <code>elasticsearch</code>, <code>rethinkdb</code>.</p>
|
||||
<blockquote>
|
||||
<p><code>nginx</code>, <code>hhvm</code>, <code>php-fpm</code>, <code>mysql</code>, <code>redis</code>, <code>postgres</code>, <code>mariadb</code>, <code>neo4j</code>, <code>mongo</code>, <code>apache2</code>, <code>caddy</code>, <code>memcached</code>, <code>beanstalkd</code>, <code>beanstalkd-console</code>, <code>rabbitmq</code>, <code>beanstalkd-console</code>, <code>workspace</code>, <code>phpmyadmin</code>, <code>adminer</code>, <code>aerospike</code>, <code>pgadmin</code>, <code>elasticsearch</code>, <code>rethinkdb</code>, <code>postgres-postgis</code>, <code>certbot</code>, <code>mailhog</code>, <code>minio</code> and more…!</p>
|
||||
</blockquote>
|
||||
|
||||
<p><em>(Please note that sometimes we forget to update the docs, so check the <code>docker-compose.yml</code> file to see an updated list of all available containers).</em></p>
|
||||
|
||||
<p><br>
|
||||
2 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, …).</p>
|
||||
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, …)</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose exec workspace bash
|
||||
</code></pre>
|
||||
|
||||
<p>Alternatively, for Windows PowerShell users: execute the following command to enter any running container:</p>
|
||||
<p><em>Alternatively, for Windows PowerShell users: execute the following command to enter any running container:</em></p>
|
||||
|
||||
<pre><code class="language-bash">docker exec -it {workspace-container-id} bash
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note:</strong> You can add <code>--user=laradock</code> (example <code>docker-compose exec --user=laradock workspace bash</code>) to have files created as your host’s user. (you can change the PUID (User id) and PGID (group id) variables from the <code>docker-compose.yml</code>).</p>
|
||||
<p><strong>Note:</strong> You can add <code>--user=laradock</code> to have files created as your host’s user. Example:</p>
|
||||
|
||||
<pre><code class="language-shell">docker-compose exec --user=laradock workspace bash
|
||||
</code></pre>
|
||||
|
||||
<p><em>You can change the PUID (User id) and PGID (group id) variables from the <code>.env</code> file)</em></p>
|
||||
|
||||
<p><br>
|
||||
3 - Edit your project configurations.</p>
|
||||
4 - Update your project configurations to use the database host</p>
|
||||
|
||||
<p>Open your <code>.env</code> file and set the <code>DB_HOST</code> to <code>mysql</code>:</p>
|
||||
<p>Open your PHP project’s <code>.env</code> file or whichever configuration file you are reading from, and set the database host <code>DB_HOST</code> to <code>mysql</code>:</p>
|
||||
|
||||
<pre><code class="language-env">DB_HOST=mysql
|
||||
</code></pre>
|
||||
|
||||
<p><em>If you want to use Laravel and you don’t have it installed yet, see <a href="#Install-Laravel">How to Install Laravel in a Docker Container</a>.</em></p>
|
||||
<p><em>If you want to install Laravel as PHP project, see <a href="#Install-Laravel">How to Install Laravel in a Docker Container</a>.</em></p>
|
||||
|
||||
<p><br>
|
||||
4 - Open your browser and visit your localhost address (<code>http://localhost/</code>).</p>
|
||||
|
||||
<p><br>
|
||||
<strong>Debugging</strong>: if you are facing any problem here check the <a href="#debugging">Debugging</a> section.</p>
|
||||
|
||||
<p>If you need a special support. Contact me, more details in the <a href="#Help">Help & Questions</a> section.</p>
|
||||
5 - Open your browser and visit your localhost address <code>http://localhost/</code>. If you followed the multiple projects setup, you can visit <code>http://project-1.dev/</code> and <code>http://project-2.dev/</code>. But first don’t</p>
|
||||
|
||||
|
||||
<aside class="copyright" role="note">
|
||||
@ -563,8 +590,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var base_url = 'http:\/\/laradock.io\/';
|
||||
var repo_id = 'laradock\/laradock';
|
||||
var base_url = '';
|
||||
var repo_id = '';
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Getting-starteds on Laradock Docs</title>
|
||||
<title>Getting-starteds on Laradock</title>
|
||||
<link>http://laradock.io/getting-started/index.xml</link>
|
||||
<description>Recent content in Getting-starteds on Laradock Docs</description>
|
||||
<description>Recent content in Getting-starteds on Laradock</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<atom:link href="http://laradock.io/getting-started/index.xml" rel="self" type="application/rss+xml" />
|
||||
@ -27,88 +27,123 @@
|
||||
|
||||
<p>Choose the setup the best suits your needs.</p>
|
||||
|
||||
<h4 id="a-setup-for-single-project">A) Setup for Single Project:</h4>
|
||||
<ul>
|
||||
<li><a href="#A">A) Setup for Single Project</a>
|
||||
|
||||
<p><em>(In case you want a Docker environment for each project)</em></p>
|
||||
<ul>
|
||||
<li><a href="#A1">A.1) Already have a PHP project</a></li>
|
||||
<li><a href="#A2">A.2) Don&rsquo;t have a PHP project yet</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#B">B) Setup for Multiple Projects</a></li>
|
||||
</ul>
|
||||
|
||||
<h5 id="a-1-setup-environment-in-existing-project">A.1) Setup environment in existing Project:</h5>
|
||||
<p><a name="A"></a></p>
|
||||
|
||||
<p><em>(In case you already have a project, and you want to setup an environment to run it)</em></p>
|
||||
<h3 id="a-setup-for-single-project">A) Setup for Single Project</h3>
|
||||
|
||||
<p>1 - Clone this repository on your project root directory:</p>
|
||||
<blockquote>
|
||||
<p>(Follow these steps if you want a separate Docker environment for each project)</p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="A1"></a></p>
|
||||
|
||||
<h3 id="a-1-already-have-a-php-project">A.1) Already have a PHP project:</h3>
|
||||
|
||||
<p>1 - Clone laradock on your project root directory:</p>
|
||||
|
||||
<pre><code class="language-bash">git submodule add https://github.com/Laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p><em>Note 1: If you are not yet using Git for your PHP project, you can use <code>git clone https://github.com/Laradock/laradock.git</code> instead.</em></p>
|
||||
<p><strong>Notes:</strong></p>
|
||||
|
||||
<p><em>Note 2: To keep track of your LaraDock changes, between your projects and also keep LaraDock updated. <a href="#keep-tracking-LaraDock">Check this</a></em></p>
|
||||
<ul>
|
||||
<li><p>If you are not using Git yet for your project, you can use <code>git clone</code> instead of <code>git submodule</code>.</p></li>
|
||||
|
||||
<p><em>Note 3: In this case the folder structure will be like this:</em></p>
|
||||
<li><p>Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. <a href="http://laradock.io/documentation/#keep-track-of-your-laradock-changes">Check this</a></p></li>
|
||||
</ul>
|
||||
|
||||
<pre><code>- project1
|
||||
- laradock
|
||||
- project2
|
||||
- laradock
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code>+ project-a
|
||||
+ laradock-a
|
||||
+ project-b
|
||||
+ laradock-b
|
||||
</code></pre>
|
||||
|
||||
<h5 id="a-2-setup-environment-first-then-create-project">A.2) Setup environment first then create project:</h5>
|
||||
<p>(It&rsquo;s important to rename the folders differently in each project.)</p>
|
||||
|
||||
<p><em>(In case you don&rsquo;t have a project, and you want to create your project inside the Docker environment)</em></p>
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="A2"></a></p>
|
||||
|
||||
<h3 id="a-2-don-t-have-a-php-project-yet">A.2) Don&rsquo;t have a PHP project yet:</h3>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine:</p>
|
||||
|
||||
<pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>Note: In this case the folder structure will be like this:</p>
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code>- projects
|
||||
- laradock
|
||||
- myProject
|
||||
<pre><code>+ laradock
|
||||
+ project-z
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Edit the <code>docker-compose.yml</code> file to map to your project directory once you have it (example: <code>- ../myProject:/var/www</code>).</p>
|
||||
<p>2 - Edit your web server sites configuration.</p>
|
||||
|
||||
<p>3 - Stop and re-run your docker-compose command for the changes to take place.</p>
|
||||
<p><strong>In case of NGINX:</strong> open <code>nginx/sites/default.conf</code> and change the <code>root</code> from <code>/var/www/public</code> to <code>/var/www/{my-project-folder-name}/public</code>.</p>
|
||||
|
||||
<pre><code>docker-compose stop &amp;&amp; docker-compose up -d XXXX YYYY ZZZZ ....
|
||||
</code></pre>
|
||||
<p><em>Or you can keep <code>default.conf</code> as it is, and create a separate config <code>my-site.conf</code> file for it.</em></p>
|
||||
|
||||
<h4 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h4>
|
||||
<p><strong>In case of Apache:</strong> :P</p>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine:</p>
|
||||
<p><br></p>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="B"></a></p>
|
||||
|
||||
<h3 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h3>
|
||||
|
||||
<blockquote>
|
||||
<p>(Follow these steps if you want a single Docker environment for all your project)</p>
|
||||
</blockquote>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine (similar to <a href="#A2">Steps A.2. from above</a>):</p>
|
||||
|
||||
<pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Edit the <code>docker-compose.yml</code> file to map to your projects directories:</p>
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code> applications:
|
||||
image: tianon/true
|
||||
volumes:
|
||||
- ../project1/:/var/www/project1
|
||||
- ../project2/:/var/www/project2
|
||||
<pre><code>+ laradock
|
||||
+ project-1
|
||||
+ project-2
|
||||
</code></pre>
|
||||
|
||||
<p>3 - You can access all sites by visiting <code>http://localhost/project1/public</code> and <code>http://localhost/project2/public</code> but of course that&rsquo;s not very useful so let&rsquo;s setup NGINX quickly.</p>
|
||||
<p>2 - Go to <code>nginx/sites</code> and create config files to point to different project directory when visiting different domains.</p>
|
||||
|
||||
<p>4 - Go to <code>nginx/sites</code> and copy <code>sample.conf.example</code> to <code>project1.conf</code> then to <code>project2.conf</code></p>
|
||||
<p>Laradock by default includes <code>project-1.conf</code> and <code>project-2.conf</code> as working samples.</p>
|
||||
|
||||
<p>5 - Open the <code>project1.conf</code> file and edit the <code>server_name</code> and the <code>root</code> as follow:</p>
|
||||
<p>3 - change the default names <code>project-n</code>:</p>
|
||||
|
||||
<pre><code> server_name project1.dev;
|
||||
root /var/www/project1/public;
|
||||
<p>You can rename the config files, project folders and domains as you like, just make sure the <code>root</code> in the config files, is pointing to the correct project folder name.</p>
|
||||
|
||||
<p>4 - Add the domains to the <strong>hosts</strong> files.</p>
|
||||
|
||||
<pre><code>127.0.0.1 project-1.dev
|
||||
127.0.0.1 project-2.dev
|
||||
</code></pre>
|
||||
|
||||
<p>Do the same for each project <code>project2.conf</code>, <code>project3.conf</code>,&hellip;</p>
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p>6 - Add the domains to the <strong>hosts</strong> files.</p>
|
||||
|
||||
<pre><code>127.0.0.1 project1.dev
|
||||
</code></pre>
|
||||
|
||||
<p>7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.</p>
|
||||
<p><a name="Usage"></a></p>
|
||||
|
||||
<h2 id="usage">Usage</h2>
|
||||
|
||||
@ -117,61 +152,72 @@
|
||||
<p>If you are using <strong>Docker Toolbox</strong> (VM), do one of the following:</p>
|
||||
|
||||
<ul>
|
||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="#upgrading-laradock">Upgrading LaraDock</a></li>
|
||||
<li>Use LaraDock v3.* (Visit the <code>LaraDock-ToolBox</code> <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">Branch</a>).</li>
|
||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
||||
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">LaraDock-ToolBox</a> branch. <em>(outdated)</em></li>
|
||||
</ul>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Warning:</strong> If you used an older version of LaraDock it&rsquo;s highly recommended to rebuild the containers you need to use <a href="#Build-Re-build-Containers">see how you rebuild a container</a> in order to prevent errors as much as possible.</p>
|
||||
<p><strong>Warning:</strong> If you used an older version of Laradock it&rsquo;s highly recommended to rebuild the containers you need to use <a href="#Build-Re-build-Containers">see how you rebuild a container</a> in order to prevent as much errors as possible.</p>
|
||||
</blockquote>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<p>1 - Run Containers: <em>(Make sure you are in the <code>laradock</code> folder before running the <code>docker-compose</code> commands).</em></p>
|
||||
<p>1 - Enter the laradock folder and rename <code>env-example</code> to <code>.env</code></p>
|
||||
|
||||
<p><strong>Example:</strong> Running NGINX and MySQL:</p>
|
||||
<pre><code class="language-shell">cp env-example .env
|
||||
</code></pre>
|
||||
|
||||
<p>You can edit the <code>.env</code> file to chose which software&rsquo;s you want to be installed in your environment. You can always refer to the <code>docker-compose.yml</code> file to see how those variables are been used.</p>
|
||||
|
||||
<p>2 - Build the enviroment and run it using <code>docker-compose</code></p>
|
||||
|
||||
<p>In this example we&rsquo;ll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d nginx mysql
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note</strong>: The <code>workspace</code> and <code>php-fpm</code> will run automatically in most of the cases, so no need to specify them in the <code>up</code> command. If you couldn&rsquo;t find them running then you need specify them as follow: <code>docker-compose up -d nginx php-fpm mysql workspace</code>.</p>
|
||||
|
||||
<p>You can select your own combination of Containers form the list below:</p>
|
||||
<p>You can select your own combination of containers form the list below:</p>
|
||||
|
||||
<p><code>nginx</code>, <code>hhvm</code>, <code>php-fpm</code>, <code>mysql</code>, <code>redis</code>, <code>postgres</code>, <code>mariadb</code>, <code>neo4j</code>, <code>mongo</code>, <code>apache2</code>, <code>caddy</code>, <code>memcached</code>, <code>beanstalkd</code>, <code>beanstalkd-console</code>, <code>rabbitmq</code>, <code>workspace</code>, <code>phpmyadmin</code>, <code>aerospike</code>, <code>pgadmin</code>, <code>elasticsearch</code>, <code>rethinkdb</code>.</p>
|
||||
<blockquote>
|
||||
<p><code>nginx</code>, <code>hhvm</code>, <code>php-fpm</code>, <code>mysql</code>, <code>redis</code>, <code>postgres</code>, <code>mariadb</code>, <code>neo4j</code>, <code>mongo</code>, <code>apache2</code>, <code>caddy</code>, <code>memcached</code>, <code>beanstalkd</code>, <code>beanstalkd-console</code>, <code>rabbitmq</code>, <code>beanstalkd-console</code>, <code>workspace</code>, <code>phpmyadmin</code>, <code>adminer</code>, <code>aerospike</code>, <code>pgadmin</code>, <code>elasticsearch</code>, <code>rethinkdb</code>, <code>postgres-postgis</code>, <code>certbot</code>, <code>mailhog</code>, <code>minio</code> and more&hellip;!</p>
|
||||
</blockquote>
|
||||
|
||||
<p><em>(Please note that sometimes we forget to update the docs, so check the <code>docker-compose.yml</code> file to see an updated list of all available containers).</em></p>
|
||||
|
||||
<p><br>
|
||||
2 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, &hellip;).</p>
|
||||
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, &hellip;)</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose exec workspace bash
|
||||
</code></pre>
|
||||
|
||||
<p>Alternatively, for Windows PowerShell users: execute the following command to enter any running container:</p>
|
||||
<p><em>Alternatively, for Windows PowerShell users: execute the following command to enter any running container:</em></p>
|
||||
|
||||
<pre><code class="language-bash">docker exec -it {workspace-container-id} bash
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note:</strong> You can add <code>--user=laradock</code> (example <code>docker-compose exec --user=laradock workspace bash</code>) to have files created as your host&rsquo;s user. (you can change the PUID (User id) and PGID (group id) variables from the <code>docker-compose.yml</code>).</p>
|
||||
<p><strong>Note:</strong> You can add <code>--user=laradock</code> to have files created as your host&rsquo;s user. Example:</p>
|
||||
|
||||
<pre><code class="language-shell">docker-compose exec --user=laradock workspace bash
|
||||
</code></pre>
|
||||
|
||||
<p><em>You can change the PUID (User id) and PGID (group id) variables from the <code>.env</code> file)</em></p>
|
||||
|
||||
<p><br>
|
||||
3 - Edit your project configurations.</p>
|
||||
4 - Update your project configurations to use the database host</p>
|
||||
|
||||
<p>Open your <code>.env</code> file and set the <code>DB_HOST</code> to <code>mysql</code>:</p>
|
||||
<p>Open your PHP project&rsquo;s <code>.env</code> file or whichever configuration file you are reading from, and set the database host <code>DB_HOST</code> to <code>mysql</code>:</p>
|
||||
|
||||
<pre><code class="language-env">DB_HOST=mysql
|
||||
</code></pre>
|
||||
|
||||
<p><em>If you want to use Laravel and you don&rsquo;t have it installed yet, see <a href="#Install-Laravel">How to Install Laravel in a Docker Container</a>.</em></p>
|
||||
<p><em>If you want to install Laravel as PHP project, see <a href="#Install-Laravel">How to Install Laravel in a Docker Container</a>.</em></p>
|
||||
|
||||
<p><br>
|
||||
4 - Open your browser and visit your localhost address (<code>http://localhost/</code>).</p>
|
||||
|
||||
<p><br>
|
||||
<strong>Debugging</strong>: if you are facing any problem here check the <a href="#debugging">Debugging</a> section.</p>
|
||||
|
||||
<p>If you need a special support. Contact me, more details in the <a href="#Help">Help &amp; Questions</a> section.</p>
|
||||
5 - Open your browser and visit your localhost address <code>http://localhost/</code>. If you followed the multiple projects setup, you can visit <code>http://project-1.dev/</code> and <code>http://project-2.dev/</code>. But first don&rsquo;t</p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10" />
|
||||
<title>Help & Questions - Laradock Docs</title>
|
||||
<meta name="generator" content="Hugo 0.18.1" />
|
||||
<title>Help & Questions - Laradock</title>
|
||||
<meta name="generator" content="Hugo 0.19" />
|
||||
|
||||
|
||||
<meta name="description" content="Laradock documentations.">
|
||||
@ -21,9 +21,9 @@
|
||||
|
||||
|
||||
<meta property="og:url" content="http://laradock.io/help/">
|
||||
<meta property="og:title" content="Laradock Docs">
|
||||
<meta property="og:title" content="Laradock">
|
||||
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock Docs">
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
@ -71,10 +71,7 @@
|
||||
|
||||
|
||||
</head>
|
||||
<body class="palette-primary-purple palette-accent-deep-purple">
|
||||
|
||||
|
||||
|
||||
<body class="palette-primary-deep-purple palette-accent-purple">
|
||||
|
||||
|
||||
|
||||
@ -97,7 +94,7 @@
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="title">
|
||||
Help & Questions
|
||||
<b>Laradock</b> <span style="color: rgba(249, 245, 255, 0.63);"> / Help & Questions</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -105,8 +102,9 @@
|
||||
|
||||
|
||||
<div class="button button-github" role="button" aria-label="GitHub">
|
||||
<a href="https://github.com/laradock" title="@laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
<a style="padding: 0px; font-size:40px" href="https://github.com/laradock/laradock" title="@laradock/laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
</div>
|
||||
<p style="font-size: 18px; padding: 8px">Github</p>
|
||||
|
||||
|
||||
|
||||
@ -125,42 +123,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
<nav aria-label="Navigation">
|
||||
<a href="https://github.com/laradock/laradock" class="project">
|
||||
<div class="banner">
|
||||
|
||||
<div class="name">
|
||||
<strong>Laradock Docs </strong>
|
||||
|
||||
<br>
|
||||
laradock/laradock
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
|
||||
<ul class="repo">
|
||||
<li class="repo-download">
|
||||
<a href="https://github.com/laradock/laradock/archive/master.zip" target="_blank" title="Download" data-action="download">
|
||||
<i class="icon icon-download"></i> Download
|
||||
</a>
|
||||
</li>
|
||||
<li class="repo-stars">
|
||||
<a href="https://github.com/laradock/laradock/stargazers" target="_blank" title="Stargazers" data-action="star">
|
||||
<i class="icon icon-star"></i> Stars
|
||||
<span class="count">–</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="toc">
|
||||
|
||||
@ -302,18 +283,18 @@
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<span class="section">The author</span>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/laradock" target="_blank" title="@laradock on GitHub">
|
||||
@laradock on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -330,9 +311,9 @@
|
||||
<div class="wrapper">
|
||||
<h1>Help & Questions </h1>
|
||||
|
||||
<p>Join the chat room on <a href="https://gitter.im/LaraDock/laradock">Gitter</a> and get help and support from the community.</p>
|
||||
<p>Join the chat room on <a href="https://gitter.im/Laradock/laradock">Gitter</a> and get help and support from the community.</p>
|
||||
|
||||
<p>You can as well can open an <a href="https://github.com/laradock/laradock/issues">issue</a> on Github (will be labeled as Question) and discuss it with people on <a href="https://gitter.im/LaraDock/laradock">Gitter</a>.</p>
|
||||
<p>You can as well can open an <a href="https://github.com/laradock/laradock/issues">issue</a> on Github (will be labeled as Question) and discuss it with people on <a href="https://gitter.im/Laradock/laradock">Gitter</a>.</p>
|
||||
|
||||
|
||||
<aside class="copyright" role="note">
|
||||
@ -408,8 +389,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var base_url = 'http:\/\/laradock.io\/';
|
||||
var repo_id = 'laradock\/laradock';
|
||||
var base_url = '';
|
||||
var repo_id = '';
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Helps on Laradock Docs</title>
|
||||
<title>Helps on Laradock</title>
|
||||
<link>http://laradock.io/help/index.xml</link>
|
||||
<description>Recent content in Helps on Laradock Docs</description>
|
||||
<description>Recent content in Helps on Laradock</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<atom:link href="http://laradock.io/help/index.xml" rel="self" type="application/rss+xml" />
|
||||
@ -14,9 +14,9 @@
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://laradock.io/help/</guid>
|
||||
<description><p>Join the chat room on <a href="https://gitter.im/LaraDock/laradock">Gitter</a> and get help and support from the community.</p>
|
||||
<description><p>Join the chat room on <a href="https://gitter.im/Laradock/laradock">Gitter</a> and get help and support from the community.</p>
|
||||
|
||||
<p>You can as well can open an <a href="https://github.com/laradock/laradock/issues">issue</a> on Github (will be labeled as Question) and discuss it with people on <a href="https://gitter.im/LaraDock/laradock">Gitter</a>.</p>
|
||||
<p>You can as well can open an <a href="https://github.com/laradock/laradock/issues">issue</a> on Github (will be labeled as Question) and discuss it with people on <a href="https://gitter.im/Laradock/laradock">Gitter</a>.</p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
503
docs/index.html
@ -9,8 +9,8 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10" />
|
||||
<title>Laradock Docs</title>
|
||||
<meta name="generator" content="Hugo 0.18.1" />
|
||||
<title>Laradock</title>
|
||||
<meta name="generator" content="Hugo 0.19" />
|
||||
|
||||
|
||||
<meta name="description" content="Laradock documentations.">
|
||||
@ -21,9 +21,9 @@
|
||||
|
||||
|
||||
<meta property="og:url" content="http://laradock.io/">
|
||||
<meta property="og:title" content="Laradock Docs">
|
||||
<meta property="og:title" content="Laradock">
|
||||
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock Docs">
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
@ -69,15 +69,12 @@
|
||||
<script src="http://laradock.io/javascripts/modernizr.js"></script>
|
||||
|
||||
|
||||
<link href="http://laradock.io/index.xml" rel="alternate" type="application/rss+xml" title="Laradock Docs" />
|
||||
<link href="http://laradock.io/index.xml" rel="feed" type="application/rss+xml" title="Laradock Docs" />
|
||||
<link href="http://laradock.io/index.xml" rel="alternate" type="application/rss+xml" title="Laradock" />
|
||||
<link href="http://laradock.io/index.xml" rel="feed" type="application/rss+xml" title="Laradock" />
|
||||
|
||||
|
||||
</head>
|
||||
<body class="palette-primary-purple palette-accent-deep-purple">
|
||||
|
||||
|
||||
|
||||
<body class="palette-primary-deep-purple palette-accent-purple">
|
||||
|
||||
|
||||
|
||||
@ -100,7 +97,7 @@
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="title">
|
||||
Laradock Docs
|
||||
<b>Laradock</b> <span style="color: rgba(249, 245, 255, 0.63);"> / Laradock</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -108,8 +105,9 @@
|
||||
|
||||
|
||||
<div class="button button-github" role="button" aria-label="GitHub">
|
||||
<a href="https://github.com/laradock" title="@laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
<a style="padding: 0px; font-size:40px" href="https://github.com/laradock/laradock" title="@laradock/laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
</div>
|
||||
<p style="font-size: 18px; padding: 8px">Github</p>
|
||||
|
||||
|
||||
|
||||
@ -128,42 +126,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
<nav aria-label="Navigation">
|
||||
<a href="https://github.com/laradock/laradock" class="project">
|
||||
<div class="banner">
|
||||
|
||||
<div class="name">
|
||||
<strong>Laradock Docs </strong>
|
||||
|
||||
<br>
|
||||
laradock/laradock
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
|
||||
<ul class="repo">
|
||||
<li class="repo-download">
|
||||
<a href="https://github.com/laradock/laradock/archive/master.zip" target="_blank" title="Download" data-action="download">
|
||||
<i class="icon icon-download"></i> Download
|
||||
</a>
|
||||
</li>
|
||||
<li class="repo-stars">
|
||||
<a href="https://github.com/laradock/laradock/stargazers" target="_blank" title="Stargazers" data-action="star">
|
||||
<i class="icon icon-star"></i> Stars
|
||||
<span class="count">–</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="toc">
|
||||
|
||||
@ -302,18 +283,18 @@
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<span class="section">The author</span>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/laradock" target="_blank" title="@laradock on GitHub">
|
||||
@laradock on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -333,27 +314,32 @@
|
||||
|
||||
|
||||
|
||||
<p>LaraDock strives to make the PHP development experience easier and faster.</p>
|
||||
<p>Laradock strives to make the PHP development experience easier and faster.</p>
|
||||
|
||||
<p>It contains pre-packaged Docker Images that provides you a wonderful <em>development</em> environment without requiring you to install PHP, NGINX, MySQL, Redis, and any other software on your machines.</p>
|
||||
|
||||
<p>LaraDock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal…).</p>
|
||||
<p>Laradock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal…).</p>
|
||||
|
||||
<h2 id="quick-overview">Quick Overview</h2>
|
||||
|
||||
<p>Let’s see how easy it is to install <code>NGINX</code>, <code>PHP</code>, <code>Composer</code>, <code>MySQL</code>, <code>Redis</code> and <code>beanstalkd</code>:</p>
|
||||
|
||||
<p>1 - Clone LaraDock inside your PHP project:</p>
|
||||
<p>1 - Clone Laradock inside your PHP project:</p>
|
||||
|
||||
<pre><code class="language-shell">git clone https://github.com/Laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Enter the laradock folder and run this command:</p>
|
||||
<p>2 - Enter the laradock folder and rename <code>env-example</code> to <code>.env</code>.</p>
|
||||
|
||||
<pre><code class="language-shell">cp env-example .env
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Run your containers:</p>
|
||||
|
||||
<pre><code class="language-shell">docker-compose up -d nginx mysql redis beanstalkd
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Open your <code>.env</code> file and set the following:</p>
|
||||
<p>3 - Open your project’s <code>.env</code> file and set the following:</p>
|
||||
|
||||
<pre><code class="language-shell">DB_HOST=mysql
|
||||
REDIS_HOST=redis
|
||||
@ -385,21 +371,21 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<p><a name="laradock-vs-homestead"></a></p>
|
||||
|
||||
<h2 id="laradock-vs-homestead-for-laravel-developers">LaraDock VS Homestead (For Laravel Developers)</h2>
|
||||
<h2 id="laradock-vs-homestead-for-laravel-developers">Laradock VS Homestead (For Laravel Developers)</h2>
|
||||
|
||||
<blockquote>
|
||||
<p>LaraDock It’s like Laravel Homestead but for Docker instead of Vagrant.</p>
|
||||
<p>Laradock It’s like Laravel Homestead but for Docker instead of Vagrant.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>LaraDock and <a href="https://laravel.com/docs/master/homestead">Homestead</a> both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).</p>
|
||||
<p>Laradock and <a href="https://laravel.com/docs/master/homestead">Homestead</a> both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine.</p></li>
|
||||
|
||||
<li><p>LaraDock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers.</p></li>
|
||||
<li><p>Laradock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers.</p></li>
|
||||
</ul>
|
||||
|
||||
<p>Running a virtual container is much faster than running a full virtual Machine. Thus <strong>LaraDock is much faster than Homestead</strong>.</p>
|
||||
<p>Running a virtual container is much faster than running a full virtual Machine. Thus <strong>Laradock is much faster than Homestead</strong>.</p>
|
||||
|
||||
<p><a name="Demo"></a></p>
|
||||
|
||||
@ -408,10 +394,10 @@ QUEUE_HOST=beanstalkd
|
||||
<p>What’s better than a <strong>Demo Video</strong>:</p>
|
||||
|
||||
<ul>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=TQii1jDa96Y">v4.*</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=-DamFMczwDA">v2.*</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=jGkyO6Is_aI">v0.3</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=3YQsHe6oF80">v0.1</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=TQii1jDa96Y">v4.*</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=-DamFMczwDA">v2.*</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=jGkyO6Is_aI">v0.3</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=3YQsHe6oF80">v0.1</a></li>
|
||||
</ul>
|
||||
|
||||
<p><a name="features"></a></p>
|
||||
@ -443,11 +429,12 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<ul>
|
||||
<li>MySQL</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>MariaDB</li>
|
||||
<li>MongoDB</li>
|
||||
<li>Neo4j</li>
|
||||
<li>RethinkDB</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>Postgres Postgis</li>
|
||||
</ul></li>
|
||||
<li><strong>Cache Engines:</strong>
|
||||
|
||||
@ -481,9 +468,13 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<ul>
|
||||
<li>PhpMyAdmin</li>
|
||||
<li>Adminer</li>
|
||||
<li>PgAdmin</li>
|
||||
<li>ElasticSearch</li>
|
||||
<li>Selenium</li>
|
||||
<li>Certbot</li>
|
||||
<li>Mailhog</li>
|
||||
<li>Minio</li>
|
||||
<li>Workspace
|
||||
|
||||
<ul>
|
||||
@ -514,7 +505,7 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<p>You are welcome to join our chat room on Gitter.</p>
|
||||
|
||||
<p><a href="https://gitter.im/LaraDock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/LaraDock/laradock.svg" alt="Gitter" /></a></p>
|
||||
<p><a href="https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/Laradock/laradock.svg" alt="Gitter" /></a></p>
|
||||
|
||||
|
||||
<h1>Getting Started </h1>
|
||||
@ -532,88 +523,123 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<p>Choose the setup the best suits your needs.</p>
|
||||
|
||||
<h4 id="a-setup-for-single-project">A) Setup for Single Project:</h4>
|
||||
<ul>
|
||||
<li><a href="#A">A) Setup for Single Project</a>
|
||||
|
||||
<p><em>(In case you want a Docker environment for each project)</em></p>
|
||||
<ul>
|
||||
<li><a href="#A1">A.1) Already have a PHP project</a></li>
|
||||
<li><a href="#A2">A.2) Don’t have a PHP project yet</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#B">B) Setup for Multiple Projects</a></li>
|
||||
</ul>
|
||||
|
||||
<h5 id="a-1-setup-environment-in-existing-project">A.1) Setup environment in existing Project:</h5>
|
||||
<p><a name="A"></a></p>
|
||||
|
||||
<p><em>(In case you already have a project, and you want to setup an environment to run it)</em></p>
|
||||
<h3 id="a-setup-for-single-project">A) Setup for Single Project</h3>
|
||||
|
||||
<p>1 - Clone this repository on your project root directory:</p>
|
||||
<blockquote>
|
||||
<p>(Follow these steps if you want a separate Docker environment for each project)</p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="A1"></a></p>
|
||||
|
||||
<h3 id="a-1-already-have-a-php-project">A.1) Already have a PHP project:</h3>
|
||||
|
||||
<p>1 - Clone laradock on your project root directory:</p>
|
||||
|
||||
<pre><code class="language-bash">git submodule add https://github.com/Laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p><em>Note 1: If you are not yet using Git for your PHP project, you can use <code>git clone https://github.com/Laradock/laradock.git</code> instead.</em></p>
|
||||
<p><strong>Notes:</strong></p>
|
||||
|
||||
<p><em>Note 2: To keep track of your LaraDock changes, between your projects and also keep LaraDock updated. <a href="#keep-tracking-LaraDock">Check this</a></em></p>
|
||||
<ul>
|
||||
<li><p>If you are not using Git yet for your project, you can use <code>git clone</code> instead of <code>git submodule</code>.</p></li>
|
||||
|
||||
<p><em>Note 3: In this case the folder structure will be like this:</em></p>
|
||||
<li><p>Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. <a href="http://laradock.io/documentation/#keep-track-of-your-laradock-changes">Check this</a></p></li>
|
||||
</ul>
|
||||
|
||||
<pre><code>- project1
|
||||
- laradock
|
||||
- project2
|
||||
- laradock
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code>+ project-a
|
||||
+ laradock-a
|
||||
+ project-b
|
||||
+ laradock-b
|
||||
</code></pre>
|
||||
|
||||
<h5 id="a-2-setup-environment-first-then-create-project">A.2) Setup environment first then create project:</h5>
|
||||
<p>(It’s important to rename the folders differently in each project.)</p>
|
||||
|
||||
<p><em>(In case you don’t have a project, and you want to create your project inside the Docker environment)</em></p>
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="A2"></a></p>
|
||||
|
||||
<h3 id="a-2-don-t-have-a-php-project-yet">A.2) Don’t have a PHP project yet:</h3>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine:</p>
|
||||
|
||||
<pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>Note: In this case the folder structure will be like this:</p>
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code>- projects
|
||||
- laradock
|
||||
- myProject
|
||||
<pre><code>+ laradock
|
||||
+ project-z
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Edit the <code>docker-compose.yml</code> file to map to your project directory once you have it (example: <code>- ../myProject:/var/www</code>).</p>
|
||||
<p>2 - Edit your web server sites configuration.</p>
|
||||
|
||||
<p>3 - Stop and re-run your docker-compose command for the changes to take place.</p>
|
||||
<p><strong>In case of NGINX:</strong> open <code>nginx/sites/default.conf</code> and change the <code>root</code> from <code>/var/www/public</code> to <code>/var/www/{my-project-folder-name}/public</code>.</p>
|
||||
|
||||
<pre><code>docker-compose stop && docker-compose up -d XXXX YYYY ZZZZ ....
|
||||
</code></pre>
|
||||
<p><em>Or you can keep <code>default.conf</code> as it is, and create a separate config <code>my-site.conf</code> file for it.</em></p>
|
||||
|
||||
<h4 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h4>
|
||||
<p><strong>In case of Apache:</strong> :P</p>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine:</p>
|
||||
<p><br></p>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="B"></a></p>
|
||||
|
||||
<h3 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h3>
|
||||
|
||||
<blockquote>
|
||||
<p>(Follow these steps if you want a single Docker environment for all your project)</p>
|
||||
</blockquote>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine (similar to <a href="#A2">Steps A.2. from above</a>):</p>
|
||||
|
||||
<pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Edit the <code>docker-compose.yml</code> file to map to your projects directories:</p>
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code> applications:
|
||||
image: tianon/true
|
||||
volumes:
|
||||
- ../project1/:/var/www/project1
|
||||
- ../project2/:/var/www/project2
|
||||
<pre><code>+ laradock
|
||||
+ project-1
|
||||
+ project-2
|
||||
</code></pre>
|
||||
|
||||
<p>3 - You can access all sites by visiting <code>http://localhost/project1/public</code> and <code>http://localhost/project2/public</code> but of course that’s not very useful so let’s setup NGINX quickly.</p>
|
||||
<p>2 - Go to <code>nginx/sites</code> and create config files to point to different project directory when visiting different domains.</p>
|
||||
|
||||
<p>4 - Go to <code>nginx/sites</code> and copy <code>sample.conf.example</code> to <code>project1.conf</code> then to <code>project2.conf</code></p>
|
||||
<p>Laradock by default includes <code>project-1.conf</code> and <code>project-2.conf</code> as working samples.</p>
|
||||
|
||||
<p>5 - Open the <code>project1.conf</code> file and edit the <code>server_name</code> and the <code>root</code> as follow:</p>
|
||||
<p>3 - change the default names <code>project-n</code>:</p>
|
||||
|
||||
<pre><code> server_name project1.dev;
|
||||
root /var/www/project1/public;
|
||||
<p>You can rename the config files, project folders and domains as you like, just make sure the <code>root</code> in the config files, is pointing to the correct project folder name.</p>
|
||||
|
||||
<p>4 - Add the domains to the <strong>hosts</strong> files.</p>
|
||||
|
||||
<pre><code>127.0.0.1 project-1.dev
|
||||
127.0.0.1 project-2.dev
|
||||
</code></pre>
|
||||
|
||||
<p>Do the same for each project <code>project2.conf</code>, <code>project3.conf</code>,…</p>
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p>6 - Add the domains to the <strong>hosts</strong> files.</p>
|
||||
|
||||
<pre><code>127.0.0.1 project1.dev
|
||||
</code></pre>
|
||||
|
||||
<p>7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.</p>
|
||||
<p><a name="Usage"></a></p>
|
||||
|
||||
<h2 id="usage">Usage</h2>
|
||||
|
||||
@ -622,61 +648,72 @@ QUEUE_HOST=beanstalkd
|
||||
<p>If you are using <strong>Docker Toolbox</strong> (VM), do one of the following:</p>
|
||||
|
||||
<ul>
|
||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="#upgrading-laradock">Upgrading LaraDock</a></li>
|
||||
<li>Use LaraDock v3.* (Visit the <code>LaraDock-ToolBox</code> <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">Branch</a>).</li>
|
||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
||||
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">LaraDock-ToolBox</a> branch. <em>(outdated)</em></li>
|
||||
</ul>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Warning:</strong> If you used an older version of LaraDock it’s highly recommended to rebuild the containers you need to use <a href="#Build-Re-build-Containers">see how you rebuild a container</a> in order to prevent errors as much as possible.</p>
|
||||
<p><strong>Warning:</strong> If you used an older version of Laradock it’s highly recommended to rebuild the containers you need to use <a href="#Build-Re-build-Containers">see how you rebuild a container</a> in order to prevent as much errors as possible.</p>
|
||||
</blockquote>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<p>1 - Run Containers: <em>(Make sure you are in the <code>laradock</code> folder before running the <code>docker-compose</code> commands).</em></p>
|
||||
<p>1 - Enter the laradock folder and rename <code>env-example</code> to <code>.env</code></p>
|
||||
|
||||
<p><strong>Example:</strong> Running NGINX and MySQL:</p>
|
||||
<pre><code class="language-shell">cp env-example .env
|
||||
</code></pre>
|
||||
|
||||
<p>You can edit the <code>.env</code> file to chose which software’s you want to be installed in your environment. You can always refer to the <code>docker-compose.yml</code> file to see how those variables are been used.</p>
|
||||
|
||||
<p>2 - Build the enviroment and run it using <code>docker-compose</code></p>
|
||||
|
||||
<p>In this example we’ll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d nginx mysql
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note</strong>: The <code>workspace</code> and <code>php-fpm</code> will run automatically in most of the cases, so no need to specify them in the <code>up</code> command. If you couldn’t find them running then you need specify them as follow: <code>docker-compose up -d nginx php-fpm mysql workspace</code>.</p>
|
||||
|
||||
<p>You can select your own combination of Containers form the list below:</p>
|
||||
<p>You can select your own combination of containers form the list below:</p>
|
||||
|
||||
<p><code>nginx</code>, <code>hhvm</code>, <code>php-fpm</code>, <code>mysql</code>, <code>redis</code>, <code>postgres</code>, <code>mariadb</code>, <code>neo4j</code>, <code>mongo</code>, <code>apache2</code>, <code>caddy</code>, <code>memcached</code>, <code>beanstalkd</code>, <code>beanstalkd-console</code>, <code>rabbitmq</code>, <code>workspace</code>, <code>phpmyadmin</code>, <code>aerospike</code>, <code>pgadmin</code>, <code>elasticsearch</code>, <code>rethinkdb</code>.</p>
|
||||
<blockquote>
|
||||
<p><code>nginx</code>, <code>hhvm</code>, <code>php-fpm</code>, <code>mysql</code>, <code>redis</code>, <code>postgres</code>, <code>mariadb</code>, <code>neo4j</code>, <code>mongo</code>, <code>apache2</code>, <code>caddy</code>, <code>memcached</code>, <code>beanstalkd</code>, <code>beanstalkd-console</code>, <code>rabbitmq</code>, <code>beanstalkd-console</code>, <code>workspace</code>, <code>phpmyadmin</code>, <code>adminer</code>, <code>aerospike</code>, <code>pgadmin</code>, <code>elasticsearch</code>, <code>rethinkdb</code>, <code>postgres-postgis</code>, <code>certbot</code>, <code>mailhog</code>, <code>minio</code> and more…!</p>
|
||||
</blockquote>
|
||||
|
||||
<p><em>(Please note that sometimes we forget to update the docs, so check the <code>docker-compose.yml</code> file to see an updated list of all available containers).</em></p>
|
||||
|
||||
<p><br>
|
||||
2 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, …).</p>
|
||||
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, …)</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose exec workspace bash
|
||||
</code></pre>
|
||||
|
||||
<p>Alternatively, for Windows PowerShell users: execute the following command to enter any running container:</p>
|
||||
<p><em>Alternatively, for Windows PowerShell users: execute the following command to enter any running container:</em></p>
|
||||
|
||||
<pre><code class="language-bash">docker exec -it {workspace-container-id} bash
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note:</strong> You can add <code>--user=laradock</code> (example <code>docker-compose exec --user=laradock workspace bash</code>) to have files created as your host’s user. (you can change the PUID (User id) and PGID (group id) variables from the <code>docker-compose.yml</code>).</p>
|
||||
<p><strong>Note:</strong> You can add <code>--user=laradock</code> to have files created as your host’s user. Example:</p>
|
||||
|
||||
<pre><code class="language-shell">docker-compose exec --user=laradock workspace bash
|
||||
</code></pre>
|
||||
|
||||
<p><em>You can change the PUID (User id) and PGID (group id) variables from the <code>.env</code> file)</em></p>
|
||||
|
||||
<p><br>
|
||||
3 - Edit your project configurations.</p>
|
||||
4 - Update your project configurations to use the database host</p>
|
||||
|
||||
<p>Open your <code>.env</code> file and set the <code>DB_HOST</code> to <code>mysql</code>:</p>
|
||||
<p>Open your PHP project’s <code>.env</code> file or whichever configuration file you are reading from, and set the database host <code>DB_HOST</code> to <code>mysql</code>:</p>
|
||||
|
||||
<pre><code class="language-env">DB_HOST=mysql
|
||||
</code></pre>
|
||||
|
||||
<p><em>If you want to use Laravel and you don’t have it installed yet, see <a href="#Install-Laravel">How to Install Laravel in a Docker Container</a>.</em></p>
|
||||
<p><em>If you want to install Laravel as PHP project, see <a href="#Install-Laravel">How to Install Laravel in a Docker Container</a>.</em></p>
|
||||
|
||||
<p><br>
|
||||
4 - Open your browser and visit your localhost address (<code>http://localhost/</code>).</p>
|
||||
|
||||
<p><br>
|
||||
<strong>Debugging</strong>: if you are facing any problem here check the <a href="#debugging">Debugging</a> section.</p>
|
||||
|
||||
<p>If you need a special support. Contact me, more details in the <a href="#Help">Help & Questions</a> section.</p>
|
||||
5 - Open your browser and visit your localhost address <code>http://localhost/</code>. If you followed the multiple projects setup, you can visit <code>http://project-1.dev/</code> and <code>http://project-2.dev/</code>. But first don’t</p>
|
||||
|
||||
|
||||
<h1>Documentation </h1>
|
||||
@ -817,6 +854,11 @@ example for <code>mysql</code> it will be <code>mysql/Dockerfile</code>.</p>
|
||||
<pre><code class="language-bash">docker logs {container-name}
|
||||
</code></pre>
|
||||
|
||||
<p>More <a href="https://docs.docker.com/compose/reference/logs/">options</a></p>
|
||||
|
||||
<pre><code class="language-bash">docker logs -f {container-name}
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
<a name="PHP"></a></p>
|
||||
|
||||
@ -947,7 +989,7 @@ xdebug.remote_connect_back=1
|
||||
|
||||
<p>By installing xDebug, you are enabling it to run on startup by default.</p>
|
||||
|
||||
<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the LaraDock root folder, (at the same prompt where you run docker-compose):</p>
|
||||
<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the Laradock root folder, (at the same prompt where you run docker-compose):</p>
|
||||
|
||||
<ul>
|
||||
<li>Stop xDebug from running by default: <code>./xdebugPhpFpm stop</code>.</li>
|
||||
@ -987,11 +1029,11 @@ xdebug.remote_connect_back=1
|
||||
<a name="Production"></a></p>
|
||||
|
||||
<p><br>
|
||||
<a name="LaraDock-for-Production"></a></p>
|
||||
<a name="Laradock-for-Production"></a></p>
|
||||
|
||||
<h2 id="prepare-laradock-for-production">Prepare LaraDock for Production</h2>
|
||||
<h2 id="prepare-laradock-for-production">Prepare Laradock for Production</h2>
|
||||
|
||||
<p>It’s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, LaraDock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p>
|
||||
<p>It’s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, Laradock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p>
|
||||
|
||||
<p>Note: The Database (MySQL/MariaDB/…) ports should not be forwarded on production, because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. So make sure to remove these lines:</p>
|
||||
|
||||
@ -1032,7 +1074,7 @@ xdebug.remote_connect_back=1
|
||||
|
||||
<p>3 - Edit <code>docker-compose.yml</code> to Map the new application path:</p>
|
||||
|
||||
<p>By default, LaraDock assumes the Laravel application is living in the parent directory of the laradock folder.</p>
|
||||
<p>By default, Laradock assumes the Laravel application is living in the parent directory of the laradock folder.</p>
|
||||
|
||||
<p>Since the new Laravel application is in the <code>my-cool-app</code> folder, we need to replace <code>../:/var/www</code> with <code>../my-cool-app/:/var/www</code>, as follow:</p>
|
||||
|
||||
@ -1048,7 +1090,7 @@ xdebug.remote_connect_back=1
|
||||
<pre><code class="language-bash">cd my-cool-app
|
||||
</code></pre>
|
||||
|
||||
<p>5 - Go back to the LaraDock installation steps to see how to edit the <code>.env</code> file.</p>
|
||||
<p>5 - Go back to the Laradock installation steps to see how to edit the <code>.env</code> file.</p>
|
||||
|
||||
<p><br>
|
||||
<a name="Run-Artisan-Commands"></a></p>
|
||||
@ -1150,7 +1192,7 @@ SESSION_DRIVER=redis
|
||||
|
||||
<p>5 - You can manually test it from Laravel with this code:</p>
|
||||
|
||||
<pre><code class="language-php">\Cache::store('redis')->put('LaraDock', 'Awesome', 10);
|
||||
<pre><code class="language-php">\Cache::store('redis')->put('Laradock', 'Awesome', 10);
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
@ -1253,6 +1295,18 @@ docker-compose up -d mariadb phpmyadmin
|
||||
|
||||
<p>2 - Open your browser and visit the localhost on port <strong>8080</strong>: <code>http://localhost:8080</code></p>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-Adminer"></a></p>
|
||||
|
||||
<h2 id="use-adminer">Use Adminer</h2>
|
||||
|
||||
<p>1 - Run the Adminer Container (<code>adminer</code>) with the <code>docker-compose up</code> command. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d adminer
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Open your browser and visit the localhost on port <strong>8080</strong>: <code>http://localhost:8080</code></p>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-pgAdmin"></a></p>
|
||||
|
||||
@ -1379,6 +1433,36 @@ A package (<a href="https://github.com/duxet/laravel-rethinkdb">Laravel RethinkD
|
||||
<li>set the <code>DB_DATABASE</code> to <code>database</code>.</li>
|
||||
</ul>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-Minio"></a></p>
|
||||
|
||||
<h2 id="use-minio">Use Minio</h2>
|
||||
|
||||
<p>1 - Configure Minio:
|
||||
- On the workspace container, change <code>INSTALL_MC</code> to true to get the client
|
||||
- Set <code>MINIO_ACCESS_KEY</code> and <code>MINIO_ACCESS_SECRET</code> if you wish to set proper keys</p>
|
||||
|
||||
<p>2 - Run the Minio Container (<code>minio</code>) with the <code>docker-compose up</code> command. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d minio
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Open your browser and visit the localhost on port <strong>9000</strong> at the following URL: <code>http://localhost:9000</code></p>
|
||||
|
||||
<p>4 - Create a bucket either through the webui or using the mc client:</p>
|
||||
|
||||
<pre><code class="language-bash"> mc mb minio/bucket
|
||||
</code></pre>
|
||||
|
||||
<p>5 - When configuring your other clients use the following details:</p>
|
||||
|
||||
<pre><code> S3_HOST=http://minio
|
||||
S3_KEY=access
|
||||
S3_SECRET=secretkey
|
||||
S3_REGION=us-east-1
|
||||
S3_BUCKET=bucket
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
<a name="CodeIgniter"></a></p>
|
||||
|
||||
@ -1387,7 +1471,7 @@ A package (<a href="https://github.com/duxet/laravel-rethinkdb">Laravel RethinkD
|
||||
|
||||
<h2 id="install-codeigniter">Install CodeIgniter</h2>
|
||||
|
||||
<p>To install CodeIgniter 3 on LaraDock all you have to do is the following simple steps:</p>
|
||||
<p>To install CodeIgniter 3 on Laradock all you have to do is the following simple steps:</p>
|
||||
|
||||
<p>1 - Open the <code>docker-compose.yml</code> file.</p>
|
||||
|
||||
@ -1627,7 +1711,7 @@ port=1234
|
||||
|
||||
<h2 id="common-terminal-aliases">Common Terminal Aliases</h2>
|
||||
|
||||
<p>When you start your docker container, LaraDock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p>
|
||||
<p>When you start your docker container, Laradock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p>
|
||||
|
||||
<p>You are free to modify the <code>aliases.sh</code> as you see fit, adding your own aliases (or function macros) to suit your requirements.</p>
|
||||
|
||||
@ -1702,12 +1786,12 @@ e) set it to <code>true</code></p>
|
||||
<p><a href="https://github.com/laradock/laradock/blob/master/_guides/phpstorm.md"><strong>Debugging Guide Here</strong></a></p>
|
||||
|
||||
<p><br>
|
||||
<a name="keep-tracking-LaraDock"></a></p>
|
||||
<a name="keep-tracking-Laradock"></a></p>
|
||||
|
||||
<h2 id="keep-track-of-your-laradock-changes">Keep track of your LaraDock changes</h2>
|
||||
<h2 id="keep-track-of-your-laradock-changes">Keep track of your Laradock changes</h2>
|
||||
|
||||
<ol>
|
||||
<li>Fork the LaraDock repository.</li>
|
||||
<li>Fork the Laradock repository.</li>
|
||||
<li>Use that fork as a submodule.</li>
|
||||
<li>Commit all your changes to your fork.</li>
|
||||
<li>Pull new stuff from the main repository from time to time.</li>
|
||||
@ -1716,15 +1800,15 @@ e) set it to <code>true</code></p>
|
||||
<p><br>
|
||||
<a name="upgrading-laradock"></a></p>
|
||||
|
||||
<h2 id="upgrading-laradock">Upgrading LaraDock</h2>
|
||||
<h2 id="upgrading-laradock">Upgrading Laradock</h2>
|
||||
|
||||
<p>Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading LaraDock from v3.* to v4.*:</p>
|
||||
<p>Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading Laradock from v3.* to v4.*:</p>
|
||||
|
||||
<ol>
|
||||
<li>Stop the docker VM <code>docker-machine stop {default}</code></li>
|
||||
<li>Install Docker for <a href="https://docs.docker.com/docker-for-mac/">Mac</a> or <a href="https://docs.docker.com/docker-for-windows/">Windows</a>.</li>
|
||||
<li>Upgrade LaraDock to <code>v4.*.*</code> (<code>git pull origin master</code>)</li>
|
||||
<li>Use LaraDock as you used to do: <code>docker-compose up -d nginx mysql</code>.</li>
|
||||
<li>Upgrade Laradock to <code>v4.*.*</code> (<code>git pull origin master</code>)</li>
|
||||
<li>Use Laradock as you used to do: <code>docker-compose up -d nginx mysql</code>.</li>
|
||||
</ol>
|
||||
|
||||
<p><strong>Note:</strong> If you face any problem with the last step above: rebuild all your containers
|
||||
@ -1736,13 +1820,27 @@ e) set it to <code>true</code></p>
|
||||
|
||||
<h2 id="improve-speed-on-macos">Improve speed on MacOS</h2>
|
||||
|
||||
<p>Sharing code into Docker containers with osxfs have very poor performance compared to Linux. You can get around this issue by using NFS to share your files betwen your host and your container.</p>
|
||||
<p>Sharing code into Docker containers with osxfs have very poor performance compared to Linux. Likely there are some workarounds:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>How to share files using NFS (d4m-nfs)</p>
|
||||
</blockquote>
|
||||
<h3 id="workaround-a-using-dinghy">Workaround A: using dinghy</h3>
|
||||
|
||||
<p><a href="https://github.com/IFSight/d4m-nfs">d4m-nfs</a> automatically mount NFS volume instead of osxfs one.</p>
|
||||
<p><a href="https://github.com/codekitchen/dinghy">Dinghy</a> creates its own VM using docker-machine, it will not modify your existing docker-machine VMs.</p>
|
||||
|
||||
<p>Quick Setup giude, (we recommend you check their docs)</p>
|
||||
|
||||
<p>1) <code>brew tap codekitchen/dinghy</code></p>
|
||||
|
||||
<p>2) <code>brew install dinghy</code></p>
|
||||
|
||||
<p>3) <code>dinghy create --provider virtualbox</code> (must have virtualbox installed, but they support other providers if you prefer)</p>
|
||||
|
||||
<p>4) after the above command is done it will display some env variables, copy them to the bash profile or zsh or.. (this will instruct docker to use the server running inside the VM)</p>
|
||||
|
||||
<p>5) <code>docker-compose up ...</code></p>
|
||||
|
||||
<h3 id="workaround-b-using-d4m-nfs">Workaround B: using d4m-nfs</h3>
|
||||
|
||||
<p><a href="https://github.com/IFSight/d4m-nfs">D4m-nfs</a> automatically mount NFS volume instead of osxfs one.</p>
|
||||
|
||||
<p>1) Update the Docker [File Sharing] preferences:</p>
|
||||
|
||||
@ -1758,23 +1856,30 @@ e) set it to <code>true</code></p>
|
||||
<p>4) Create (or edit) the file <code>~/d4m-nfs/etc/d4m-nfs-mounts.txt</code>, and write the follwing configuration in it:</p>
|
||||
|
||||
<pre><code class="language-txt">/Users:/Users
|
||||
/Volumes:/Volumes
|
||||
/private:/private
|
||||
</code></pre>
|
||||
|
||||
<p>5) Create (or edit) the file <code>/etc/exports</code>, make sure it exists and is empty. (There may be collisions if you come from Vagrant or if you already executed the <code>d4m-nfs.sh</code> script before).</p>
|
||||
|
||||
<p>6) Run the <code>d4m-nfs.sh</code> script:</p>
|
||||
<p>6) Run the <code>d4m-nfs.sh</code> script (might need Sudo):</p>
|
||||
|
||||
<pre><code class="language-bash">~/d4m-nfs/d4m-nfs.sh
|
||||
</code></pre>
|
||||
|
||||
<p>That’s it! Run your containers.. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d nginx mysql
|
||||
<pre><code class="language-bash">docker-compose up ...
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note:</strong> If you faced any errors, try restarting Docker, and make sure you have no spaces in the <code>d4m-nfs-mounts.txt</code> file, and your <code>/etc/exports</code> file is clear.</p>
|
||||
<p><em>Note: If you faced any errors, try restarting Docker, and make sure you have no spaces in the <code>d4m-nfs-mounts.txt</code> file, and your <code>/etc/exports</code> file is clear.</em></p>
|
||||
|
||||
<h3 id="other-good-workarounds">Other good workarounds:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/EugenMayer/docker-sync">docker-sync</a></li>
|
||||
<li>Add more here..</li>
|
||||
</ul>
|
||||
|
||||
<p>More details about this issue <a href="https://github.com/docker/for-mac/issues/77">here</a>.</p>
|
||||
|
||||
<p><br>
|
||||
<a name="Common-Problems"></a></p>
|
||||
@ -1840,18 +1945,18 @@ e) set it to <code>true</code></p>
|
||||
<li>Option B
|
||||
|
||||
<ol>
|
||||
<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The LaraDock docker-compose file currently has this as <code>mysql</code></li>
|
||||
<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as <code>mysql</code></li>
|
||||
</ol></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h1>Related Projects </h1>
|
||||
|
||||
<p>LaraDock related projects:</p>
|
||||
<p>Laradock related projects:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/lorinlee/laradock-cli">LaraDock CLI</a> by <a href="https://github.com/lorinlee">LorinLee</a></li>
|
||||
<li><a href="https://github.com/bagart/laradock_env">LaraDock Env</a> by <a href="https://github.com/bagart">BAGArt</a></li>
|
||||
<li><a href="https://github.com/lorinlee/laradock-cli">Laradock CLI</a> by <a href="https://github.com/lorinlee">LorinLee</a></li>
|
||||
<li><a href="https://github.com/bagart/laradock_env">Laradock Env</a> by <a href="https://github.com/bagart">BAGArt</a></li>
|
||||
<li><a href="https://github.com/poyhsiao/Klaradock">Klaradock</a> by <a href="https://github.com/poyhsiao">Kim Hsiao</a></li>
|
||||
<li><a href="https://github.com/sifat-rahim/ansible-laradock-kubernetes">Ansible Laradock Kubernetes</a> by <a href="https://github.com/sifat-rahim">Sifat Rahim</a>
|
||||
These Docker Compose projects have piqued our interest:</li>
|
||||
@ -1865,9 +1970,9 @@ These Docker Compose projects have piqued our interest:</li>
|
||||
|
||||
<h1>Help & Questions </h1>
|
||||
|
||||
<p>Join the chat room on <a href="https://gitter.im/LaraDock/laradock">Gitter</a> and get help and support from the community.</p>
|
||||
<p>Join the chat room on <a href="https://gitter.im/Laradock/laradock">Gitter</a> and get help and support from the community.</p>
|
||||
|
||||
<p>You can as well can open an <a href="https://github.com/laradock/laradock/issues">issue</a> on Github (will be labeled as Question) and discuss it with people on <a href="https://gitter.im/LaraDock/laradock">Gitter</a>.</p>
|
||||
<p>You can as well can open an <a href="https://github.com/laradock/laradock/issues">issue</a> on Github (will be labeled as Question) and discuss it with people on <a href="https://gitter.im/Laradock/laradock">Gitter</a>.</p>
|
||||
|
||||
|
||||
<h1>Contributing </h1>
|
||||
@ -1876,39 +1981,52 @@ These Docker Compose projects have piqued our interest:</li>
|
||||
|
||||
<p>Your contribution is more than welcome.</p>
|
||||
|
||||
<h2 id="got-a-question-or-problem">Got a Question or Problem?</h2>
|
||||
<h2 id="i-have-a-question-problem">I have a Question/Problem</h2>
|
||||
|
||||
<p>If you have questions about how to use LaraDock, please direct your questions to the discussion on <a href="https://gitter.im/LaraDock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as Question).</p>
|
||||
<p>If you have questions about how to use Laradock, please direct your questions to the discussion on <a href="https://gitter.im/Laradock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as <code>Question</code>) And you can still seek help on Gitter for it.</p>
|
||||
|
||||
<h2 id="found-an-issue">Found an Issue?</h2>
|
||||
<h2 id="i-found-an-issue">I found an Issue</h2>
|
||||
|
||||
<p>If you find a bug in the source code or a mistake in the documentation, you can help us by
|
||||
submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a>. Even better you can submit a Pull Request with a fix.</p>
|
||||
<p>If have an issue or you found a typo in the documentation, you can help us by
|
||||
opnening an <a href="https://github.com/laradock/laradock/issues">Issue</a>.</p>
|
||||
|
||||
<h2 id="want-a-feature">Want a Feature?</h2>
|
||||
<p><strong>Steps to do before opening an Issue:</strong></p>
|
||||
|
||||
<p>You can request a new feature by submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request.</p>
|
||||
<ol>
|
||||
<li><p>Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).</p></li>
|
||||
|
||||
<h2 id="edit-the-documentation">Edit the documentation</h2>
|
||||
<li><p>Decide if the Issue belongs to this project or to <a href="https://github.com/docker">Docker</a> itself! or even the tool you are using such as Nginx or MongoDB…</p></li>
|
||||
</ol>
|
||||
|
||||
<p>If your issue appears to be a bug, and hasn’t been reported, then open a new issue.</p>
|
||||
|
||||
<p><em>This Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.</em></p>
|
||||
|
||||
<h2 id="i-want-a-feature">I want a Feature</h2>
|
||||
|
||||
<p>You can request a new feature by submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as <code>Feature Suggestion</code>). If you would like to implement a new feature then consider submitting a Pull Request yourself.</p>
|
||||
|
||||
<h2 id="i-want-to-update-the-documentation-site">I want to update the Documentation (Site)</h2>
|
||||
|
||||
<p>Laradock uses <a href="https://gohugo.io/">Hugo</a> as website generator tool, with the <a href="http://themes.gohugo.io/theme/material-docs/">Material Docs theme</a>. You might need to check their docs quickly.</p>
|
||||
|
||||
<ol>
|
||||
<li>Install <a href="https://gohugo.io/">Hugo</a> on your machine.</li>
|
||||
<li>Clone laradock.</li>
|
||||
<li>Go to <code>/docs</code>.</li>
|
||||
<li>Delete everything except the <code>_settings</code> folder & the <code>CNAME</code> file.</li>
|
||||
<li>Open <code>docs/_settings</code> from your terminal and run <code>hugo serve</code> to host the website locally.</li>
|
||||
<li>Open the <code>docs/_settings/content</code> and search for the folder of the section you want to edit.</li>
|
||||
<li>In each secion there’s an <code>index.md</code> file, that’s the file you need to edit.</li>
|
||||
<li>To edit the sidebar (in case you are adding new section) go to <code>docs/_settings/config.toml</code> and add the section there.</li>
|
||||
<li>After done editing, run the this command <code>hugo</code> to generate the updated site inside the <code>docs</code> folder.</li>
|
||||
<li>Go back to the project root directory, commit and push..</li>
|
||||
<li>Install <a href="https://gohugo.io/">Hugo</a> on your machine (easy thing).</li>
|
||||
<li>Open the <code>DOCUMENTATION/_settings/content</code> and search for the markdown file you want to edit (every folder represents a section in the menu).</li>
|
||||
<li>Delete the <code>/docs</code> folder from the root.</li>
|
||||
<li>When you finish editing, go to <code>DOCUMENTATION/_settings/</code> and run the <code>hugo</code> command to generate the HTML docs (inside new <code>/docs</code> folder).</li>
|
||||
</ol>
|
||||
|
||||
<h2 id="coding-guidelines">Coding Guidelines</h2>
|
||||
<h3 id="to-host-the-website-locally">To Host the website locally</h3>
|
||||
|
||||
<h2 id="support-new-software">Support new Software</h2>
|
||||
<p>Go to <code>DOCUMENTATION/_settings</code> in your terminal and run <code>hugo serve</code> to host the website locally.</p>
|
||||
|
||||
<h3 id="edit-the-sidebar">Edit the sidebar</h3>
|
||||
|
||||
<p>To add a new section to the sidebar or edit existing one, you need to edit this file <code>DOCUMENTATION/_settings/config.toml</code>.</p>
|
||||
|
||||
<h2 id="how-to-support-new-software-add-new-container">How to support new Software (Add new Container)</h2>
|
||||
|
||||
<ul>
|
||||
<li><p>Create folder with the software name.</p></li>
|
||||
@ -1921,10 +2039,10 @@ submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a>. E
|
||||
|
||||
<li><p>Make sure you follow our commenting style.</p></li>
|
||||
|
||||
<li><p>Add the software in the <code>Readme</code>.</p></li>
|
||||
<li><p>Add the software in the <code>Documentation</code>.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="edit-existing-software">Edit existing Software</h2>
|
||||
<h2 id="edit-existing-software-edit-a-container">Edit existing Software (Edit a Container)</h2>
|
||||
|
||||
<ul>
|
||||
<li><p>Open the software (container) folder.</p></li>
|
||||
@ -1932,22 +2050,14 @@ submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a>. E
|
||||
<li><p>Edit the files you want to update.</p></li>
|
||||
|
||||
<li><p><strong>Note:</strong> If you want to edit the base image of the <code>Workspace</code> or the <code>php-fpm</code> Containers,
|
||||
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the LaraDock repository.</p></li>
|
||||
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the Laradock repository.</p></li>
|
||||
|
||||
<li><p>Make sure to update the <code>Readme</code> in case you made any changes.</p></li>
|
||||
<li><p>Make sure to update the <code>Documentation</code> in case you made any changes.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="issue-pr-submission-guidelines">Issue/PR Submission Guidelines</h2>
|
||||
<h2 id="pull-request">Pull Request</h2>
|
||||
|
||||
<h2 id="submitting-an-issue">Submitting an Issue</h2>
|
||||
|
||||
<p>Before you submit your issue search the archive, maybe your question was already answered.</p>
|
||||
|
||||
<p>If your issue appears to be a bug, and hasn’t been reported, open a new issue.
|
||||
Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.</p>
|
||||
|
||||
<h2 id="before-submitting-a-pull-request-pr">Before Submitting a Pull Request (PR)</h2>
|
||||
<h3 id="1-before-submitting-a-pull-request-pr">1. Before Submitting a Pull Request (PR)</h3>
|
||||
|
||||
<p>Always Test everything and make sure its working:</p>
|
||||
|
||||
@ -1963,16 +2073,16 @@ features, by not reporting duplicate issues.</p>
|
||||
|
||||
<ul>
|
||||
<li>Testing building the container (docker-compose build container-name) with no errors.</li>
|
||||
<li>Test it in real App.</li>
|
||||
<li>Test it in a real App if possible.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="submitting-a-pr">Submitting a PR</h2>
|
||||
<h3 id="2-submitting-a-pr">2. Submitting a PR</h3>
|
||||
|
||||
<p>Consider the following guidelines:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Search <a href="https://github.com/laradock/laradock/pulls">GitHub</a> for an open or closed Pull Request that relates to your submission. You don’t want to duplicate effort.</p></li>
|
||||
<li><p>Search <a href="https://github.com/laradock/laradock/pulls">GitHub</a> for an open or closed Pull Request that relates to your submission. You don’t want to duplicate efforts.</p></li>
|
||||
|
||||
<li><p>Make your changes in a new git branch:</p>
|
||||
|
||||
@ -2007,10 +2117,9 @@ git push origin my-fix-branch -f
|
||||
|
||||
<p><em>WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.</em></p>
|
||||
|
||||
<h2 id="after-your-pr-is-merged">After your PR is merged</h2>
|
||||
<h3 id="3-after-your-pr-is-merged">3. After your PR is merged</h3>
|
||||
|
||||
<p>After your pull request is merged, you can safely delete your branch and pull the changes
|
||||
from the main (upstream) repository:</p>
|
||||
<p>After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:</p>
|
||||
@ -2036,7 +2145,7 @@ from the main (upstream) repository:</p>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<h2 id="happy-coding">Happy Coding :)</h2>
|
||||
<h4 id="happy-coding">Happy Coding :)</h4>
|
||||
|
||||
|
||||
<h1>License </h1>
|
||||
@ -2054,7 +2163,9 @@ from the main (upstream) repository:</p>
|
||||
Documentation built with
|
||||
<a href="https://www.gohugo.io" target="_blank">Hugo</a>
|
||||
using the
|
||||
<a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme.
|
||||
<a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme,
|
||||
by
|
||||
<a href="https://zalt.me">Mahmoud Zalt</a>.
|
||||
</aside>
|
||||
|
||||
<footer class="footer">
|
||||
@ -2105,8 +2216,8 @@ from the main (upstream) repository:</p>
|
||||
|
||||
<script>
|
||||
|
||||
var base_url = 'http:\/\/laradock.io\/';
|
||||
var repo_id = 'laradock\/laradock';
|
||||
var base_url = '';
|
||||
var repo_id = '';
|
||||
|
||||
</script>
|
||||
|
||||
|
432
docs/index.xml
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Laradock Docs</title>
|
||||
<title>Laradock</title>
|
||||
<link>http://laradock.io/index.xml</link>
|
||||
<description>Recent content on Laradock Docs</description>
|
||||
<description>Recent content on Laradock</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<atom:link href="http://laradock.io/index.xml" rel="self" type="application/rss+xml" />
|
||||
@ -16,27 +16,32 @@
|
||||
<guid>http://laradock.io/introduction/</guid>
|
||||
<description>
|
||||
|
||||
<p>LaraDock strives to make the PHP development experience easier and faster.</p>
|
||||
<p>Laradock strives to make the PHP development experience easier and faster.</p>
|
||||
|
||||
<p>It contains pre-packaged Docker Images that provides you a wonderful <em>development</em> environment without requiring you to install PHP, NGINX, MySQL, Redis, and any other software on your machines.</p>
|
||||
|
||||
<p>LaraDock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal&hellip;).</p>
|
||||
<p>Laradock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal&hellip;).</p>
|
||||
|
||||
<h2 id="quick-overview">Quick Overview</h2>
|
||||
|
||||
<p>Let&rsquo;s see how easy it is to install <code>NGINX</code>, <code>PHP</code>, <code>Composer</code>, <code>MySQL</code>, <code>Redis</code> and <code>beanstalkd</code>:</p>
|
||||
|
||||
<p>1 - Clone LaraDock inside your PHP project:</p>
|
||||
<p>1 - Clone Laradock inside your PHP project:</p>
|
||||
|
||||
<pre><code class="language-shell">git clone https://github.com/Laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Enter the laradock folder and run this command:</p>
|
||||
<p>2 - Enter the laradock folder and rename <code>env-example</code> to <code>.env</code>.</p>
|
||||
|
||||
<pre><code class="language-shell">cp env-example .env
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Run your containers:</p>
|
||||
|
||||
<pre><code class="language-shell">docker-compose up -d nginx mysql redis beanstalkd
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Open your <code>.env</code> file and set the following:</p>
|
||||
<p>3 - Open your project&rsquo;s <code>.env</code> file and set the following:</p>
|
||||
|
||||
<pre><code class="language-shell">DB_HOST=mysql
|
||||
REDIS_HOST=redis
|
||||
@ -68,21 +73,21 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<p><a name="laradock-vs-homestead"></a></p>
|
||||
|
||||
<h2 id="laradock-vs-homestead-for-laravel-developers">LaraDock VS Homestead (For Laravel Developers)</h2>
|
||||
<h2 id="laradock-vs-homestead-for-laravel-developers">Laradock VS Homestead (For Laravel Developers)</h2>
|
||||
|
||||
<blockquote>
|
||||
<p>LaraDock It&rsquo;s like Laravel Homestead but for Docker instead of Vagrant.</p>
|
||||
<p>Laradock It&rsquo;s like Laravel Homestead but for Docker instead of Vagrant.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>LaraDock and <a href="https://laravel.com/docs/master/homestead">Homestead</a> both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).</p>
|
||||
<p>Laradock and <a href="https://laravel.com/docs/master/homestead">Homestead</a> both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine.</p></li>
|
||||
|
||||
<li><p>LaraDock is a tool that controls Docker for you (using Docker &amp; Docker Compose official commands). And Docker manages your Virtual Containers.</p></li>
|
||||
<li><p>Laradock is a tool that controls Docker for you (using Docker &amp; Docker Compose official commands). And Docker manages your Virtual Containers.</p></li>
|
||||
</ul>
|
||||
|
||||
<p>Running a virtual container is much faster than running a full virtual Machine. Thus <strong>LaraDock is much faster than Homestead</strong>.</p>
|
||||
<p>Running a virtual container is much faster than running a full virtual Machine. Thus <strong>Laradock is much faster than Homestead</strong>.</p>
|
||||
|
||||
<p><a name="Demo"></a></p>
|
||||
|
||||
@ -91,10 +96,10 @@ QUEUE_HOST=beanstalkd
|
||||
<p>What&rsquo;s better than a <strong>Demo Video</strong>:</p>
|
||||
|
||||
<ul>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=TQii1jDa96Y">v4.*</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=-DamFMczwDA">v2.*</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=jGkyO6Is_aI">v0.3</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=3YQsHe6oF80">v0.1</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=TQii1jDa96Y">v4.*</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=-DamFMczwDA">v2.*</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=jGkyO6Is_aI">v0.3</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=3YQsHe6oF80">v0.1</a></li>
|
||||
</ul>
|
||||
|
||||
<p><a name="features"></a></p>
|
||||
@ -126,11 +131,12 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<ul>
|
||||
<li>MySQL</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>MariaDB</li>
|
||||
<li>MongoDB</li>
|
||||
<li>Neo4j</li>
|
||||
<li>RethinkDB</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>Postgres Postgis</li>
|
||||
</ul></li>
|
||||
<li><strong>Cache Engines:</strong>
|
||||
|
||||
@ -164,9 +170,13 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<ul>
|
||||
<li>PhpMyAdmin</li>
|
||||
<li>Adminer</li>
|
||||
<li>PgAdmin</li>
|
||||
<li>ElasticSearch</li>
|
||||
<li>Selenium</li>
|
||||
<li>Certbot</li>
|
||||
<li>Mailhog</li>
|
||||
<li>Minio</li>
|
||||
<li>Workspace
|
||||
|
||||
<ul>
|
||||
@ -197,7 +207,7 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<p>You are welcome to join our chat room on Gitter.</p>
|
||||
|
||||
<p><a href="https://gitter.im/LaraDock/laradock?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://badges.gitter.im/LaraDock/laradock.svg" alt="Gitter" /></a></p>
|
||||
<p><a href="https://gitter.im/Laradock/laradock?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://badges.gitter.im/Laradock/laradock.svg" alt="Gitter" /></a></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
@ -220,88 +230,123 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<p>Choose the setup the best suits your needs.</p>
|
||||
|
||||
<h4 id="a-setup-for-single-project">A) Setup for Single Project:</h4>
|
||||
<ul>
|
||||
<li><a href="#A">A) Setup for Single Project</a>
|
||||
|
||||
<p><em>(In case you want a Docker environment for each project)</em></p>
|
||||
<ul>
|
||||
<li><a href="#A1">A.1) Already have a PHP project</a></li>
|
||||
<li><a href="#A2">A.2) Don&rsquo;t have a PHP project yet</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#B">B) Setup for Multiple Projects</a></li>
|
||||
</ul>
|
||||
|
||||
<h5 id="a-1-setup-environment-in-existing-project">A.1) Setup environment in existing Project:</h5>
|
||||
<p><a name="A"></a></p>
|
||||
|
||||
<p><em>(In case you already have a project, and you want to setup an environment to run it)</em></p>
|
||||
<h3 id="a-setup-for-single-project">A) Setup for Single Project</h3>
|
||||
|
||||
<p>1 - Clone this repository on your project root directory:</p>
|
||||
<blockquote>
|
||||
<p>(Follow these steps if you want a separate Docker environment for each project)</p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="A1"></a></p>
|
||||
|
||||
<h3 id="a-1-already-have-a-php-project">A.1) Already have a PHP project:</h3>
|
||||
|
||||
<p>1 - Clone laradock on your project root directory:</p>
|
||||
|
||||
<pre><code class="language-bash">git submodule add https://github.com/Laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p><em>Note 1: If you are not yet using Git for your PHP project, you can use <code>git clone https://github.com/Laradock/laradock.git</code> instead.</em></p>
|
||||
<p><strong>Notes:</strong></p>
|
||||
|
||||
<p><em>Note 2: To keep track of your LaraDock changes, between your projects and also keep LaraDock updated. <a href="#keep-tracking-LaraDock">Check this</a></em></p>
|
||||
<ul>
|
||||
<li><p>If you are not using Git yet for your project, you can use <code>git clone</code> instead of <code>git submodule</code>.</p></li>
|
||||
|
||||
<p><em>Note 3: In this case the folder structure will be like this:</em></p>
|
||||
<li><p>Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. <a href="http://laradock.io/documentation/#keep-track-of-your-laradock-changes">Check this</a></p></li>
|
||||
</ul>
|
||||
|
||||
<pre><code>- project1
|
||||
- laradock
|
||||
- project2
|
||||
- laradock
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code>+ project-a
|
||||
+ laradock-a
|
||||
+ project-b
|
||||
+ laradock-b
|
||||
</code></pre>
|
||||
|
||||
<h5 id="a-2-setup-environment-first-then-create-project">A.2) Setup environment first then create project:</h5>
|
||||
<p>(It&rsquo;s important to rename the folders differently in each project.)</p>
|
||||
|
||||
<p><em>(In case you don&rsquo;t have a project, and you want to create your project inside the Docker environment)</em></p>
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="A2"></a></p>
|
||||
|
||||
<h3 id="a-2-don-t-have-a-php-project-yet">A.2) Don&rsquo;t have a PHP project yet:</h3>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine:</p>
|
||||
|
||||
<pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>Note: In this case the folder structure will be like this:</p>
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code>- projects
|
||||
- laradock
|
||||
- myProject
|
||||
<pre><code>+ laradock
|
||||
+ project-z
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Edit the <code>docker-compose.yml</code> file to map to your project directory once you have it (example: <code>- ../myProject:/var/www</code>).</p>
|
||||
<p>2 - Edit your web server sites configuration.</p>
|
||||
|
||||
<p>3 - Stop and re-run your docker-compose command for the changes to take place.</p>
|
||||
<p><strong>In case of NGINX:</strong> open <code>nginx/sites/default.conf</code> and change the <code>root</code> from <code>/var/www/public</code> to <code>/var/www/{my-project-folder-name}/public</code>.</p>
|
||||
|
||||
<pre><code>docker-compose stop &amp;&amp; docker-compose up -d XXXX YYYY ZZZZ ....
|
||||
</code></pre>
|
||||
<p><em>Or you can keep <code>default.conf</code> as it is, and create a separate config <code>my-site.conf</code> file for it.</em></p>
|
||||
|
||||
<h4 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h4>
|
||||
<p><strong>In case of Apache:</strong> :P</p>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine:</p>
|
||||
<p><br></p>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p><a name="B"></a></p>
|
||||
|
||||
<h3 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h3>
|
||||
|
||||
<blockquote>
|
||||
<p>(Follow these steps if you want a single Docker environment for all your project)</p>
|
||||
</blockquote>
|
||||
|
||||
<p>1 - Clone this repository anywhere on your machine (similar to <a href="#A2">Steps A.2. from above</a>):</p>
|
||||
|
||||
<pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Edit the <code>docker-compose.yml</code> file to map to your projects directories:</p>
|
||||
<p>Your folder structure should look like this:</p>
|
||||
|
||||
<pre><code> applications:
|
||||
image: tianon/true
|
||||
volumes:
|
||||
- ../project1/:/var/www/project1
|
||||
- ../project2/:/var/www/project2
|
||||
<pre><code>+ laradock
|
||||
+ project-1
|
||||
+ project-2
|
||||
</code></pre>
|
||||
|
||||
<p>3 - You can access all sites by visiting <code>http://localhost/project1/public</code> and <code>http://localhost/project2/public</code> but of course that&rsquo;s not very useful so let&rsquo;s setup NGINX quickly.</p>
|
||||
<p>2 - Go to <code>nginx/sites</code> and create config files to point to different project directory when visiting different domains.</p>
|
||||
|
||||
<p>4 - Go to <code>nginx/sites</code> and copy <code>sample.conf.example</code> to <code>project1.conf</code> then to <code>project2.conf</code></p>
|
||||
<p>Laradock by default includes <code>project-1.conf</code> and <code>project-2.conf</code> as working samples.</p>
|
||||
|
||||
<p>5 - Open the <code>project1.conf</code> file and edit the <code>server_name</code> and the <code>root</code> as follow:</p>
|
||||
<p>3 - change the default names <code>project-n</code>:</p>
|
||||
|
||||
<pre><code> server_name project1.dev;
|
||||
root /var/www/project1/public;
|
||||
<p>You can rename the config files, project folders and domains as you like, just make sure the <code>root</code> in the config files, is pointing to the correct project folder name.</p>
|
||||
|
||||
<p>4 - Add the domains to the <strong>hosts</strong> files.</p>
|
||||
|
||||
<pre><code>127.0.0.1 project-1.dev
|
||||
127.0.0.1 project-2.dev
|
||||
</code></pre>
|
||||
|
||||
<p>Do the same for each project <code>project2.conf</code>, <code>project3.conf</code>,&hellip;</p>
|
||||
<blockquote>
|
||||
<p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
|
||||
</blockquote>
|
||||
|
||||
<p>6 - Add the domains to the <strong>hosts</strong> files.</p>
|
||||
|
||||
<pre><code>127.0.0.1 project1.dev
|
||||
</code></pre>
|
||||
|
||||
<p>7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.</p>
|
||||
<p><a name="Usage"></a></p>
|
||||
|
||||
<h2 id="usage">Usage</h2>
|
||||
|
||||
@ -310,61 +355,72 @@ QUEUE_HOST=beanstalkd
|
||||
<p>If you are using <strong>Docker Toolbox</strong> (VM), do one of the following:</p>
|
||||
|
||||
<ul>
|
||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="#upgrading-laradock">Upgrading LaraDock</a></li>
|
||||
<li>Use LaraDock v3.* (Visit the <code>LaraDock-ToolBox</code> <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">Branch</a>).</li>
|
||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
||||
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">LaraDock-ToolBox</a> branch. <em>(outdated)</em></li>
|
||||
</ul>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Warning:</strong> If you used an older version of LaraDock it&rsquo;s highly recommended to rebuild the containers you need to use <a href="#Build-Re-build-Containers">see how you rebuild a container</a> in order to prevent errors as much as possible.</p>
|
||||
<p><strong>Warning:</strong> If you used an older version of Laradock it&rsquo;s highly recommended to rebuild the containers you need to use <a href="#Build-Re-build-Containers">see how you rebuild a container</a> in order to prevent as much errors as possible.</p>
|
||||
</blockquote>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<p>1 - Run Containers: <em>(Make sure you are in the <code>laradock</code> folder before running the <code>docker-compose</code> commands).</em></p>
|
||||
<p>1 - Enter the laradock folder and rename <code>env-example</code> to <code>.env</code></p>
|
||||
|
||||
<p><strong>Example:</strong> Running NGINX and MySQL:</p>
|
||||
<pre><code class="language-shell">cp env-example .env
|
||||
</code></pre>
|
||||
|
||||
<p>You can edit the <code>.env</code> file to chose which software&rsquo;s you want to be installed in your environment. You can always refer to the <code>docker-compose.yml</code> file to see how those variables are been used.</p>
|
||||
|
||||
<p>2 - Build the enviroment and run it using <code>docker-compose</code></p>
|
||||
|
||||
<p>In this example we&rsquo;ll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d nginx mysql
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note</strong>: The <code>workspace</code> and <code>php-fpm</code> will run automatically in most of the cases, so no need to specify them in the <code>up</code> command. If you couldn&rsquo;t find them running then you need specify them as follow: <code>docker-compose up -d nginx php-fpm mysql workspace</code>.</p>
|
||||
|
||||
<p>You can select your own combination of Containers form the list below:</p>
|
||||
<p>You can select your own combination of containers form the list below:</p>
|
||||
|
||||
<p><code>nginx</code>, <code>hhvm</code>, <code>php-fpm</code>, <code>mysql</code>, <code>redis</code>, <code>postgres</code>, <code>mariadb</code>, <code>neo4j</code>, <code>mongo</code>, <code>apache2</code>, <code>caddy</code>, <code>memcached</code>, <code>beanstalkd</code>, <code>beanstalkd-console</code>, <code>rabbitmq</code>, <code>workspace</code>, <code>phpmyadmin</code>, <code>aerospike</code>, <code>pgadmin</code>, <code>elasticsearch</code>, <code>rethinkdb</code>.</p>
|
||||
<blockquote>
|
||||
<p><code>nginx</code>, <code>hhvm</code>, <code>php-fpm</code>, <code>mysql</code>, <code>redis</code>, <code>postgres</code>, <code>mariadb</code>, <code>neo4j</code>, <code>mongo</code>, <code>apache2</code>, <code>caddy</code>, <code>memcached</code>, <code>beanstalkd</code>, <code>beanstalkd-console</code>, <code>rabbitmq</code>, <code>beanstalkd-console</code>, <code>workspace</code>, <code>phpmyadmin</code>, <code>adminer</code>, <code>aerospike</code>, <code>pgadmin</code>, <code>elasticsearch</code>, <code>rethinkdb</code>, <code>postgres-postgis</code>, <code>certbot</code>, <code>mailhog</code>, <code>minio</code> and more&hellip;!</p>
|
||||
</blockquote>
|
||||
|
||||
<p><em>(Please note that sometimes we forget to update the docs, so check the <code>docker-compose.yml</code> file to see an updated list of all available containers).</em></p>
|
||||
|
||||
<p><br>
|
||||
2 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, &hellip;).</p>
|
||||
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, &hellip;)</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose exec workspace bash
|
||||
</code></pre>
|
||||
|
||||
<p>Alternatively, for Windows PowerShell users: execute the following command to enter any running container:</p>
|
||||
<p><em>Alternatively, for Windows PowerShell users: execute the following command to enter any running container:</em></p>
|
||||
|
||||
<pre><code class="language-bash">docker exec -it {workspace-container-id} bash
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note:</strong> You can add <code>--user=laradock</code> (example <code>docker-compose exec --user=laradock workspace bash</code>) to have files created as your host&rsquo;s user. (you can change the PUID (User id) and PGID (group id) variables from the <code>docker-compose.yml</code>).</p>
|
||||
<p><strong>Note:</strong> You can add <code>--user=laradock</code> to have files created as your host&rsquo;s user. Example:</p>
|
||||
|
||||
<pre><code class="language-shell">docker-compose exec --user=laradock workspace bash
|
||||
</code></pre>
|
||||
|
||||
<p><em>You can change the PUID (User id) and PGID (group id) variables from the <code>.env</code> file)</em></p>
|
||||
|
||||
<p><br>
|
||||
3 - Edit your project configurations.</p>
|
||||
4 - Update your project configurations to use the database host</p>
|
||||
|
||||
<p>Open your <code>.env</code> file and set the <code>DB_HOST</code> to <code>mysql</code>:</p>
|
||||
<p>Open your PHP project&rsquo;s <code>.env</code> file or whichever configuration file you are reading from, and set the database host <code>DB_HOST</code> to <code>mysql</code>:</p>
|
||||
|
||||
<pre><code class="language-env">DB_HOST=mysql
|
||||
</code></pre>
|
||||
|
||||
<p><em>If you want to use Laravel and you don&rsquo;t have it installed yet, see <a href="#Install-Laravel">How to Install Laravel in a Docker Container</a>.</em></p>
|
||||
<p><em>If you want to install Laravel as PHP project, see <a href="#Install-Laravel">How to Install Laravel in a Docker Container</a>.</em></p>
|
||||
|
||||
<p><br>
|
||||
4 - Open your browser and visit your localhost address (<code>http://localhost/</code>).</p>
|
||||
|
||||
<p><br>
|
||||
<strong>Debugging</strong>: if you are facing any problem here check the <a href="#debugging">Debugging</a> section.</p>
|
||||
|
||||
<p>If you need a special support. Contact me, more details in the <a href="#Help">Help &amp; Questions</a> section.</p>
|
||||
5 - Open your browser and visit your localhost address <code>http://localhost/</code>. If you followed the multiple projects setup, you can visit <code>http://project-1.dev/</code> and <code>http://project-2.dev/</code>. But first don&rsquo;t</p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
@ -510,6 +566,11 @@ example for <code>mysql</code> it will be <code>mysql/Dockerfi
|
||||
<pre><code class="language-bash">docker logs {container-name}
|
||||
</code></pre>
|
||||
|
||||
<p>More <a href="https://docs.docker.com/compose/reference/logs/">options</a></p>
|
||||
|
||||
<pre><code class="language-bash">docker logs -f {container-name}
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
<a name="PHP"></a></p>
|
||||
|
||||
@ -640,7 +701,7 @@ xdebug.remote_connect_back=1
|
||||
|
||||
<p>By installing xDebug, you are enabling it to run on startup by default.</p>
|
||||
|
||||
<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the LaraDock root folder, (at the same prompt where you run docker-compose):</p>
|
||||
<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the Laradock root folder, (at the same prompt where you run docker-compose):</p>
|
||||
|
||||
<ul>
|
||||
<li>Stop xDebug from running by default: <code>./xdebugPhpFpm stop</code>.</li>
|
||||
@ -680,11 +741,11 @@ xdebug.remote_connect_back=1
|
||||
<a name="Production"></a></p>
|
||||
|
||||
<p><br>
|
||||
<a name="LaraDock-for-Production"></a></p>
|
||||
<a name="Laradock-for-Production"></a></p>
|
||||
|
||||
<h2 id="prepare-laradock-for-production">Prepare LaraDock for Production</h2>
|
||||
<h2 id="prepare-laradock-for-production">Prepare Laradock for Production</h2>
|
||||
|
||||
<p>It&rsquo;s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, LaraDock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p>
|
||||
<p>It&rsquo;s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, Laradock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p>
|
||||
|
||||
<p>Note: The Database (MySQL/MariaDB/&hellip;) ports should not be forwarded on production, because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. So make sure to remove these lines:</p>
|
||||
|
||||
@ -725,7 +786,7 @@ xdebug.remote_connect_back=1
|
||||
|
||||
<p>3 - Edit <code>docker-compose.yml</code> to Map the new application path:</p>
|
||||
|
||||
<p>By default, LaraDock assumes the Laravel application is living in the parent directory of the laradock folder.</p>
|
||||
<p>By default, Laradock assumes the Laravel application is living in the parent directory of the laradock folder.</p>
|
||||
|
||||
<p>Since the new Laravel application is in the <code>my-cool-app</code> folder, we need to replace <code>../:/var/www</code> with <code>../my-cool-app/:/var/www</code>, as follow:</p>
|
||||
|
||||
@ -741,7 +802,7 @@ xdebug.remote_connect_back=1
|
||||
<pre><code class="language-bash">cd my-cool-app
|
||||
</code></pre>
|
||||
|
||||
<p>5 - Go back to the LaraDock installation steps to see how to edit the <code>.env</code> file.</p>
|
||||
<p>5 - Go back to the Laradock installation steps to see how to edit the <code>.env</code> file.</p>
|
||||
|
||||
<p><br>
|
||||
<a name="Run-Artisan-Commands"></a></p>
|
||||
@ -843,7 +904,7 @@ SESSION_DRIVER=redis
|
||||
|
||||
<p>5 - You can manually test it from Laravel with this code:</p>
|
||||
|
||||
<pre><code class="language-php">\Cache::store('redis')-&gt;put('LaraDock', 'Awesome', 10);
|
||||
<pre><code class="language-php">\Cache::store('redis')-&gt;put('Laradock', 'Awesome', 10);
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
@ -946,6 +1007,18 @@ docker-compose up -d mariadb phpmyadmin
|
||||
|
||||
<p>2 - Open your browser and visit the localhost on port <strong>8080</strong>: <code>http://localhost:8080</code></p>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-Adminer"></a></p>
|
||||
|
||||
<h2 id="use-adminer">Use Adminer</h2>
|
||||
|
||||
<p>1 - Run the Adminer Container (<code>adminer</code>) with the <code>docker-compose up</code> command. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d adminer
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Open your browser and visit the localhost on port <strong>8080</strong>: <code>http://localhost:8080</code></p>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-pgAdmin"></a></p>
|
||||
|
||||
@ -1072,6 +1145,36 @@ A package (<a href="https://github.com/duxet/laravel-rethinkdb">La
|
||||
<li>set the <code>DB_DATABASE</code> to <code>database</code>.</li>
|
||||
</ul>
|
||||
|
||||
<p><br>
|
||||
<a name="Use-Minio"></a></p>
|
||||
|
||||
<h2 id="use-minio">Use Minio</h2>
|
||||
|
||||
<p>1 - Configure Minio:
|
||||
- On the workspace container, change <code>INSTALL_MC</code> to true to get the client
|
||||
- Set <code>MINIO_ACCESS_KEY</code> and <code>MINIO_ACCESS_SECRET</code> if you wish to set proper keys</p>
|
||||
|
||||
<p>2 - Run the Minio Container (<code>minio</code>) with the <code>docker-compose up</code> command. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d minio
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Open your browser and visit the localhost on port <strong>9000</strong> at the following URL: <code>http://localhost:9000</code></p>
|
||||
|
||||
<p>4 - Create a bucket either through the webui or using the mc client:</p>
|
||||
|
||||
<pre><code class="language-bash"> mc mb minio/bucket
|
||||
</code></pre>
|
||||
|
||||
<p>5 - When configuring your other clients use the following details:</p>
|
||||
|
||||
<pre><code> S3_HOST=http://minio
|
||||
S3_KEY=access
|
||||
S3_SECRET=secretkey
|
||||
S3_REGION=us-east-1
|
||||
S3_BUCKET=bucket
|
||||
</code></pre>
|
||||
|
||||
<p><br>
|
||||
<a name="CodeIgniter"></a></p>
|
||||
|
||||
@ -1080,7 +1183,7 @@ A package (<a href="https://github.com/duxet/laravel-rethinkdb">La
|
||||
|
||||
<h2 id="install-codeigniter">Install CodeIgniter</h2>
|
||||
|
||||
<p>To install CodeIgniter 3 on LaraDock all you have to do is the following simple steps:</p>
|
||||
<p>To install CodeIgniter 3 on Laradock all you have to do is the following simple steps:</p>
|
||||
|
||||
<p>1 - Open the <code>docker-compose.yml</code> file.</p>
|
||||
|
||||
@ -1320,7 +1423,7 @@ port=1234
|
||||
|
||||
<h2 id="common-terminal-aliases">Common Terminal Aliases</h2>
|
||||
|
||||
<p>When you start your docker container, LaraDock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p>
|
||||
<p>When you start your docker container, Laradock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p>
|
||||
|
||||
<p>You are free to modify the <code>aliases.sh</code> as you see fit, adding your own aliases (or function macros) to suit your requirements.</p>
|
||||
|
||||
@ -1395,12 +1498,12 @@ e) set it to <code>true</code></p>
|
||||
<p><a href="https://github.com/laradock/laradock/blob/master/_guides/phpstorm.md"><strong>Debugging Guide Here</strong></a></p>
|
||||
|
||||
<p><br>
|
||||
<a name="keep-tracking-LaraDock"></a></p>
|
||||
<a name="keep-tracking-Laradock"></a></p>
|
||||
|
||||
<h2 id="keep-track-of-your-laradock-changes">Keep track of your LaraDock changes</h2>
|
||||
<h2 id="keep-track-of-your-laradock-changes">Keep track of your Laradock changes</h2>
|
||||
|
||||
<ol>
|
||||
<li>Fork the LaraDock repository.</li>
|
||||
<li>Fork the Laradock repository.</li>
|
||||
<li>Use that fork as a submodule.</li>
|
||||
<li>Commit all your changes to your fork.</li>
|
||||
<li>Pull new stuff from the main repository from time to time.</li>
|
||||
@ -1409,15 +1512,15 @@ e) set it to <code>true</code></p>
|
||||
<p><br>
|
||||
<a name="upgrading-laradock"></a></p>
|
||||
|
||||
<h2 id="upgrading-laradock">Upgrading LaraDock</h2>
|
||||
<h2 id="upgrading-laradock">Upgrading Laradock</h2>
|
||||
|
||||
<p>Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading LaraDock from v3.* to v4.*:</p>
|
||||
<p>Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading Laradock from v3.* to v4.*:</p>
|
||||
|
||||
<ol>
|
||||
<li>Stop the docker VM <code>docker-machine stop {default}</code></li>
|
||||
<li>Install Docker for <a href="https://docs.docker.com/docker-for-mac/">Mac</a> or <a href="https://docs.docker.com/docker-for-windows/">Windows</a>.</li>
|
||||
<li>Upgrade LaraDock to <code>v4.*.*</code> (<code>git pull origin master</code>)</li>
|
||||
<li>Use LaraDock as you used to do: <code>docker-compose up -d nginx mysql</code>.</li>
|
||||
<li>Upgrade Laradock to <code>v4.*.*</code> (<code>git pull origin master</code>)</li>
|
||||
<li>Use Laradock as you used to do: <code>docker-compose up -d nginx mysql</code>.</li>
|
||||
</ol>
|
||||
|
||||
<p><strong>Note:</strong> If you face any problem with the last step above: rebuild all your containers
|
||||
@ -1429,13 +1532,27 @@ e) set it to <code>true</code></p>
|
||||
|
||||
<h2 id="improve-speed-on-macos">Improve speed on MacOS</h2>
|
||||
|
||||
<p>Sharing code into Docker containers with osxfs have very poor performance compared to Linux. You can get around this issue by using NFS to share your files betwen your host and your container.</p>
|
||||
<p>Sharing code into Docker containers with osxfs have very poor performance compared to Linux. Likely there are some workarounds:</p>
|
||||
|
||||
<blockquote>
|
||||
<p>How to share files using NFS (d4m-nfs)</p>
|
||||
</blockquote>
|
||||
<h3 id="workaround-a-using-dinghy">Workaround A: using dinghy</h3>
|
||||
|
||||
<p><a href="https://github.com/IFSight/d4m-nfs">d4m-nfs</a> automatically mount NFS volume instead of osxfs one.</p>
|
||||
<p><a href="https://github.com/codekitchen/dinghy">Dinghy</a> creates its own VM using docker-machine, it will not modify your existing docker-machine VMs.</p>
|
||||
|
||||
<p>Quick Setup giude, (we recommend you check their docs)</p>
|
||||
|
||||
<p>1) <code>brew tap codekitchen/dinghy</code></p>
|
||||
|
||||
<p>2) <code>brew install dinghy</code></p>
|
||||
|
||||
<p>3) <code>dinghy create --provider virtualbox</code> (must have virtualbox installed, but they support other providers if you prefer)</p>
|
||||
|
||||
<p>4) after the above command is done it will display some env variables, copy them to the bash profile or zsh or.. (this will instruct docker to use the server running inside the VM)</p>
|
||||
|
||||
<p>5) <code>docker-compose up ...</code></p>
|
||||
|
||||
<h3 id="workaround-b-using-d4m-nfs">Workaround B: using d4m-nfs</h3>
|
||||
|
||||
<p><a href="https://github.com/IFSight/d4m-nfs">D4m-nfs</a> automatically mount NFS volume instead of osxfs one.</p>
|
||||
|
||||
<p>1) Update the Docker [File Sharing] preferences:</p>
|
||||
|
||||
@ -1451,23 +1568,30 @@ e) set it to <code>true</code></p>
|
||||
<p>4) Create (or edit) the file <code>~/d4m-nfs/etc/d4m-nfs-mounts.txt</code>, and write the follwing configuration in it:</p>
|
||||
|
||||
<pre><code class="language-txt">/Users:/Users
|
||||
/Volumes:/Volumes
|
||||
/private:/private
|
||||
</code></pre>
|
||||
|
||||
<p>5) Create (or edit) the file <code>/etc/exports</code>, make sure it exists and is empty. (There may be collisions if you come from Vagrant or if you already executed the <code>d4m-nfs.sh</code> script before).</p>
|
||||
|
||||
<p>6) Run the <code>d4m-nfs.sh</code> script:</p>
|
||||
<p>6) Run the <code>d4m-nfs.sh</code> script (might need Sudo):</p>
|
||||
|
||||
<pre><code class="language-bash">~/d4m-nfs/d4m-nfs.sh
|
||||
</code></pre>
|
||||
|
||||
<p>That&rsquo;s it! Run your containers.. Example:</p>
|
||||
|
||||
<pre><code class="language-bash">docker-compose up -d nginx mysql
|
||||
<pre><code class="language-bash">docker-compose up ...
|
||||
</code></pre>
|
||||
|
||||
<p><strong>Note:</strong> If you faced any errors, try restarting Docker, and make sure you have no spaces in the <code>d4m-nfs-mounts.txt</code> file, and your <code>/etc/exports</code> file is clear.</p>
|
||||
<p><em>Note: If you faced any errors, try restarting Docker, and make sure you have no spaces in the <code>d4m-nfs-mounts.txt</code> file, and your <code>/etc/exports</code> file is clear.</em></p>
|
||||
|
||||
<h3 id="other-good-workarounds">Other good workarounds:</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/EugenMayer/docker-sync">docker-sync</a></li>
|
||||
<li>Add more here..</li>
|
||||
</ul>
|
||||
|
||||
<p>More details about this issue <a href="https://github.com/docker/for-mac/issues/77">here</a>.</p>
|
||||
|
||||
<p><br>
|
||||
<a name="Common-Problems"></a></p>
|
||||
@ -1533,7 +1657,7 @@ e) set it to <code>true</code></p>
|
||||
<li>Option B
|
||||
|
||||
<ol>
|
||||
<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The LaraDock docker-compose file currently has this as <code>mysql</code></li>
|
||||
<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as <code>mysql</code></li>
|
||||
</ol></li>
|
||||
</ul>
|
||||
</description>
|
||||
@ -1545,11 +1669,11 @@ e) set it to <code>true</code></p>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://laradock.io/related-projects/</guid>
|
||||
<description><p>LaraDock related projects:</p>
|
||||
<description><p>Laradock related projects:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/lorinlee/laradock-cli">LaraDock CLI</a> by <a href="https://github.com/lorinlee">LorinLee</a></li>
|
||||
<li><a href="https://github.com/bagart/laradock_env">LaraDock Env</a> by <a href="https://github.com/bagart">BAGArt</a></li>
|
||||
<li><a href="https://github.com/lorinlee/laradock-cli">Laradock CLI</a> by <a href="https://github.com/lorinlee">LorinLee</a></li>
|
||||
<li><a href="https://github.com/bagart/laradock_env">Laradock Env</a> by <a href="https://github.com/bagart">BAGArt</a></li>
|
||||
<li><a href="https://github.com/poyhsiao/Klaradock">Klaradock</a> by <a href="https://github.com/poyhsiao">Kim Hsiao</a></li>
|
||||
<li><a href="https://github.com/sifat-rahim/ansible-laradock-kubernetes">Ansible Laradock Kubernetes</a> by <a href="https://github.com/sifat-rahim">Sifat Rahim</a>
|
||||
These Docker Compose projects have piqued our interest:</li>
|
||||
@ -1568,9 +1692,9 @@ These Docker Compose projects have piqued our interest:</li>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://laradock.io/help/</guid>
|
||||
<description><p>Join the chat room on <a href="https://gitter.im/LaraDock/laradock">Gitter</a> and get help and support from the community.</p>
|
||||
<description><p>Join the chat room on <a href="https://gitter.im/Laradock/laradock">Gitter</a> and get help and support from the community.</p>
|
||||
|
||||
<p>You can as well can open an <a href="https://github.com/laradock/laradock/issues">issue</a> on Github (will be labeled as Question) and discuss it with people on <a href="https://gitter.im/LaraDock/laradock">Gitter</a>.</p>
|
||||
<p>You can as well can open an <a href="https://github.com/laradock/laradock/issues">issue</a> on Github (will be labeled as Question) and discuss it with people on <a href="https://gitter.im/Laradock/laradock">Gitter</a>.</p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
@ -1584,39 +1708,52 @@ These Docker Compose projects have piqued our interest:</li>
|
||||
|
||||
<p>Your contribution is more than welcome.</p>
|
||||
|
||||
<h2 id="got-a-question-or-problem">Got a Question or Problem?</h2>
|
||||
<h2 id="i-have-a-question-problem">I have a Question/Problem</h2>
|
||||
|
||||
<p>If you have questions about how to use LaraDock, please direct your questions to the discussion on <a href="https://gitter.im/LaraDock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as Question).</p>
|
||||
<p>If you have questions about how to use Laradock, please direct your questions to the discussion on <a href="https://gitter.im/Laradock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as <code>Question</code>) And you can still seek help on Gitter for it.</p>
|
||||
|
||||
<h2 id="found-an-issue">Found an Issue?</h2>
|
||||
<h2 id="i-found-an-issue">I found an Issue</h2>
|
||||
|
||||
<p>If you find a bug in the source code or a mistake in the documentation, you can help us by
|
||||
submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a>. Even better you can submit a Pull Request with a fix.</p>
|
||||
<p>If have an issue or you found a typo in the documentation, you can help us by
|
||||
opnening an <a href="https://github.com/laradock/laradock/issues">Issue</a>.</p>
|
||||
|
||||
<h2 id="want-a-feature">Want a Feature?</h2>
|
||||
<p><strong>Steps to do before opening an Issue:</strong></p>
|
||||
|
||||
<p>You can request a new feature by submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request.</p>
|
||||
<ol>
|
||||
<li><p>Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).</p></li>
|
||||
|
||||
<h2 id="edit-the-documentation">Edit the documentation</h2>
|
||||
<li><p>Decide if the Issue belongs to this project or to <a href="https://github.com/docker">Docker</a> itself! or even the tool you are using such as Nginx or MongoDB&hellip;</p></li>
|
||||
</ol>
|
||||
|
||||
<p>If your issue appears to be a bug, and hasn&rsquo;t been reported, then open a new issue.</p>
|
||||
|
||||
<p><em>This Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.</em></p>
|
||||
|
||||
<h2 id="i-want-a-feature">I want a Feature</h2>
|
||||
|
||||
<p>You can request a new feature by submitting an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as <code>Feature Suggestion</code>). If you would like to implement a new feature then consider submitting a Pull Request yourself.</p>
|
||||
|
||||
<h2 id="i-want-to-update-the-documentation-site">I want to update the Documentation (Site)</h2>
|
||||
|
||||
<p>Laradock uses <a href="https://gohugo.io/">Hugo</a> as website generator tool, with the <a href="http://themes.gohugo.io/theme/material-docs/">Material Docs theme</a>. You might need to check their docs quickly.</p>
|
||||
|
||||
<ol>
|
||||
<li>Install <a href="https://gohugo.io/">Hugo</a> on your machine.</li>
|
||||
<li>Clone laradock.</li>
|
||||
<li>Go to <code>/docs</code>.</li>
|
||||
<li>Delete everything except the <code>_settings</code> folder &amp; the <code>CNAME</code> file.</li>
|
||||
<li>Open <code>docs/_settings</code> from your terminal and run <code>hugo serve</code> to host the website locally.</li>
|
||||
<li>Open the <code>docs/_settings/content</code> and search for the folder of the section you want to edit.</li>
|
||||
<li>In each secion there&rsquo;s an <code>index.md</code> file, that&rsquo;s the file you need to edit.</li>
|
||||
<li>To edit the sidebar (in case you are adding new section) go to <code>docs/_settings/config.toml</code> and add the section there.</li>
|
||||
<li>After done editing, run the this command <code>hugo</code> to generate the updated site inside the <code>docs</code> folder.</li>
|
||||
<li>Go back to the project root directory, commit and push..</li>
|
||||
<li>Install <a href="https://gohugo.io/">Hugo</a> on your machine (easy thing).</li>
|
||||
<li>Open the <code>DOCUMENTATION/_settings/content</code> and search for the markdown file you want to edit (every folder represents a section in the menu).</li>
|
||||
<li>Delete the <code>/docs</code> folder from the root.</li>
|
||||
<li>When you finish editing, go to <code>DOCUMENTATION/_settings/</code> and run the <code>hugo</code> command to generate the HTML docs (inside new <code>/docs</code> folder).</li>
|
||||
</ol>
|
||||
|
||||
<h2 id="coding-guidelines">Coding Guidelines</h2>
|
||||
<h3 id="to-host-the-website-locally">To Host the website locally</h3>
|
||||
|
||||
<h2 id="support-new-software">Support new Software</h2>
|
||||
<p>Go to <code>DOCUMENTATION/_settings</code> in your terminal and run <code>hugo serve</code> to host the website locally.</p>
|
||||
|
||||
<h3 id="edit-the-sidebar">Edit the sidebar</h3>
|
||||
|
||||
<p>To add a new section to the sidebar or edit existing one, you need to edit this file <code>DOCUMENTATION/_settings/config.toml</code>.</p>
|
||||
|
||||
<h2 id="how-to-support-new-software-add-new-container">How to support new Software (Add new Container)</h2>
|
||||
|
||||
<ul>
|
||||
<li><p>Create folder with the software name.</p></li>
|
||||
@ -1629,10 +1766,10 @@ submitting an <a href="https://github.com/laradock/laradock/issues"&g
|
||||
|
||||
<li><p>Make sure you follow our commenting style.</p></li>
|
||||
|
||||
<li><p>Add the software in the <code>Readme</code>.</p></li>
|
||||
<li><p>Add the software in the <code>Documentation</code>.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="edit-existing-software">Edit existing Software</h2>
|
||||
<h2 id="edit-existing-software-edit-a-container">Edit existing Software (Edit a Container)</h2>
|
||||
|
||||
<ul>
|
||||
<li><p>Open the software (container) folder.</p></li>
|
||||
@ -1640,22 +1777,14 @@ submitting an <a href="https://github.com/laradock/laradock/issues"&g
|
||||
<li><p>Edit the files you want to update.</p></li>
|
||||
|
||||
<li><p><strong>Note:</strong> If you want to edit the base image of the <code>Workspace</code> or the <code>php-fpm</code> Containers,
|
||||
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the LaraDock repository.</p></li>
|
||||
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the Laradock repository.</p></li>
|
||||
|
||||
<li><p>Make sure to update the <code>Readme</code> in case you made any changes.</p></li>
|
||||
<li><p>Make sure to update the <code>Documentation</code> in case you made any changes.</p></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="issue-pr-submission-guidelines">Issue/PR Submission Guidelines</h2>
|
||||
<h2 id="pull-request">Pull Request</h2>
|
||||
|
||||
<h2 id="submitting-an-issue">Submitting an Issue</h2>
|
||||
|
||||
<p>Before you submit your issue search the archive, maybe your question was already answered.</p>
|
||||
|
||||
<p>If your issue appears to be a bug, and hasn&rsquo;t been reported, open a new issue.
|
||||
Help us to maximize the effort we can spend fixing issues and adding new
|
||||
features, by not reporting duplicate issues.</p>
|
||||
|
||||
<h2 id="before-submitting-a-pull-request-pr">Before Submitting a Pull Request (PR)</h2>
|
||||
<h3 id="1-before-submitting-a-pull-request-pr">1. Before Submitting a Pull Request (PR)</h3>
|
||||
|
||||
<p>Always Test everything and make sure its working:</p>
|
||||
|
||||
@ -1671,16 +1800,16 @@ features, by not reporting duplicate issues.</p>
|
||||
|
||||
<ul>
|
||||
<li>Testing building the container (docker-compose build container-name) with no errors.</li>
|
||||
<li>Test it in real App.</li>
|
||||
<li>Test it in a real App if possible.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="submitting-a-pr">Submitting a PR</h2>
|
||||
<h3 id="2-submitting-a-pr">2. Submitting a PR</h3>
|
||||
|
||||
<p>Consider the following guidelines:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Search <a href="https://github.com/laradock/laradock/pulls">GitHub</a> for an open or closed Pull Request that relates to your submission. You don&rsquo;t want to duplicate effort.</p></li>
|
||||
<li><p>Search <a href="https://github.com/laradock/laradock/pulls">GitHub</a> for an open or closed Pull Request that relates to your submission. You don&rsquo;t want to duplicate efforts.</p></li>
|
||||
|
||||
<li><p>Make your changes in a new git branch:</p>
|
||||
|
||||
@ -1715,10 +1844,9 @@ git push origin my-fix-branch -f
|
||||
|
||||
<p><em>WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.</em></p>
|
||||
|
||||
<h2 id="after-your-pr-is-merged">After your PR is merged</h2>
|
||||
<h3 id="3-after-your-pr-is-merged">3. After your PR is merged</h3>
|
||||
|
||||
<p>After your pull request is merged, you can safely delete your branch and pull the changes
|
||||
from the main (upstream) repository:</p>
|
||||
<p>After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:</p>
|
||||
@ -1744,7 +1872,7 @@ from the main (upstream) repository:</p>
|
||||
|
||||
<p><br></p>
|
||||
|
||||
<h2 id="happy-coding">Happy Coding :)</h2>
|
||||
<h4 id="happy-coding">Happy Coding :)</h4>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10" />
|
||||
<title>Introduction - Laradock Docs</title>
|
||||
<meta name="generator" content="Hugo 0.18.1" />
|
||||
<title>Introduction - Laradock</title>
|
||||
<meta name="generator" content="Hugo 0.19" />
|
||||
|
||||
|
||||
<meta name="description" content="Laradock documentations.">
|
||||
@ -21,9 +21,9 @@
|
||||
|
||||
|
||||
<meta property="og:url" content="http://laradock.io/introduction/">
|
||||
<meta property="og:title" content="Laradock Docs">
|
||||
<meta property="og:title" content="Laradock">
|
||||
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock Docs">
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
@ -71,10 +71,7 @@
|
||||
|
||||
|
||||
</head>
|
||||
<body class="palette-primary-purple palette-accent-deep-purple">
|
||||
|
||||
|
||||
|
||||
<body class="palette-primary-deep-purple palette-accent-purple">
|
||||
|
||||
|
||||
|
||||
@ -97,7 +94,7 @@
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="title">
|
||||
Introduction
|
||||
<b>Laradock</b> <span style="color: rgba(249, 245, 255, 0.63);"> / Introduction</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -105,8 +102,9 @@
|
||||
|
||||
|
||||
<div class="button button-github" role="button" aria-label="GitHub">
|
||||
<a href="https://github.com/laradock" title="@laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
<a style="padding: 0px; font-size:40px" href="https://github.com/laradock/laradock" title="@laradock/laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
</div>
|
||||
<p style="font-size: 18px; padding: 8px">Github</p>
|
||||
|
||||
|
||||
|
||||
@ -125,42 +123,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
<nav aria-label="Navigation">
|
||||
<a href="https://github.com/laradock/laradock" class="project">
|
||||
<div class="banner">
|
||||
|
||||
<div class="name">
|
||||
<strong>Laradock Docs </strong>
|
||||
|
||||
<br>
|
||||
laradock/laradock
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
|
||||
<ul class="repo">
|
||||
<li class="repo-download">
|
||||
<a href="https://github.com/laradock/laradock/archive/master.zip" target="_blank" title="Download" data-action="download">
|
||||
<i class="icon icon-download"></i> Download
|
||||
</a>
|
||||
</li>
|
||||
<li class="repo-stars">
|
||||
<a href="https://github.com/laradock/laradock/stargazers" target="_blank" title="Stargazers" data-action="star">
|
||||
<i class="icon icon-star"></i> Stars
|
||||
<span class="count">–</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="toc">
|
||||
|
||||
@ -302,18 +283,18 @@
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<span class="section">The author</span>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/laradock" target="_blank" title="@laradock on GitHub">
|
||||
@laradock on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -332,27 +313,32 @@
|
||||
|
||||
|
||||
|
||||
<p>LaraDock strives to make the PHP development experience easier and faster.</p>
|
||||
<p>Laradock strives to make the PHP development experience easier and faster.</p>
|
||||
|
||||
<p>It contains pre-packaged Docker Images that provides you a wonderful <em>development</em> environment without requiring you to install PHP, NGINX, MySQL, Redis, and any other software on your machines.</p>
|
||||
|
||||
<p>LaraDock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal…).</p>
|
||||
<p>Laradock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal…).</p>
|
||||
|
||||
<h2 id="quick-overview">Quick Overview</h2>
|
||||
|
||||
<p>Let’s see how easy it is to install <code>NGINX</code>, <code>PHP</code>, <code>Composer</code>, <code>MySQL</code>, <code>Redis</code> and <code>beanstalkd</code>:</p>
|
||||
|
||||
<p>1 - Clone LaraDock inside your PHP project:</p>
|
||||
<p>1 - Clone Laradock inside your PHP project:</p>
|
||||
|
||||
<pre><code class="language-shell">git clone https://github.com/Laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Enter the laradock folder and run this command:</p>
|
||||
<p>2 - Enter the laradock folder and rename <code>env-example</code> to <code>.env</code>.</p>
|
||||
|
||||
<pre><code class="language-shell">cp env-example .env
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Run your containers:</p>
|
||||
|
||||
<pre><code class="language-shell">docker-compose up -d nginx mysql redis beanstalkd
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Open your <code>.env</code> file and set the following:</p>
|
||||
<p>3 - Open your project’s <code>.env</code> file and set the following:</p>
|
||||
|
||||
<pre><code class="language-shell">DB_HOST=mysql
|
||||
REDIS_HOST=redis
|
||||
@ -384,21 +370,21 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<p><a name="laradock-vs-homestead"></a></p>
|
||||
|
||||
<h2 id="laradock-vs-homestead-for-laravel-developers">LaraDock VS Homestead (For Laravel Developers)</h2>
|
||||
<h2 id="laradock-vs-homestead-for-laravel-developers">Laradock VS Homestead (For Laravel Developers)</h2>
|
||||
|
||||
<blockquote>
|
||||
<p>LaraDock It’s like Laravel Homestead but for Docker instead of Vagrant.</p>
|
||||
<p>Laradock It’s like Laravel Homestead but for Docker instead of Vagrant.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>LaraDock and <a href="https://laravel.com/docs/master/homestead">Homestead</a> both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).</p>
|
||||
<p>Laradock and <a href="https://laravel.com/docs/master/homestead">Homestead</a> both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine.</p></li>
|
||||
|
||||
<li><p>LaraDock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers.</p></li>
|
||||
<li><p>Laradock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers.</p></li>
|
||||
</ul>
|
||||
|
||||
<p>Running a virtual container is much faster than running a full virtual Machine. Thus <strong>LaraDock is much faster than Homestead</strong>.</p>
|
||||
<p>Running a virtual container is much faster than running a full virtual Machine. Thus <strong>Laradock is much faster than Homestead</strong>.</p>
|
||||
|
||||
<p><a name="Demo"></a></p>
|
||||
|
||||
@ -407,10 +393,10 @@ QUEUE_HOST=beanstalkd
|
||||
<p>What’s better than a <strong>Demo Video</strong>:</p>
|
||||
|
||||
<ul>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=TQii1jDa96Y">v4.*</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=-DamFMczwDA">v2.*</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=jGkyO6Is_aI">v0.3</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=3YQsHe6oF80">v0.1</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=TQii1jDa96Y">v4.*</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=-DamFMczwDA">v2.*</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=jGkyO6Is_aI">v0.3</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=3YQsHe6oF80">v0.1</a></li>
|
||||
</ul>
|
||||
|
||||
<p><a name="features"></a></p>
|
||||
@ -442,11 +428,12 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<ul>
|
||||
<li>MySQL</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>MariaDB</li>
|
||||
<li>MongoDB</li>
|
||||
<li>Neo4j</li>
|
||||
<li>RethinkDB</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>Postgres Postgis</li>
|
||||
</ul></li>
|
||||
<li><strong>Cache Engines:</strong>
|
||||
|
||||
@ -480,9 +467,13 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<ul>
|
||||
<li>PhpMyAdmin</li>
|
||||
<li>Adminer</li>
|
||||
<li>PgAdmin</li>
|
||||
<li>ElasticSearch</li>
|
||||
<li>Selenium</li>
|
||||
<li>Certbot</li>
|
||||
<li>Mailhog</li>
|
||||
<li>Minio</li>
|
||||
<li>Workspace
|
||||
|
||||
<ul>
|
||||
@ -513,7 +504,7 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<p>You are welcome to join our chat room on Gitter.</p>
|
||||
|
||||
<p><a href="https://gitter.im/LaraDock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/LaraDock/laradock.svg" alt="Gitter" /></a></p>
|
||||
<p><a href="https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/Laradock/laradock.svg" alt="Gitter" /></a></p>
|
||||
|
||||
|
||||
<aside class="copyright" role="note">
|
||||
@ -573,8 +564,8 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<script>
|
||||
|
||||
var base_url = 'http:\/\/laradock.io\/';
|
||||
var repo_id = 'laradock\/laradock';
|
||||
var base_url = '';
|
||||
var repo_id = '';
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Introductions on Laradock Docs</title>
|
||||
<title>Introductions on Laradock</title>
|
||||
<link>http://laradock.io/introduction/index.xml</link>
|
||||
<description>Recent content in Introductions on Laradock Docs</description>
|
||||
<description>Recent content in Introductions on Laradock</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<atom:link href="http://laradock.io/introduction/index.xml" rel="self" type="application/rss+xml" />
|
||||
@ -16,27 +16,32 @@
|
||||
<guid>http://laradock.io/introduction/</guid>
|
||||
<description>
|
||||
|
||||
<p>LaraDock strives to make the PHP development experience easier and faster.</p>
|
||||
<p>Laradock strives to make the PHP development experience easier and faster.</p>
|
||||
|
||||
<p>It contains pre-packaged Docker Images that provides you a wonderful <em>development</em> environment without requiring you to install PHP, NGINX, MySQL, Redis, and any other software on your machines.</p>
|
||||
|
||||
<p>LaraDock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal&hellip;).</p>
|
||||
<p>Laradock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal&hellip;).</p>
|
||||
|
||||
<h2 id="quick-overview">Quick Overview</h2>
|
||||
|
||||
<p>Let&rsquo;s see how easy it is to install <code>NGINX</code>, <code>PHP</code>, <code>Composer</code>, <code>MySQL</code>, <code>Redis</code> and <code>beanstalkd</code>:</p>
|
||||
|
||||
<p>1 - Clone LaraDock inside your PHP project:</p>
|
||||
<p>1 - Clone Laradock inside your PHP project:</p>
|
||||
|
||||
<pre><code class="language-shell">git clone https://github.com/Laradock/laradock.git
|
||||
</code></pre>
|
||||
|
||||
<p>2 - Enter the laradock folder and run this command:</p>
|
||||
<p>2 - Enter the laradock folder and rename <code>env-example</code> to <code>.env</code>.</p>
|
||||
|
||||
<pre><code class="language-shell">cp env-example .env
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Run your containers:</p>
|
||||
|
||||
<pre><code class="language-shell">docker-compose up -d nginx mysql redis beanstalkd
|
||||
</code></pre>
|
||||
|
||||
<p>3 - Open your <code>.env</code> file and set the following:</p>
|
||||
<p>3 - Open your project&rsquo;s <code>.env</code> file and set the following:</p>
|
||||
|
||||
<pre><code class="language-shell">DB_HOST=mysql
|
||||
REDIS_HOST=redis
|
||||
@ -68,21 +73,21 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<p><a name="laradock-vs-homestead"></a></p>
|
||||
|
||||
<h2 id="laradock-vs-homestead-for-laravel-developers">LaraDock VS Homestead (For Laravel Developers)</h2>
|
||||
<h2 id="laradock-vs-homestead-for-laravel-developers">Laradock VS Homestead (For Laravel Developers)</h2>
|
||||
|
||||
<blockquote>
|
||||
<p>LaraDock It&rsquo;s like Laravel Homestead but for Docker instead of Vagrant.</p>
|
||||
<p>Laradock It&rsquo;s like Laravel Homestead but for Docker instead of Vagrant.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>LaraDock and <a href="https://laravel.com/docs/master/homestead">Homestead</a> both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).</p>
|
||||
<p>Laradock and <a href="https://laravel.com/docs/master/homestead">Homestead</a> both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).</p>
|
||||
|
||||
<ul>
|
||||
<li><p>Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine.</p></li>
|
||||
|
||||
<li><p>LaraDock is a tool that controls Docker for you (using Docker &amp; Docker Compose official commands). And Docker manages your Virtual Containers.</p></li>
|
||||
<li><p>Laradock is a tool that controls Docker for you (using Docker &amp; Docker Compose official commands). And Docker manages your Virtual Containers.</p></li>
|
||||
</ul>
|
||||
|
||||
<p>Running a virtual container is much faster than running a full virtual Machine. Thus <strong>LaraDock is much faster than Homestead</strong>.</p>
|
||||
<p>Running a virtual container is much faster than running a full virtual Machine. Thus <strong>Laradock is much faster than Homestead</strong>.</p>
|
||||
|
||||
<p><a name="Demo"></a></p>
|
||||
|
||||
@ -91,10 +96,10 @@ QUEUE_HOST=beanstalkd
|
||||
<p>What&rsquo;s better than a <strong>Demo Video</strong>:</p>
|
||||
|
||||
<ul>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=TQii1jDa96Y">v4.*</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=-DamFMczwDA">v2.*</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=jGkyO6Is_aI">v0.3</a></li>
|
||||
<li>LaraDock <a href="https://www.youtube.com/watch?v=3YQsHe6oF80">v0.1</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=TQii1jDa96Y">v4.*</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=-DamFMczwDA">v2.*</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=jGkyO6Is_aI">v0.3</a></li>
|
||||
<li>Laradock <a href="https://www.youtube.com/watch?v=3YQsHe6oF80">v0.1</a></li>
|
||||
</ul>
|
||||
|
||||
<p><a name="features"></a></p>
|
||||
@ -126,11 +131,12 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<ul>
|
||||
<li>MySQL</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>MariaDB</li>
|
||||
<li>MongoDB</li>
|
||||
<li>Neo4j</li>
|
||||
<li>RethinkDB</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>Postgres Postgis</li>
|
||||
</ul></li>
|
||||
<li><strong>Cache Engines:</strong>
|
||||
|
||||
@ -164,9 +170,13 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<ul>
|
||||
<li>PhpMyAdmin</li>
|
||||
<li>Adminer</li>
|
||||
<li>PgAdmin</li>
|
||||
<li>ElasticSearch</li>
|
||||
<li>Selenium</li>
|
||||
<li>Certbot</li>
|
||||
<li>Mailhog</li>
|
||||
<li>Minio</li>
|
||||
<li>Workspace
|
||||
|
||||
<ul>
|
||||
@ -197,7 +207,7 @@ QUEUE_HOST=beanstalkd
|
||||
|
||||
<p>You are welcome to join our chat room on Gitter.</p>
|
||||
|
||||
<p><a href="https://gitter.im/LaraDock/laradock?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://badges.gitter.im/LaraDock/laradock.svg" alt="Gitter" /></a></p>
|
||||
<p><a href="https://gitter.im/Laradock/laradock?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://badges.gitter.im/Laradock/laradock.svg" alt="Gitter" /></a></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10" />
|
||||
<title>License - Laradock Docs</title>
|
||||
<meta name="generator" content="Hugo 0.18.1" />
|
||||
<title>License - Laradock</title>
|
||||
<meta name="generator" content="Hugo 0.19" />
|
||||
|
||||
|
||||
<meta name="description" content="Laradock documentations.">
|
||||
@ -21,9 +21,9 @@
|
||||
|
||||
|
||||
<meta property="og:url" content="http://laradock.io/license/">
|
||||
<meta property="og:title" content="Laradock Docs">
|
||||
<meta property="og:title" content="Laradock">
|
||||
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock Docs">
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
@ -71,10 +71,7 @@
|
||||
|
||||
|
||||
</head>
|
||||
<body class="palette-primary-purple palette-accent-deep-purple">
|
||||
|
||||
|
||||
|
||||
<body class="palette-primary-deep-purple palette-accent-purple">
|
||||
|
||||
|
||||
|
||||
@ -97,7 +94,7 @@
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="title">
|
||||
License
|
||||
<b>Laradock</b> <span style="color: rgba(249, 245, 255, 0.63);"> / License</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -105,8 +102,9 @@
|
||||
|
||||
|
||||
<div class="button button-github" role="button" aria-label="GitHub">
|
||||
<a href="https://github.com/laradock" title="@laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
<a style="padding: 0px; font-size:40px" href="https://github.com/laradock/laradock" title="@laradock/laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
</div>
|
||||
<p style="font-size: 18px; padding: 8px">Github</p>
|
||||
|
||||
|
||||
|
||||
@ -125,42 +123,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
<nav aria-label="Navigation">
|
||||
<a href="https://github.com/laradock/laradock" class="project">
|
||||
<div class="banner">
|
||||
|
||||
<div class="name">
|
||||
<strong>Laradock Docs </strong>
|
||||
|
||||
<br>
|
||||
laradock/laradock
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
|
||||
<ul class="repo">
|
||||
<li class="repo-download">
|
||||
<a href="https://github.com/laradock/laradock/archive/master.zip" target="_blank" title="Download" data-action="download">
|
||||
<i class="icon icon-download"></i> Download
|
||||
</a>
|
||||
</li>
|
||||
<li class="repo-stars">
|
||||
<a href="https://github.com/laradock/laradock/stargazers" target="_blank" title="Stargazers" data-action="star">
|
||||
<i class="icon icon-star"></i> Stars
|
||||
<span class="count">–</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="toc">
|
||||
|
||||
@ -302,18 +283,18 @@
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<span class="section">The author</span>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/laradock" target="_blank" title="@laradock on GitHub">
|
||||
@laradock on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -406,8 +387,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var base_url = 'http:\/\/laradock.io\/';
|
||||
var repo_id = 'laradock\/laradock';
|
||||
var base_url = '';
|
||||
var repo_id = '';
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Licenses on Laradock Docs</title>
|
||||
<title>Licenses on Laradock</title>
|
||||
<link>http://laradock.io/license/index.xml</link>
|
||||
<description>Recent content in Licenses on Laradock Docs</description>
|
||||
<description>Recent content in Licenses on Laradock</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<atom:link href="http://laradock.io/license/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
@ -9,8 +9,8 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10" />
|
||||
<title>Related Projects - Laradock Docs</title>
|
||||
<meta name="generator" content="Hugo 0.18.1" />
|
||||
<title>Related Projects - Laradock</title>
|
||||
<meta name="generator" content="Hugo 0.19" />
|
||||
|
||||
|
||||
<meta name="description" content="Laradock documentations.">
|
||||
@ -21,9 +21,9 @@
|
||||
|
||||
|
||||
<meta property="og:url" content="http://laradock.io/related-projects/">
|
||||
<meta property="og:title" content="Laradock Docs">
|
||||
<meta property="og:title" content="Laradock">
|
||||
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock Docs">
|
||||
<meta name="apple-mobile-web-app-title" content="Laradock">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
@ -71,10 +71,7 @@
|
||||
|
||||
|
||||
</head>
|
||||
<body class="palette-primary-purple palette-accent-deep-purple">
|
||||
|
||||
|
||||
|
||||
<body class="palette-primary-deep-purple palette-accent-purple">
|
||||
|
||||
|
||||
|
||||
@ -97,7 +94,7 @@
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="title">
|
||||
Related Projects
|
||||
<b>Laradock</b> <span style="color: rgba(249, 245, 255, 0.63);"> / Related Projects</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -105,8 +102,9 @@
|
||||
|
||||
|
||||
<div class="button button-github" role="button" aria-label="GitHub">
|
||||
<a href="https://github.com/laradock" title="@laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
<a style="padding: 0px; font-size:40px" href="https://github.com/laradock/laradock" title="@laradock/laradock on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
</div>
|
||||
<p style="font-size: 18px; padding: 8px">Github</p>
|
||||
|
||||
|
||||
|
||||
@ -125,42 +123,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
<nav aria-label="Navigation">
|
||||
<a href="https://github.com/laradock/laradock" class="project">
|
||||
<div class="banner">
|
||||
|
||||
<div class="name">
|
||||
<strong>Laradock Docs </strong>
|
||||
|
||||
<br>
|
||||
laradock/laradock
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
|
||||
<ul class="repo">
|
||||
<li class="repo-download">
|
||||
<a href="https://github.com/laradock/laradock/archive/master.zip" target="_blank" title="Download" data-action="download">
|
||||
<i class="icon icon-download"></i> Download
|
||||
</a>
|
||||
</li>
|
||||
<li class="repo-stars">
|
||||
<a href="https://github.com/laradock/laradock/stargazers" target="_blank" title="Stargazers" data-action="star">
|
||||
<i class="icon icon-star"></i> Stars
|
||||
<span class="count">–</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="toc">
|
||||
|
||||
@ -302,18 +283,18 @@
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<span class="section">The author</span>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/laradock" target="_blank" title="@laradock on GitHub">
|
||||
@laradock on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -330,11 +311,11 @@
|
||||
<div class="wrapper">
|
||||
<h1>Related Projects </h1>
|
||||
|
||||
<p>LaraDock related projects:</p>
|
||||
<p>Laradock related projects:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/lorinlee/laradock-cli">LaraDock CLI</a> by <a href="https://github.com/lorinlee">LorinLee</a></li>
|
||||
<li><a href="https://github.com/bagart/laradock_env">LaraDock Env</a> by <a href="https://github.com/bagart">BAGArt</a></li>
|
||||
<li><a href="https://github.com/lorinlee/laradock-cli">Laradock CLI</a> by <a href="https://github.com/lorinlee">LorinLee</a></li>
|
||||
<li><a href="https://github.com/bagart/laradock_env">Laradock Env</a> by <a href="https://github.com/bagart">BAGArt</a></li>
|
||||
<li><a href="https://github.com/poyhsiao/Klaradock">Klaradock</a> by <a href="https://github.com/poyhsiao">Kim Hsiao</a></li>
|
||||
<li><a href="https://github.com/sifat-rahim/ansible-laradock-kubernetes">Ansible Laradock Kubernetes</a> by <a href="https://github.com/sifat-rahim">Sifat Rahim</a>
|
||||
These Docker Compose projects have piqued our interest:</li>
|
||||
@ -419,8 +400,8 @@ These Docker Compose projects have piqued our interest:</li>
|
||||
|
||||
<script>
|
||||
|
||||
var base_url = 'http:\/\/laradock.io\/';
|
||||
var repo_id = 'laradock\/laradock';
|
||||
var base_url = '';
|
||||
var repo_id = '';
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Related-projects on Laradock Docs</title>
|
||||
<title>Related-projects on Laradock</title>
|
||||
<link>http://laradock.io/related-projects/index.xml</link>
|
||||
<description>Recent content in Related-projects on Laradock Docs</description>
|
||||
<description>Recent content in Related-projects on Laradock</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<atom:link href="http://laradock.io/related-projects/index.xml" rel="self" type="application/rss+xml" />
|
||||
@ -14,11 +14,11 @@
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>http://laradock.io/related-projects/</guid>
|
||||
<description><p>LaraDock related projects:</p>
|
||||
<description><p>Laradock related projects:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/lorinlee/laradock-cli">LaraDock CLI</a> by <a href="https://github.com/lorinlee">LorinLee</a></li>
|
||||
<li><a href="https://github.com/bagart/laradock_env">LaraDock Env</a> by <a href="https://github.com/bagart">BAGArt</a></li>
|
||||
<li><a href="https://github.com/lorinlee/laradock-cli">Laradock CLI</a> by <a href="https://github.com/lorinlee">LorinLee</a></li>
|
||||
<li><a href="https://github.com/bagart/laradock_env">Laradock Env</a> by <a href="https://github.com/bagart">BAGArt</a></li>
|
||||
<li><a href="https://github.com/poyhsiao/Klaradock">Klaradock</a> by <a href="https://github.com/poyhsiao">Kim Hsiao</a></li>
|
||||
<li><a href="https://github.com/sifat-rahim/ansible-laradock-kubernetes">Ansible Laradock Kubernetes</a> by <a href="https://github.com/sifat-rahim">Sifat Rahim</a>
|
||||
These Docker Compose projects have piqued our interest:</li>
|
||||
|
162
env-example
Normal file
@ -0,0 +1,162 @@
|
||||
### Application
|
||||
# Point to your application code, wish should be available at `/var/www`
|
||||
APPLICATION=../
|
||||
|
||||
### PHP version (Does not apply for HHVM)
|
||||
# PHP_VERSION=56
|
||||
PHP_VERSION=70
|
||||
# PHP_VERSION=71
|
||||
|
||||
### PHP interpreter
|
||||
# PHP_INTERPRETER=hhvm
|
||||
PHP_INTERPRETER=php-fpm
|
||||
|
||||
### WORKSPACE Container
|
||||
WORKSPACE_INSTALL_XDEBUG=false
|
||||
WORKSPACE_INSTALL_SOAP=false
|
||||
WORKSPACE_INSTALL_MONGO=false
|
||||
WORKSPACE_INSTALL_NODE=false
|
||||
WORKSPACE_INSTALL_YARN=false
|
||||
WORKSPACE_INSTALL_DRUSH=false
|
||||
WORKSPACE_INSTALL_AEROSPIKE_EXTENSION=false
|
||||
WORKSPACE_INSTALL_INSTALL_V8JS_EXTENSION=false
|
||||
WORKSPACE_COMPOSER_GLOBAL_INSTALL=false
|
||||
WORKSPACE_INSTALL_WORKSPACE_SSH=false
|
||||
WORKSPACE_INSTALL_LARAVEL_ENVOY=false
|
||||
WORKSPACE_INSTALL_DEPLOYER=false
|
||||
WORKSPACE_INSTALL_LINUXBREW=false
|
||||
WORKSPACE_INSTALL_MC=false
|
||||
WORKSPACE_INSTALL_SYMFONY=false
|
||||
WORKSPACE_PUID=1000
|
||||
WORKSPACE_PGID=1000
|
||||
WORKSPACE_NODE_VERSION=stable
|
||||
WORKSPACE_YARN_VERSION=latest
|
||||
WORKSPACE_TIMEZONE=UTC
|
||||
WORKSPACE_SSH_PORT=2222
|
||||
|
||||
### PHP_FPM Container
|
||||
PHP_FPM_INSTALL_XDEBUG=false
|
||||
PHP_FPM_INSTALL_MONGO=false
|
||||
PHP_FPM_INSTALL_SOAP=false
|
||||
PHP_FPM_INSTALL_ZIP_ARCHIVE=false
|
||||
PHP_FPM_INSTALL_BCMATH=false
|
||||
PHP_FPM_INSTALL_PHPREDIS=false
|
||||
PHP_FPM_INSTALL_MEMCACHED=false
|
||||
PHP_FPM_INSTALL_OPCACHE=false
|
||||
PHP_FPM_INSTALL_EXIF=false
|
||||
PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false
|
||||
PHP_FPM_INSTALL_MYSQLI=false
|
||||
PHP_FPM_INSTALL_TOKENIZER=false
|
||||
PHP_FPM_INSTALL_INTL=false
|
||||
PHP_FPM_INSTALL_GHOSTSCRIPT=false
|
||||
|
||||
### NGINX Container
|
||||
NGINX_HOST_HTTP_PORT=80
|
||||
NGINX_HOST_HTTPS_PORT=443
|
||||
NGINX_HOST_LOG_PATH=./logs/nginx/
|
||||
NGINX_SITES_PATH=./nginx/sites/
|
||||
|
||||
### APACHE Container
|
||||
APACHE_HOST_HTTP_PORT=80
|
||||
APACHE_HOST_HTTPS_PORT=443
|
||||
APACHE2_PHP_SOCKET=php-fpm:9000
|
||||
APACHE_HOST_LOG_PATH=./logs/apache2
|
||||
PHP_SOCKET=php-fpm:9000
|
||||
|
||||
### MYSQL Container
|
||||
MYSQL_DATABASE=default
|
||||
MYSQL_USER=default
|
||||
MYSQL_PASSWORD=secret
|
||||
MYSQL_PORT=3306
|
||||
MYSQL_ROOT_PASSWORD=root
|
||||
|
||||
### MSSQL Container
|
||||
MSSQL_DATABASE=homestead
|
||||
MSSQL_PASSWORD=yourStrong(!)Password
|
||||
MSSQL_PORT=1433
|
||||
|
||||
### MARIADB Container
|
||||
MARIADB_DATABASE=default
|
||||
MARIADB_USER=default
|
||||
MARIADB_PASSWORD=secret
|
||||
MARIADB_PORT=3306
|
||||
MARIADB_ROOT_PASSWORD=root
|
||||
|
||||
### POSTGRES Container
|
||||
POSTGRES_DB=default
|
||||
POSTGRES_USER=default
|
||||
POSTGRES_PASSWORD=secret
|
||||
POSTGRES_PORT=5432
|
||||
|
||||
### RABBITMQ Container
|
||||
RABBITMQ_NODE_HOST_PORT=5672
|
||||
RABBITMQ_MANAGEMENT_HTTP_HOST_PORT=15672
|
||||
RABBITMQ_MANAGEMENT_HTTPS_HOST_PORT=15671
|
||||
RABBITMQ_DEFAULT_USER=guest
|
||||
RABBITMQ_DEFAULT_PASS=guest
|
||||
|
||||
### ELASTICSEARCH Container
|
||||
ELASTICSEARCH_HOST_HTTP_PORT=9200
|
||||
ELASTICSEARCH_HOST_TRANSPORT_PORT=9300
|
||||
|
||||
### MEMCACHED Container
|
||||
MEMCACHED_HOST_PORT=11211
|
||||
|
||||
### BEANSTALKD CONSOLE
|
||||
BEANSTALKD_CONSOLE_BUILD_PATH=./beanstalkd-console
|
||||
BEANSTALKD_CONSOLE_CONTAINER_NAME=beanstalkd-console
|
||||
BEANSTALKD_CONSOLE_HOST_PORT=2080
|
||||
|
||||
### BEANSTALKD Container
|
||||
BEANSTALKD_HOST_PORT=11300
|
||||
|
||||
### SELENIUM Container
|
||||
SELENIUM_PORT=4444
|
||||
|
||||
### MINIO Container
|
||||
MINIO_PORT=9000
|
||||
|
||||
### PHP MY ADMIN Container
|
||||
# PMA_DB_ENGINE=mariadb
|
||||
PMA_DB_ENGINE=mysql
|
||||
PMA_USER=default
|
||||
PMA_PASSWORD=secret
|
||||
PMA_ROOT_PASSWORD=secret
|
||||
PMA_PORT=88
|
||||
|
||||
### ADMINER Container
|
||||
ADM_PORT=88
|
||||
|
||||
### VARNISH Container
|
||||
VARNISH_CONFIG=/etc/varnish/default.vcl
|
||||
VARNISH_PORT=8080
|
||||
VARNISH_BACKEND_PORT=8888
|
||||
VARNISHD_PARAMS=-p default_ttl=3600 -p default_grace=3600
|
||||
|
||||
### Varnish Proxy 1 Container
|
||||
VARNISH_PROXY1_CACHE_SIZE=128m
|
||||
VARNISH_PROXY1_BACKEND_HOST=workspace
|
||||
VARNISH_PROXY1_SERVER=SERVER1
|
||||
|
||||
### Varnish Proxy 2 Container
|
||||
VARNISH_PROXY2_CACHE_SIZE=128m
|
||||
VARNISH_PROXY2_BACKEND_HOST=workspace
|
||||
VARNISH_PROXY2_SERVER=SERVER2
|
||||
|
||||
### HAPROXY Container
|
||||
HAPROXY_HOST_HTTP_PORT=8085
|
||||
|
||||
### JENKINS Container
|
||||
JENKINS_HOST_HTTP_PORT=8090
|
||||
JENKINS_HOST_SLAVE_AGENT_PORT=50000
|
||||
JENKINS_HOME=./jenkins/jenkins_home
|
||||
|
||||
### MISC
|
||||
# Replace with your Docker Host IP (will be appended to /etc/hosts)
|
||||
DOCKER_HOST_IP=10.0.75.1
|
||||
# The Remote Interpreter entry matching name `laradock`
|
||||
PHP_IDE_CONFIG=serverName=laradock
|
||||
# Fix for windows users to make sure the application path works.
|
||||
COMPOSE_CONVERT_WINDOWS_PATHS=1
|
||||
|
||||
### to be continue neo4j mongo rethinkdb redis aerospike pgadmin ...
|
5
haproxy/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM dockercloud/haproxy:latest
|
||||
|
||||
MAINTAINER ZeroC0D3 Team<zeroc0d3.team@gmail.com>
|
||||
|
||||
EXPOSE 80
|
@ -1,5 +1,7 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||
|
||||
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
|
||||
|
||||
RUN apt-get update -y \
|
||||
|
23
jenkins/.github/ISSUE_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# Issues and Contributing
|
||||
|
||||
Please note that only issues related to this Docker image will be addressed here.
|
||||
|
||||
* If you have Docker related issues, please ask in the [Docker user mailing list](https://groups.google.com/forum/#!forum/docker-user).
|
||||
* If you have Jenkins related issues, please ask in the [Jenkins mailing lists](https://jenkins-ci.org/content/mailing-lists).
|
||||
* If you are not sure, then this is probably not the place to create an issue and you should use any of the previously mentioned mailing lists.
|
||||
|
||||
If after going through the previous checklist you still think you should create an issue here please provide:
|
||||
|
||||
|
||||
### Docker commands that you execute
|
||||
|
||||
### Actual result
|
||||
|
||||
### Expected outcome
|
||||
|
||||
### Have you tried a non-dockerized Jenkins and get the expected outcome?
|
||||
|
||||
### Output of `docker version`
|
||||
|
||||
### Other relevant information
|
||||
|
6
jenkins/.gitmodules
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
[submodule "tests/test_helper/bats-support"]
|
||||
path = tests/test_helper/bats-support
|
||||
url = https://github.com/ztombol/bats-support
|
||||
[submodule "tests/test_helper/bats-assert"]
|
||||
path = tests/test_helper/bats-assert
|
||||
url = https://github.com/ztombol/bats-assert
|
16
jenkins/CONTRIBUTING.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Issues and Contributing
|
||||
|
||||
Please note that only issues related to this Docker image will be addressed here.
|
||||
|
||||
* If you have Docker related issues, please ask in the [Docker user mailing list](https://groups.google.com/forum/#!forum/docker-user).
|
||||
* If you have Jenkins related issues, please ask in the [Jenkins mailing lists](https://jenkins-ci.org/content/mailing-lists).
|
||||
* If you are not sure, then this is probably not the place to create an issue and you should use any of the previously mentioned mailing lists.
|
||||
|
||||
If after going through the previous checklist you still think you should create an issue here please provide:
|
||||
|
||||
* Docker commands that you execute
|
||||
* Actual result
|
||||
* Expected outcome
|
||||
* Have you tried a non-dockerized Jenkins and get the expected outcome?
|
||||
* Output of `docker version`
|
||||
* Other relevant information
|
108
jenkins/Dockerfile
Normal file
@ -0,0 +1,108 @@
|
||||
FROM openjdk:8-jdk
|
||||
|
||||
RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV JENKINS_HOME /var/jenkins_home
|
||||
ENV JENKINS_SLAVE_AGENT_PORT 50000
|
||||
|
||||
ARG user=jenkins
|
||||
ARG group=jenkins
|
||||
ARG uid=1000
|
||||
ARG gid=1000
|
||||
|
||||
# Jenkins is run with user `jenkins`, uid = 1000
|
||||
# If you bind mount a volume from the host or a data container,
|
||||
# ensure you use the same uid
|
||||
RUN groupadd -g ${gid} ${group} \
|
||||
&& useradd -d "$JENKINS_HOME" -u ${uid} -g ${gid} -m -s /bin/bash ${user}
|
||||
|
||||
# Jenkins home directory is a volume, so configuration and build history
|
||||
# can be persisted and survive image upgrades
|
||||
VOLUME /var/jenkins_home
|
||||
|
||||
# `/usr/share/jenkins/ref/` contains all reference configuration we want
|
||||
# to set on a fresh new installation. Use it to bundle additional plugins
|
||||
# or config file with your custom jenkins Docker image.
|
||||
RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
|
||||
|
||||
ENV TINI_VERSION 0.13.2
|
||||
ENV TINI_SHA afbf8de8a63ce8e4f18cb3f34dfdbbd354af68a1
|
||||
|
||||
# Use tini as subreaper in Docker container to adopt zombie processes
|
||||
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
|
||||
&& echo "$TINI_SHA /bin/tini" | sha1sum -c -
|
||||
|
||||
COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-agent-port.groovy
|
||||
|
||||
# jenkins version being bundled in this docker image
|
||||
ARG JENKINS_VERSION
|
||||
ENV JENKINS_VERSION ${JENKINS_VERSION:-2.32.3}
|
||||
|
||||
# jenkins.war checksum, download will be validated using it
|
||||
ARG JENKINS_SHA=a25b9a314ca9e76f9673da7309e1882e32674223
|
||||
|
||||
# Can be used to customize where jenkins.war get downloaded from
|
||||
ARG JENKINS_URL=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/${JENKINS_VERSION}/jenkins-war-${JENKINS_VERSION}.war
|
||||
|
||||
# could use ADD but this one does not check Last-Modified header neither does it allow to control checksum
|
||||
# see https://github.com/docker/docker/issues/8331
|
||||
RUN curl -fsSL ${JENKINS_URL} -o /usr/share/jenkins/jenkins.war \
|
||||
&& echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" | sha1sum -c -
|
||||
|
||||
ENV JENKINS_UC https://updates.jenkins.io
|
||||
RUN chown -R ${user} "$JENKINS_HOME" /usr/share/jenkins/ref
|
||||
|
||||
|
||||
# Add jenkins to the correct group
|
||||
# see http://stackoverflow.com/questions/42164653/docker-in-docker-permissions-error
|
||||
# use "getent group docker | awk -F: '{printf "%d\n", $3}'" command on host to find correct value for gid or simply use 'id'
|
||||
ARG DOCKER_GID=998
|
||||
|
||||
RUN groupadd -g ${DOCKER_GID} docker \
|
||||
&& curl -sSL https://get.docker.com/ | sh \
|
||||
&& apt-get -q autoremove \
|
||||
&& apt-get -q clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*.bin
|
||||
|
||||
# Install Docker-in-Docker from git@github.com:jpetazzo/dind.git
|
||||
# RUN apt-get update -qq && apt-get install -qqy apt-transport-https ca-certificates curl lxc iptables
|
||||
# Install Docker from Docker Inc. repositories.
|
||||
RUN apt-get install -y curl && curl -sSL https://get.docker.com/ | sh
|
||||
RUN usermod -aG docker jenkins
|
||||
|
||||
# Install Docker-Compose
|
||||
RUN curl -L "https://github.com/docker/compose/releases/download/1.10.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
RUN chmod +x /usr/local/bin/docker-compose
|
||||
|
||||
|
||||
# for main web interface:
|
||||
EXPOSE 8080
|
||||
|
||||
# will be used by attached slave agents:
|
||||
EXPOSE 50000
|
||||
|
||||
ENV COPY_REFERENCE_FILE_LOG $JENKINS_HOME/copy_reference_file.log
|
||||
|
||||
USER ${user}
|
||||
|
||||
COPY jenkins-support /usr/local/bin/jenkins-support
|
||||
COPY jenkins.sh /usr/local/bin/jenkins.sh
|
||||
ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/jenkins.sh"]
|
||||
|
||||
# from a derived Dockerfile, can use `RUN plugins.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
|
||||
COPY plugins.sh /usr/local/bin/plugins.sh
|
||||
COPY install-plugins.sh /usr/local/bin/install-plugins.sh
|
||||
|
||||
# Only need below if we are starting from empty jenkins_home
|
||||
## Copy the RSA keys
|
||||
#RUN mkdir -p /var/jenkins_home/.ssh
|
||||
#RUN chown jenkins:jenkins /var/jenkins_home/.ssh
|
||||
#COPY keys/id_rsa /var/jenkins_home/.ssh/id_rsa.pub
|
||||
#COPY keys/id_rsa /var/jenkins_home/.ssh/id_rsa
|
||||
#COPY keys/known_hosts /var/jenkins_home/.ssh/known_hosts
|
||||
#
|
||||
#USER root
|
||||
#RUN chmod 600 /var/jenkins_home/.ssh/id_rsa
|
||||
#RUN chmod 644 /var/jenkins_home/.ssh/id_rsa.pub
|
||||
## ssh-keyscan -H github.com >> ~/.ssh/known_hosts
|
||||
## ssh-keyscan -H bitbucket.org >> ~/.ssh/known_hosts
|
38
jenkins/Jenkinsfile
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
properties([
|
||||
buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5')),
|
||||
pipelineTriggers([cron('@daily')]),
|
||||
])
|
||||
|
||||
node('docker') {
|
||||
deleteDir()
|
||||
|
||||
stage('Checkout') {
|
||||
checkout scm
|
||||
}
|
||||
|
||||
if (!infra.isTrusted()) {
|
||||
/* Outside of the trusted.ci environment, we're building and testing
|
||||
* the Dockerful in this repository, but not publishing to docker hub
|
||||
*/
|
||||
stage('Build') {
|
||||
docker.build('jenkins')
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
sh """
|
||||
git submodule update --init --recursive
|
||||
git clone https://github.com/sstephenson/bats.git
|
||||
bats/bin/bats tests
|
||||
"""
|
||||
}
|
||||
} else {
|
||||
/* In our trusted.ci environment we only want to be publishing our
|
||||
* containers from artifacts
|
||||
*/
|
||||
stage('Publish') {
|
||||
sh './publish.sh'
|
||||
}
|
||||
}
|
||||
}
|
226
jenkins/README.md
Normal file
@ -0,0 +1,226 @@
|
||||
# Official Jenkins Docker image
|
||||
|
||||
The Jenkins Continuous Integration and Delivery server.
|
||||
|
||||
This is a fully functional Jenkins server, based on the Long Term Support release.
|
||||
[http://jenkins.io/](http://jenkins.io/).
|
||||
|
||||
For weekly releases check out [`jenkinsci/jenkins`](https://hub.docker.com/r/jenkinsci/jenkins/)
|
||||
|
||||
|
||||
<img src="http://jenkins-ci.org/sites/default/files/jenkins_logo.png"/>
|
||||
|
||||
|
||||
# Usage
|
||||
|
||||
```
|
||||
docker run -p 8080:8080 -p 50000:50000 jenkins
|
||||
```
|
||||
|
||||
NOTE: read below the _build executors_ part for the role of the `50000` port mapping.
|
||||
|
||||
This will store the workspace in /var/jenkins_home. All Jenkins data lives in there - including plugins and configuration.
|
||||
You will probably want to make that an explicit volume so you can manage it and attach to another container for upgrades :
|
||||
|
||||
```
|
||||
docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins
|
||||
```
|
||||
|
||||
this will automatically create a 'jenkins_home' volume on docker host, that will survive container stop/restart/deletion.
|
||||
|
||||
Avoid using a bind mount from a folder on host into `/var/jenkins_home`, as this might result in file permission issue. If you _really_ need to bind mount jenkins_home, ensure that directory on host is accessible by the jenkins user in container (jenkins user - uid 1000) or use `-u some_other_user` parameter with `docker run`.
|
||||
|
||||
## Backing up data
|
||||
|
||||
If you bind mount in a volume - you can simply back up that directory
|
||||
(which is jenkins_home) at any time.
|
||||
|
||||
This is highly recommended. Treat the jenkins_home directory as you would a database - in Docker you would generally put a database on a volume.
|
||||
|
||||
If your volume is inside a container - you can use ```docker cp $ID:/var/jenkins_home``` command to extract the data, or other options to find where the volume data is.
|
||||
Note that some symlinks on some OSes may be converted to copies (this can confuse jenkins with lastStableBuild links etc)
|
||||
|
||||
For more info check Docker docs section on [Managing data in containers](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
||||
|
||||
# Setting the number of executors
|
||||
|
||||
You can specify and set the number of executors of your Jenkins master instance using a groovy script. By default its set to 2 executors, but you can extend the image and change it to your desired number of executors :
|
||||
|
||||
`executors.groovy`
|
||||
```
|
||||
import jenkins.model.*
|
||||
Jenkins.instance.setNumExecutors(5)
|
||||
```
|
||||
|
||||
and `Dockerfile`
|
||||
|
||||
```
|
||||
FROM jenkins
|
||||
COPY executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy
|
||||
```
|
||||
|
||||
|
||||
# Attaching build executors
|
||||
|
||||
You can run builds on the master out of the box.
|
||||
|
||||
But if you want to attach build slave servers **through JNLP (Java Web Start)**: make sure you map the port: ```-p 50000:50000``` - which will be used when you connect a slave agent.
|
||||
|
||||
If you are only using [SSH slaves](https://wiki.jenkins-ci.org/display/JENKINS/SSH+Slaves+plugin), then you do **NOT** need to put that port mapping.
|
||||
|
||||
# Passing JVM parameters
|
||||
|
||||
You might need to customize the JVM running Jenkins, typically to pass system properties or tweak heap memory settings. Use JAVA_OPTS environment
|
||||
variable for this purpose :
|
||||
|
||||
```
|
||||
docker run --name myjenkins -p 8080:8080 -p 50000:50000 --env JAVA_OPTS=-Dhudson.footerURL=http://mycompany.com jenkins
|
||||
```
|
||||
|
||||
# Configuring logging
|
||||
|
||||
Jenkins logging can be configured through a properties file and `java.util.logging.config.file` Java property.
|
||||
For example:
|
||||
|
||||
```
|
||||
mkdir data
|
||||
cat > data/log.properties <<EOF
|
||||
handlers=java.util.logging.ConsoleHandler
|
||||
jenkins.level=FINEST
|
||||
java.util.logging.ConsoleHandler.level=FINEST
|
||||
EOF
|
||||
docker run --name myjenkins -p 8080:8080 -p 50000:50000 --env JAVA_OPTS="-Djava.util.logging.config.file=/var/jenkins_home/log.properties" -v `pwd`/data:/var/jenkins_home jenkins
|
||||
```
|
||||
|
||||
# Configuring reverse proxy
|
||||
If you want to install Jenkins behind a reverse proxy with prefix, example: mysite.com/jenkins, you need to add environnement variable `JENKINS_OPTS="--prefix=/jenkins"` and then follow the below procedures to configure your reverse proxy, which will depend if you have Apache ou Nginx:
|
||||
- [Apache](https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache)
|
||||
- [Nginx](https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy)
|
||||
|
||||
# Passing Jenkins launcher parameters
|
||||
|
||||
Argument you pass to docker running the jenkins image are passed to jenkins launcher, so you can run for sample :
|
||||
```
|
||||
docker run jenkins --version
|
||||
```
|
||||
This will dump Jenkins version, just like when you run jenkins as an executable war.
|
||||
|
||||
You also can define jenkins arguments as `JENKINS_OPTS`. This is usefull to define a set of arguments to pass to jenkins launcher as you
|
||||
define a derived jenkins image based on the official one with some customized settings. The following sample Dockerfile uses this option
|
||||
to force use of HTTPS with a certificate included in the image
|
||||
|
||||
```
|
||||
FROM jenkins:1.565.3
|
||||
|
||||
COPY https.pem /var/lib/jenkins/cert
|
||||
COPY https.key /var/lib/jenkins/pk
|
||||
ENV JENKINS_OPTS --httpPort=-1 --httpsPort=8083 --httpsCertificate=/var/lib/jenkins/cert --httpsPrivateKey=/var/lib/jenkins/pk
|
||||
EXPOSE 8083
|
||||
```
|
||||
|
||||
You can also change the default slave agent port for jenkins by defining `JENKINS_SLAVE_AGENT_PORT` in a sample Dockerfile.
|
||||
|
||||
```
|
||||
FROM jenkins:1.565.3
|
||||
ENV JENKINS_SLAVE_AGENT_PORT 50001
|
||||
```
|
||||
or as a parameter to docker,
|
||||
```
|
||||
docker run --name myjenkins -p 8080:8080 -p 50001:50001 --env JENKINS_SLAVE_AGENT_PORT=50001 jenkins
|
||||
```
|
||||
|
||||
# Installing more tools
|
||||
|
||||
You can run your container as root - and install via apt-get, install as part of build steps via jenkins tool installers, or you can create your own Dockerfile to customise, for example:
|
||||
|
||||
```
|
||||
FROM jenkins
|
||||
# if we want to install via apt
|
||||
USER root
|
||||
RUN apt-get update && apt-get install -y ruby make more-thing-here
|
||||
# drop back to the regular jenkins user - good practice
|
||||
USER jenkins
|
||||
```
|
||||
|
||||
In such a derived image, you can customize your jenkins instance with hook scripts or additional plugins.
|
||||
For this purpose, use `/usr/share/jenkins/ref` as a place to define the default JENKINS_HOME content you
|
||||
wish the target installation to look like :
|
||||
|
||||
```
|
||||
FROM jenkins
|
||||
COPY custom.groovy /usr/share/jenkins/ref/init.groovy.d/custom.groovy
|
||||
```
|
||||
|
||||
## Preinstalling plugins
|
||||
|
||||
You can rely on the `install-plugins.sh` script to pass a set of plugins to download with their dependencies.
|
||||
Use plugin artifact ID, whithout `-plugin` extension, and append the version if needed separated by `:`.
|
||||
Dependencies that are already included in the Jenkins war will only be downloaded if their required version is newer than the one included.
|
||||
|
||||
```
|
||||
FROM jenkins
|
||||
RUN /usr/local/bin/install-plugins.sh docker-slaves github-branch-source:1.8
|
||||
```
|
||||
|
||||
When jenkins container starts, it will check `JENKINS_HOME` has this reference content, and copy them
|
||||
there if required. It will not override such files, so if you upgraded some plugins from UI they won't
|
||||
be reverted on next start.
|
||||
|
||||
In case you *do* want to override, append '.override' to the name of the reference file. E.g. a file named
|
||||
`/usr/share/jenkins/ref/config.xml.override` will overwrite an existing `config.xml` file in JENKINS_HOME.
|
||||
|
||||
Also see [JENKINS-24986](https://issues.jenkins-ci.org/browse/JENKINS-24986)
|
||||
|
||||
|
||||
Here is an example to get the list of plugins from an existing server:
|
||||
|
||||
```
|
||||
JENKINS_HOST=username:password@myhost.com:port
|
||||
curl -sSL "http://$JENKINS_HOST/pluginManager/api/xml?depth=1&xpath=/*/*/shortName|/*/*/version&wrapper=plugins" | perl -pe 's/.*?<shortName>([\w-]+).*?<version>([^<]+)()(<\/\w+>)+/\1 \2\n/g'|sed 's/ /:/'
|
||||
```
|
||||
|
||||
Example Output:
|
||||
|
||||
```
|
||||
cucumber-testresult-plugin:0.8.2
|
||||
pam-auth:1.1
|
||||
matrix-project:1.4.1
|
||||
script-security:1.13
|
||||
...
|
||||
```
|
||||
|
||||
For 2.x-derived images, you may also want to
|
||||
|
||||
RUN echo 2.0 > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state
|
||||
|
||||
to indicate that this Jenkins installation is fully configured.
|
||||
Otherwise a banner will appear prompting the user to install additional plugins,
|
||||
which may be inappropriate.
|
||||
|
||||
# Upgrading
|
||||
|
||||
All the data needed is in the /var/jenkins_home directory - so depending on how you manage that - depends on how you upgrade. Generally - you can copy it out - and then "docker pull" the image again - and you will have the latest LTS - you can then start up with -v pointing to that data (/var/jenkins_home) and everything will be as you left it.
|
||||
|
||||
As always - please ensure that you know how to drive docker - especially volume handling!
|
||||
|
||||
## Upgrading plugins
|
||||
|
||||
By default, plugins will be upgraded if they haven't been upgraded manually and if the version from the docker image is newer than the version in the container. Versions installed by the docker image are tracked through a marker file.
|
||||
|
||||
The default behaviour when upgrading from a docker image that didn't write marker files is to leave existing plugins in place. If you want to upgrade existing plugins without marker you may run the docker image with `-e TRY_UPGRADE_IF_NO_MARKER=true`. Then plugins will be upgraded if the version provided by the docker image is newer.
|
||||
|
||||
# Building
|
||||
|
||||
Build with the usual
|
||||
|
||||
docker build -t jenkins .
|
||||
|
||||
Tests are written using [bats](https://github.com/sstephenson/bats) under the `tests` dir
|
||||
|
||||
bats tests
|
||||
|
||||
Bats can be easily installed with `brew install bats` on OS X
|
||||
|
||||
# Questions?
|
||||
|
||||
Jump on irc.freenode.net and the #jenkins room. Ask!
|
14
jenkins/docker-compose.yml
Normal file
@ -0,0 +1,14 @@
|
||||
master:
|
||||
build: .
|
||||
environment:
|
||||
JAVA_OPTS: "-Djava.awt.headless=true"
|
||||
ports:
|
||||
- "50000:50000"
|
||||
# Expose Jenkins to parent on port 8090
|
||||
- "8090:8080"
|
||||
# Allow Docker In Docker
|
||||
privileged: true
|
||||
volumes:
|
||||
- ./jenkins_home:/var/jenkins_home
|
||||
# Allow Docker In Docker to use parent docker container
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
12
jenkins/init.groovy
Normal file
@ -0,0 +1,12 @@
|
||||
import hudson.model.*;
|
||||
import jenkins.model.*;
|
||||
|
||||
|
||||
Thread.start {
|
||||
sleep 10000
|
||||
println "--> setting agent port for jnlp"
|
||||
def env = System.getenv()
|
||||
int port = env['JENKINS_SLAVE_AGENT_PORT'].toInteger()
|
||||
Jenkins.instance.setSlaveAgentPort(port)
|
||||
println "--> setting agent port for jnlp... done"
|
||||
}
|
205
jenkins/install-plugins.sh
Normal file
@ -0,0 +1,205 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
# Resolve dependencies and download plugins given on the command line
|
||||
#
|
||||
# FROM jenkins
|
||||
# RUN install-plugins.sh docker-slaves github-branch-source
|
||||
|
||||
set -o pipefail
|
||||
|
||||
REF_DIR=${REF:-/usr/share/jenkins/ref/plugins}
|
||||
FAILED="$REF_DIR/failed-plugins.txt"
|
||||
|
||||
. /usr/local/bin/jenkins-support
|
||||
|
||||
getLockFile() {
|
||||
printf '%s' "$REF_DIR/${1}.lock"
|
||||
}
|
||||
|
||||
getArchiveFilename() {
|
||||
printf '%s' "$REF_DIR/${1}.jpi"
|
||||
}
|
||||
|
||||
download() {
|
||||
local plugin originalPlugin version lock ignoreLockFile
|
||||
plugin="$1"
|
||||
version="${2:-latest}"
|
||||
ignoreLockFile="${3:-}"
|
||||
lock="$(getLockFile "$plugin")"
|
||||
|
||||
if [[ $ignoreLockFile ]] || mkdir "$lock" &>/dev/null; then
|
||||
if ! doDownload "$plugin" "$version"; then
|
||||
# some plugin don't follow the rules about artifact ID
|
||||
# typically: docker-plugin
|
||||
originalPlugin="$plugin"
|
||||
plugin="${plugin}-plugin"
|
||||
if ! doDownload "$plugin" "$version"; then
|
||||
echo "Failed to download plugin: $originalPlugin or $plugin" >&2
|
||||
echo "Not downloaded: ${originalPlugin}" >> "$FAILED"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! checkIntegrity "$plugin"; then
|
||||
echo "Downloaded file is not a valid ZIP: $(getArchiveFilename "$plugin")" >&2
|
||||
echo "Download integrity: ${plugin}" >> "$FAILED"
|
||||
return 1
|
||||
fi
|
||||
|
||||
resolveDependencies "$plugin"
|
||||
fi
|
||||
}
|
||||
|
||||
doDownload() {
|
||||
local plugin version url jpi
|
||||
plugin="$1"
|
||||
version="$2"
|
||||
jpi="$(getArchiveFilename "$plugin")"
|
||||
|
||||
# If plugin already exists and is the same version do not download
|
||||
if test -f "$jpi" && unzip -p "$jpi" META-INF/MANIFEST.MF | tr -d '\r' | grep "^Plugin-Version: ${version}$" > /dev/null; then
|
||||
echo "Using provided plugin: $plugin"
|
||||
return 0
|
||||
fi
|
||||
|
||||
JENKINS_UC_DOWNLOAD=${JENKINS_UC_DOWNLOAD:-"$JENKINS_UC/download"}
|
||||
|
||||
url="$JENKINS_UC_DOWNLOAD/plugins/$plugin/$version/${plugin}.hpi"
|
||||
|
||||
echo "Downloading plugin: $plugin from $url"
|
||||
curl --connect-timeout ${CURL_CONNECTION_TIMEOUT:-20} --retry ${CURL_RETRY:-5} --retry-delay ${CURL_RETRY_DELAY:-0} --retry-max-time ${CURL_RETRY_MAX_TIME:-60} -s -f -L "$url" -o "$jpi"
|
||||
return $?
|
||||
}
|
||||
|
||||
checkIntegrity() {
|
||||
local plugin jpi
|
||||
plugin="$1"
|
||||
jpi="$(getArchiveFilename "$plugin")"
|
||||
|
||||
unzip -t -qq "$jpi" >/dev/null
|
||||
return $?
|
||||
}
|
||||
|
||||
resolveDependencies() {
|
||||
local plugin jpi dependencies
|
||||
plugin="$1"
|
||||
jpi="$(getArchiveFilename "$plugin")"
|
||||
|
||||
dependencies="$(unzip -p "$jpi" META-INF/MANIFEST.MF | tr -d '\r' | tr '\n' '|' | sed -e 's#| ##g' | tr '|' '\n' | grep "^Plugin-Dependencies: " | sed -e 's#^Plugin-Dependencies: ##')"
|
||||
|
||||
if [[ ! $dependencies ]]; then
|
||||
echo " > $plugin has no dependencies"
|
||||
return
|
||||
fi
|
||||
|
||||
echo " > $plugin depends on $dependencies"
|
||||
|
||||
IFS=',' read -r -a array <<< "$dependencies"
|
||||
|
||||
for d in "${array[@]}"
|
||||
do
|
||||
plugin="$(cut -d':' -f1 - <<< "$d")"
|
||||
if [[ $d == *"resolution:=optional"* ]]; then
|
||||
echo "Skipping optional dependency $plugin"
|
||||
else
|
||||
local pluginInstalled
|
||||
if pluginInstalled="$(echo "${bundledPlugins}" | grep "^${plugin}:")"; then
|
||||
pluginInstalled="${pluginInstalled//[$'\r']}"
|
||||
local versionInstalled; versionInstalled=$(versionFromPlugin "${pluginInstalled}")
|
||||
local minVersion; minVersion=$(versionFromPlugin "${d}")
|
||||
if versionLT "${versionInstalled}" "${minVersion}"; then
|
||||
echo "Upgrading bundled dependency $d ($minVersion > $versionInstalled)"
|
||||
download "$plugin" &
|
||||
else
|
||||
echo "Skipping already bundled dependency $d ($minVersion <= $versionInstalled)"
|
||||
fi
|
||||
else
|
||||
download "$plugin" &
|
||||
fi
|
||||
fi
|
||||
done
|
||||
wait
|
||||
}
|
||||
|
||||
bundledPlugins() {
|
||||
local JENKINS_WAR=/usr/share/jenkins/jenkins.war
|
||||
if [ -f $JENKINS_WAR ]
|
||||
then
|
||||
TEMP_PLUGIN_DIR=/tmp/plugintemp.$$
|
||||
for i in $(jar tf $JENKINS_WAR | egrep '[^detached-]plugins.*\..pi' | sort)
|
||||
do
|
||||
rm -fr $TEMP_PLUGIN_DIR
|
||||
mkdir -p $TEMP_PLUGIN_DIR
|
||||
PLUGIN=$(basename "$i"|cut -f1 -d'.')
|
||||
(cd $TEMP_PLUGIN_DIR;jar xf "$JENKINS_WAR" "$i";jar xvf "$TEMP_PLUGIN_DIR/$i" META-INF/MANIFEST.MF >/dev/null 2>&1)
|
||||
VER=$(egrep -i Plugin-Version "$TEMP_PLUGIN_DIR/META-INF/MANIFEST.MF"|cut -d: -f2|sed 's/ //')
|
||||
echo "$PLUGIN:$VER"
|
||||
done
|
||||
rm -fr $TEMP_PLUGIN_DIR
|
||||
else
|
||||
rm -f "$TEMP_ALREADY_INSTALLED"
|
||||
echo "ERROR file not found: $JENKINS_WAR"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
versionFromPlugin() {
|
||||
local plugin=$1
|
||||
if [[ $plugin =~ .*:.* ]]; then
|
||||
echo "${plugin##*:}"
|
||||
else
|
||||
echo "latest"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
installedPlugins() {
|
||||
for f in "$REF_DIR"/*.jpi; do
|
||||
echo "$(basename "$f" | sed -e 's/\.jpi//'):$(get_plugin_version "$f")"
|
||||
done
|
||||
}
|
||||
|
||||
main() {
|
||||
local plugin version
|
||||
|
||||
mkdir -p "$REF_DIR" || exit 1
|
||||
|
||||
# Create lockfile manually before first run to make sure any explicit version set is used.
|
||||
echo "Creating initial locks..."
|
||||
for plugin in "$@"; do
|
||||
mkdir "$(getLockFile "${plugin%%:*}")"
|
||||
done
|
||||
|
||||
echo "Analyzing war..."
|
||||
bundledPlugins="$(bundledPlugins)"
|
||||
|
||||
echo "Downloading plugins..."
|
||||
for plugin in "$@"; do
|
||||
version=""
|
||||
|
||||
if [[ $plugin =~ .*:.* ]]; then
|
||||
version=$(versionFromPlugin "${plugin}")
|
||||
plugin="${plugin%%:*}"
|
||||
fi
|
||||
|
||||
download "$plugin" "$version" "true" &
|
||||
done
|
||||
wait
|
||||
|
||||
echo
|
||||
echo "WAR bundled plugins:"
|
||||
echo "${bundledPlugins}"
|
||||
echo
|
||||
echo "Installed plugins:"
|
||||
installedPlugins
|
||||
|
||||
if [[ -f $FAILED ]]; then
|
||||
echo "Some plugins failed to download!" "$(<"$FAILED")" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Cleaning up locks"
|
||||
rm -r "$REF_DIR"/*.lock
|
||||
}
|
||||
|
||||
main "$@"
|
127
jenkins/jenkins-support
Normal file
@ -0,0 +1,127 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
# compare if version1 < version2
|
||||
versionLT() {
|
||||
local v1; v1=$(echo "$1" | cut -d '-' -f 1 )
|
||||
local q1; q1=$(echo "$1" | cut -s -d '-' -f 2- )
|
||||
local v2; v2=$(echo "$2" | cut -d '-' -f 1 )
|
||||
local q2; q2=$(echo "$2" | cut -s -d '-' -f 2- )
|
||||
if [ "$v1" = "$v2" ]; then
|
||||
if [ "$q1" = "$q2" ]; then
|
||||
return 1
|
||||
else
|
||||
if [ -z "$q1" ]; then
|
||||
return 1
|
||||
else
|
||||
if [ -z "$q2" ]; then
|
||||
return 0
|
||||
else
|
||||
[ "$q1" = "$(echo -e "$q1\n$q2" | sort -V | head -n1)" ]
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
[ "$v1" = "$(echo -e "$v1\n$v2" | sort -V | head -n1)" ]
|
||||
fi
|
||||
}
|
||||
|
||||
# returns a plugin version from a plugin archive
|
||||
get_plugin_version() {
|
||||
local archive; archive=$1
|
||||
local version; version=$(unzip -p "$archive" META-INF/MANIFEST.MF | grep "^Plugin-Version: " | sed -e 's#^Plugin-Version: ##')
|
||||
version=${version%%[[:space:]]}
|
||||
echo "$version"
|
||||
}
|
||||
|
||||
# Copy files from /usr/share/jenkins/ref into $JENKINS_HOME
|
||||
# So the initial JENKINS-HOME is set with expected content.
|
||||
# Don't override, as this is just a reference setup, and use from UI
|
||||
# can then change this, upgrade plugins, etc.
|
||||
copy_reference_file() {
|
||||
f="${1%/}"
|
||||
b="${f%.override}"
|
||||
rel="${b:23}"
|
||||
version_marker="${rel}.version_from_image"
|
||||
dir=$(dirname "${b}")
|
||||
local action;
|
||||
local reason;
|
||||
local container_version;
|
||||
local image_version;
|
||||
local marker_version;
|
||||
local log; log=false
|
||||
if [[ ${rel} == plugins/*.jpi ]]; then
|
||||
container_version=$(get_plugin_version "$JENKINS_HOME/${rel}")
|
||||
image_version=$(get_plugin_version "${f}")
|
||||
if [[ -e $JENKINS_HOME/${version_marker} ]]; then
|
||||
marker_version=$(cat "$JENKINS_HOME/${version_marker}")
|
||||
if versionLT "$marker_version" "$container_version"; then
|
||||
action="SKIPPED"
|
||||
reason="Installed version ($container_version) has been manually upgraded from initial version ($marker_version)"
|
||||
log=true
|
||||
else
|
||||
if [[ "$image_version" == "$container_version" ]]; then
|
||||
action="SKIPPED"
|
||||
reason="Version from image is the same as the installed version $image_version"
|
||||
else
|
||||
if versionLT "$image_version" "$container_version"; then
|
||||
action="SKIPPED"
|
||||
log=true
|
||||
reason="Image version ($image_version) is older than installed version ($container_version)"
|
||||
else
|
||||
action="UPGRADED"
|
||||
log=true
|
||||
reason="Image version ($image_version) is newer than installed version ($container_version)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ -n "$TRY_UPGRADE_IF_NO_MARKER" ]]; then
|
||||
if [[ "$image_version" == "$container_version" ]]; then
|
||||
action="SKIPPED"
|
||||
reason="Version from image is the same as the installed version $image_version (no marker found)"
|
||||
# Add marker for next time
|
||||
echo "$image_version" > "$JENKINS_HOME/${version_marker}"
|
||||
else
|
||||
if versionLT "$image_version" "$container_version"; then
|
||||
action="SKIPPED"
|
||||
log=true
|
||||
reason="Image version ($image_version) is older than installed version ($container_version) (no marker found)"
|
||||
else
|
||||
action="UPGRADED"
|
||||
log=true
|
||||
reason="Image version ($image_version) is newer than installed version ($container_version) (no marker found)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [[ ! -e $JENKINS_HOME/${rel} || "$action" == "UPGRADED" || $f = *.override ]]; then
|
||||
action=${action:-"INSTALLED"}
|
||||
log=true
|
||||
mkdir -p "$JENKINS_HOME/${dir:23}"
|
||||
cp -r "${f}" "$JENKINS_HOME/${rel}";
|
||||
# pin plugins on initial copy
|
||||
touch "$JENKINS_HOME/${rel}.pinned"
|
||||
echo "$image_version" > "$JENKINS_HOME/${version_marker}"
|
||||
reason=${reason:-$image_version}
|
||||
else
|
||||
action=${action:-"SKIPPED"}
|
||||
fi
|
||||
else
|
||||
if [[ ! -e $JENKINS_HOME/${rel} || $f = *.override ]]
|
||||
then
|
||||
action="INSTALLED"
|
||||
log=true
|
||||
mkdir -p "$JENKINS_HOME/${dir:23}"
|
||||
cp -r "${f}" "$JENKINS_HOME/${rel}";
|
||||
else
|
||||
action="SKIPPED"
|
||||
fi
|
||||
fi
|
||||
if [[ -n "$VERBOSE" || "$log" == "true" ]]; then
|
||||
if [ -z "$reason" ]; then
|
||||
echo "$action $rel" >> "$COPY_REFERENCE_FILE_LOG"
|
||||
else
|
||||
echo "$action $rel : $reason" >> "$COPY_REFERENCE_FILE_LOG"
|
||||
fi
|
||||
fi
|
||||
}
|
26
jenkins/jenkins.sh
Normal file
@ -0,0 +1,26 @@
|
||||
#! /bin/bash -e
|
||||
|
||||
: "${JENKINS_HOME:="/var/jenkins_home"}"
|
||||
touch "${COPY_REFERENCE_FILE_LOG}" || { echo "Can not write to ${COPY_REFERENCE_FILE_LOG}. Wrong volume permissions?"; exit 1; }
|
||||
echo "--- Copying files at $(date)" >> "$COPY_REFERENCE_FILE_LOG"
|
||||
find /usr/share/jenkins/ref/ -type f -exec bash -c '. /usr/local/bin/jenkins-support; for arg; do copy_reference_file "$arg"; done' _ {} +
|
||||
|
||||
# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
|
||||
if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
|
||||
|
||||
# read JAVA_OPTS and JENKINS_OPTS into arrays to avoid need for eval (and associated vulnerabilities)
|
||||
java_opts_array=()
|
||||
while IFS= read -r -d '' item; do
|
||||
java_opts_array+=( "$item" )
|
||||
done < <([[ $JAVA_OPTS ]] && xargs printf '%s\0' <<<"$JAVA_OPTS")
|
||||
|
||||
jenkins_opts_array=( )
|
||||
while IFS= read -r -d '' item; do
|
||||
jenkins_opts_array+=( "$item" )
|
||||
done < <([[ $JENKINS_OPTS ]] && xargs printf '%s\0' <<<"$JENKINS_OPTS")
|
||||
|
||||
exec java "${java_opts_array[@]}" -jar /usr/share/jenkins/jenkins.war "${jenkins_opts_array[@]}" "$@"
|
||||
fi
|
||||
|
||||
# As argument is not jenkins, assume user want to run his own process, for example a `bash` shell to explore this image
|
||||
exec "$@"
|
28
jenkins/jenkins_home/.gitignore
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# File Patterns to Ignore
|
||||
logs
|
||||
*.log
|
||||
*.log.*
|
||||
*.swp
|
||||
|
||||
# Ignore SSH Config
|
||||
.ssh/*
|
||||
!.ssh/known_hosts
|
||||
|
||||
# Include job configs and ignore other data
|
||||
!config.xml
|
||||
builds
|
||||
lastStable
|
||||
lastSuccessful
|
||||
nextBuildNumber
|
||||
|
||||
# Ignore expanded plugins folders because we only want jpi files
|
||||
plugins/*
|
||||
!plugins/*.jpi
|
||||
|
||||
# Include user info
|
||||
!userContent/*
|
||||
!users/*
|
||||
|
||||
# Ignore Directories
|
||||
workspace/
|
||||
war/
|
124
jenkins/plugins.sh
Normal file
@ -0,0 +1,124 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
|
||||
# in the reference directory, so user can define a derived Docker image with just :
|
||||
#
|
||||
# FROM jenkins
|
||||
# COPY plugins.txt /plugins.txt
|
||||
# RUN /usr/local/bin/plugins.sh /plugins.txt
|
||||
#
|
||||
# Note: Plugins already installed are skipped
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
echo "WARN: plugins.sh is deprecated, please switch to install-plugins.sh"
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "
|
||||
USAGE:
|
||||
Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
|
||||
in the reference directory, so user can define a derived Docker image with just :
|
||||
|
||||
FROM jenkins
|
||||
COPY plugins.txt /plugins.txt
|
||||
RUN /usr/local/bin/plugins.sh /plugins.txt
|
||||
|
||||
Note: Plugins already installed are skipped
|
||||
|
||||
"
|
||||
exit 1
|
||||
else
|
||||
JENKINS_INPUT_JOB_LIST=$1
|
||||
if [ ! -f "$JENKINS_INPUT_JOB_LIST" ]
|
||||
then
|
||||
echo "ERROR File not found: $JENKINS_INPUT_JOB_LIST"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# the war includes a # of plugins, to make the build efficient filter out
|
||||
# the plugins so we dont install 2x - there about 17!
|
||||
if [ -d "$JENKINS_HOME" ]
|
||||
then
|
||||
TEMP_ALREADY_INSTALLED=$JENKINS_HOME/preinstalled.plugins.$$.txt
|
||||
else
|
||||
echo "ERROR $JENKINS_HOME not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
JENKINS_PLUGINS_DIR=/var/jenkins_home/plugins
|
||||
if [ -d "$JENKINS_PLUGINS_DIR" ]
|
||||
then
|
||||
echo "Analyzing: $JENKINS_PLUGINS_DIR"
|
||||
for i in "$JENKINS_PLUGINS_DIR"/*/; do
|
||||
JENKINS_PLUGIN=$(basename "$i")
|
||||
JENKINS_PLUGIN_VER=$(egrep -i Plugin-Version "$i/META-INF/MANIFEST.MF"|cut -d: -f2|sed 's/ //')
|
||||
echo "$JENKINS_PLUGIN:$JENKINS_PLUGIN_VER"
|
||||
done >"$TEMP_ALREADY_INSTALLED"
|
||||
else
|
||||
JENKINS_WAR=/usr/share/jenkins/jenkins.war
|
||||
if [ -f "$JENKINS_WAR" ]
|
||||
then
|
||||
echo "Analyzing war: $JENKINS_WAR"
|
||||
TEMP_PLUGIN_DIR=/tmp/plugintemp.$$
|
||||
while read -r i <&3; do
|
||||
rm -fr "$TEMP_PLUGIN_DIR"
|
||||
mkdir -p "$TEMP_PLUGIN_DIR"
|
||||
PLUGIN=$(basename "$i"|cut -f1 -d'.')
|
||||
(cd "$TEMP_PLUGIN_DIR" || exit; jar xf "$JENKINS_WAR" "$i"; jar xvf "$TEMP_PLUGIN_DIR/$i" META-INF/MANIFEST.MF >/dev/null 2>&1)
|
||||
VER=$(egrep -i Plugin-Version "$TEMP_PLUGIN_DIR/META-INF/MANIFEST.MF"|cut -d: -f2|sed 's/ //')
|
||||
echo "$PLUGIN:$VER"
|
||||
done 3< <(jar tf "$JENKINS_WAR" | egrep '[^detached-]plugins.*\..pi' | sort) > "$TEMP_ALREADY_INSTALLED"
|
||||
rm -fr "$TEMP_PLUGIN_DIR"
|
||||
else
|
||||
rm -f "$TEMP_ALREADY_INSTALLED"
|
||||
echo "ERROR file not found: $JENKINS_WAR"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
REF=/usr/share/jenkins/ref/plugins
|
||||
mkdir -p $REF
|
||||
COUNT_PLUGINS_INSTALLED=0
|
||||
while read -r spec || [ -n "$spec" ]; do
|
||||
|
||||
plugin=(${spec//:/ });
|
||||
[[ ${plugin[0]} =~ ^# ]] && continue
|
||||
[[ ${plugin[0]} =~ ^[[:space:]]*$ ]] && continue
|
||||
[[ -z ${plugin[1]} ]] && plugin[1]="latest"
|
||||
|
||||
if [ -z "$JENKINS_UC_DOWNLOAD" ]; then
|
||||
JENKINS_UC_DOWNLOAD=$JENKINS_UC/download
|
||||
fi
|
||||
|
||||
if ! grep -q "${plugin[0]}:${plugin[1]}" "$TEMP_ALREADY_INSTALLED"
|
||||
then
|
||||
echo "Downloading ${plugin[0]}:${plugin[1]}"
|
||||
curl --retry 3 --retry-delay 5 -sSL -f "${JENKINS_UC_DOWNLOAD}/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi" -o "$REF/${plugin[0]}.jpi"
|
||||
unzip -qqt "$REF/${plugin[0]}.jpi"
|
||||
(( COUNT_PLUGINS_INSTALLED += 1 ))
|
||||
else
|
||||
echo " ... skipping already installed: ${plugin[0]}:${plugin[1]}"
|
||||
fi
|
||||
done < "$JENKINS_INPUT_JOB_LIST"
|
||||
|
||||
echo "---------------------------------------------------"
|
||||
if (( "$COUNT_PLUGINS_INSTALLED" > 0 ))
|
||||
then
|
||||
echo "INFO: Successfully installed $COUNT_PLUGINS_INSTALLED plugins."
|
||||
|
||||
if [ -d $JENKINS_PLUGINS_DIR ]
|
||||
then
|
||||
echo "INFO: Please restart the container for changes to take effect!"
|
||||
fi
|
||||
else
|
||||
echo "INFO: No changes, all plugins previously installed."
|
||||
|
||||
fi
|
||||
echo "---------------------------------------------------"
|
||||
|
||||
#cleanup
|
||||
rm "$TEMP_ALREADY_INSTALLED"
|
||||
exit 0
|