index.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. <!DOCTYPE html>
  2. <html class="no-js">
  3. <head lang="en-us">
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
  6. <meta http-equiv="X-UA-Compatible" content="IE=10" />
  7. <title>Contributing - Laradock</title>
  8. <meta name="generator" content="Hugo 0.19" />
  9. <meta name="description" content="Laradock documentations.">
  10. <link rel="canonical" href="http://laradock.io/contributing/">
  11. <meta name="author" content="Mahmoud Zalt">
  12. <meta property="og:url" content="http://laradock.io/contributing/">
  13. <meta property="og:title" content="Laradock">
  14. <meta name="apple-mobile-web-app-title" content="Laradock">
  15. <meta name="apple-mobile-web-app-capable" content="yes">
  16. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  17. <link rel="shortcut icon" type="image/x-icon" href="http://laradock.io/images/favicon.ico">
  18. <link rel="icon" type="image/x-icon" href="http://laradock.io/images/favicon.ico">
  19. <style>
  20. @font-face {
  21. font-family: 'Icon';
  22. src: url('http://laradock.io/fonts/icon.eot');
  23. src: url('http://laradock.io/fonts/icon.eot')
  24. format('embedded-opentype'),
  25. url('http://laradock.io/fonts/icon.woff')
  26. format('woff'),
  27. url('http://laradock.io/fonts/icon.ttf')
  28. format('truetype'),
  29. url('http://laradock.io/fonts/icon.svg')
  30. format('svg');
  31. font-weight: normal;
  32. font-style: normal;
  33. }
  34. </style>
  35. <link rel="stylesheet" href="http://laradock.io/stylesheets/application.css">
  36. <link rel="stylesheet" href="http://laradock.io/stylesheets/temporary.css">
  37. <link rel="stylesheet" href="http://laradock.io/stylesheets/palettes.css">
  38. <link rel="stylesheet" href="http://laradock.io/stylesheets/highlight/highlight.css">
  39. <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Doctarine:400,700|Source&#43;Code&#43;Pro">
  40. <style>
  41. body, input {
  42. font-family: 'Doctarine', Helvetica, Arial, sans-serif;
  43. }
  44. pre, code {
  45. font-family: 'Source Code Pro', 'Courier New', 'Courier', monospace;
  46. }
  47. </style>
  48. <script src="http://laradock.io/javascripts/modernizr.js"></script>
  49. </head>
  50. <body class="palette-primary-deep-purple palette-accent-purple">
  51. <div class="backdrop">
  52. <div class="backdrop-paper"></div>
  53. </div>
  54. <input class="toggle" type="checkbox" id="toggle-drawer">
  55. <input class="toggle" type="checkbox" id="toggle-search">
  56. <label class="toggle-button overlay" for="toggle-drawer"></label>
  57. <header class="header">
  58. <nav aria-label="Header">
  59. <div class="bar default">
  60. <div class="button button-menu" role="button" aria-label="Menu">
  61. <label class="toggle-button icon icon-menu" for="toggle-drawer">
  62. <span></span>
  63. </label>
  64. </div>
  65. <div class="stretch">
  66. <div class="title">
  67. <b>Laradock</b> <span style="color: rgba(249, 245, 255, 0.63);"> / Contributing</span>
  68. </div>
  69. </div>
  70. <div class="button button-github" role="button" aria-label="GitHub">
  71. <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>
  72. </div>
  73. <p style="font-size: 18px; padding: 8px">Github</p>
  74. </div>
  75. <div class="bar search">
  76. <div class="button button-close" role="button" aria-label="Close">
  77. <label class="toggle-button icon icon-back" for="toggle-search"></label>
  78. </div>
  79. <div class="stretch">
  80. <div class="field">
  81. <input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
  82. </div>
  83. </div>
  84. <div class="button button-reset" role="button" aria-label="Search">
  85. <button class="toggle-button icon icon-close" id="reset-search"></button>
  86. </div>
  87. </div>
  88. </nav>
  89. </header>
  90. <main class="main">
  91. <div class="drawer">
  92. <nav aria-label="Navigation">
  93. <div class="scrollable">
  94. <div class="wrapper">
  95. <div class="toc">
  96. <ul>
  97. <li>
  98. <a title="Introduction" href="http://laradock.io/introduction/">
  99. Introduction
  100. </a>
  101. </li>
  102. <li>
  103. <a title="Getting Started" href="http://laradock.io/getting-started/">
  104. Getting Started
  105. </a>
  106. </li>
  107. <li>
  108. <a title="Documentation" href="http://laradock.io/documentation/">
  109. Documentation
  110. </a>
  111. </li>
  112. <li>
  113. <a title="Related Projects" href="http://laradock.io/related-projects/">
  114. Related Projects
  115. </a>
  116. </li>
  117. <li>
  118. <a title="Help &amp; Questions" href="http://laradock.io/help/">
  119. Help &amp; Questions
  120. </a>
  121. </li>
  122. <li>
  123. <a class="current" title="Contributing" href="http://laradock.io/contributing/">
  124. Contributing
  125. </a>
  126. <ul id="scrollspy">
  127. </ul>
  128. </li>
  129. <li>
  130. <a title="License" href="http://laradock.io/license/">
  131. License
  132. </a>
  133. </li>
  134. </ul>
  135. <ul>
  136. </ul>
  137. </div>
  138. </div>
  139. </div>
  140. </nav>
  141. </div>
  142. <article class="article">
  143. <div class="wrapper">
  144. <h1>Contributing </h1>
  145. <p>Your contribution is more than welcome.</p>
  146. <h2 id="i-have-a-question-problem">I have a Question/Problem</h2>
  147. <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>
  148. <h2 id="i-found-an-issue">I found an Issue</h2>
  149. <p>If have an issue or you found a typo in the documentation, you can help us by
  150. opnening an <a href="https://github.com/laradock/laradock/issues">Issue</a>.</p>
  151. <p><strong>Steps to do before opening an Issue:</strong></p>
  152. <ol>
  153. <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>
  154. <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>
  155. </ol>
  156. <p>If your issue appears to be a bug, and hasn&rsquo;t been reported, then open a new issue.</p>
  157. <p><em>This Help us to maximize the effort we can spend fixing issues and adding new
  158. features, by not reporting duplicate issues.</em></p>
  159. <h2 id="i-want-a-feature">I want a Feature</h2>
  160. <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>
  161. <h2 id="i-want-to-update-the-documentation-site">I want to update the Documentation (Site)</h2>
  162. <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>
  163. <ol>
  164. <li>Install <a href="https://gohugo.io/">Hugo</a> on your machine (easy thing).</li>
  165. <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>
  166. <li>Delete the <code>/docs</code> folder from the root.</li>
  167. <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>
  168. </ol>
  169. <h3 id="to-host-the-website-locally">To Host the website locally</h3>
  170. <p>Go to <code>DOCUMENTATION/_settings</code> in your terminal and run <code>hugo serve</code> to host the website locally.</p>
  171. <h3 id="edit-the-sidebar">Edit the sidebar</h3>
  172. <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>
  173. <h2 id="how-to-support-new-software-add-new-container">How to support new Software (Add new Container)</h2>
  174. <ul>
  175. <li><p>Create folder with the software name.</p></li>
  176. <li><p>Add a <code>Dockerfile</code>, write your code there.</p></li>
  177. <li><p>You may add additional files in the software folder.</p></li>
  178. <li><p>Add the software to the <code>docker-compose.yml</code> file.</p></li>
  179. <li><p>Make sure you follow our commenting style.</p></li>
  180. <li><p>Add the software in the <code>Documentation</code>.</p></li>
  181. </ul>
  182. <h2 id="edit-existing-software-edit-a-container">Edit existing Software (Edit a Container)</h2>
  183. <ul>
  184. <li><p>Open the software (container) folder.</p></li>
  185. <li><p>Edit the files you want to update.</p></li>
  186. <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,
  187. you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the Laradock repository.</p></li>
  188. <li><p>Make sure to update the <code>Documentation</code> in case you made any changes.</p></li>
  189. </ul>
  190. <h2 id="pull-request">Pull Request</h2>
  191. <h3 id="1-before-submitting-a-pull-request-pr">1. Before Submitting a Pull Request (PR)</h3>
  192. <p>Always Test everything and make sure its working:</p>
  193. <ul>
  194. <li>Pull the latest updates (or fork of you don’t have permission)</li>
  195. <li>Before editing anything:
  196. <ul>
  197. <li>Test building the container (docker-compose build &ndash;no-cache container-name) build with no cache first.</li>
  198. <li>Test running the container with some other containers in real app and see of everything is working fine.</li>
  199. </ul></li>
  200. <li>Now edit the container (edit section by section and test rebuilding the container after every edited section)
  201. <ul>
  202. <li>Testing building the container (docker-compose build container-name) with no errors.</li>
  203. <li>Test it in a real App if possible.</li>
  204. </ul></li>
  205. </ul>
  206. <h3 id="2-submitting-a-pr">2. Submitting a PR</h3>
  207. <p>Consider the following guidelines:</p>
  208. <ul>
  209. <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>
  210. <li><p>Make your changes in a new git branch:</p>
  211. <pre><code class="language-shell"> git checkout -b my-fix-branch master
  212. </code></pre></li>
  213. <li><p>Commit your changes using a descriptive commit message.</p></li>
  214. <li><p>Push your branch to GitHub:</p>
  215. <pre><code class="language-shell">git push origin my-fix-branch
  216. </code></pre></li>
  217. <li><p>In GitHub, send a pull request to <code>laradock:master</code>.</p></li>
  218. <li><p>If we suggest changes then:</p>
  219. <ul>
  220. <li>Make the required updates.</li>
  221. <li>Commit your changes to your branch (e.g. <code>my-fix-branch</code>).</li>
  222. <li>Push the changes to your GitHub repository (this will update your Pull Request).</li>
  223. </ul></li>
  224. </ul>
  225. <blockquote>
  226. <p>If the PR gets too outdated we may ask you to rebase and force push to update the PR:</p>
  227. </blockquote>
  228. <pre><code class="language-shell">git rebase master -i
  229. git push origin my-fix-branch -f
  230. </code></pre>
  231. <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>
  232. <h3 id="3-after-your-pr-is-merged">3. After your PR is merged</h3>
  233. <p>After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:</p>
  234. <ul>
  235. <li><p>Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:</p>
  236. <pre><code class="language-shell">git push origin --delete my-fix-branch
  237. </code></pre></li>
  238. <li><p>Check out the master branch:</p>
  239. <pre><code class="language-shell">git checkout master -f
  240. </code></pre></li>
  241. <li><p>Delete the local branch:</p>
  242. <pre><code class="language-shell">git branch -D my-fix-branch
  243. </code></pre></li>
  244. <li><p>Update your master with the latest upstream version:</p>
  245. <pre><code class="language-shell">git pull --ff upstream master
  246. </code></pre></li>
  247. </ul>
  248. <p><br></p>
  249. <h4 id="happy-coding">Happy Coding :)</h4>
  250. <aside class="copyright" role="note">
  251. Documentation built with
  252. <a href="https://www.gohugo.io" target="_blank">Hugo</a>
  253. using the
  254. <a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme.
  255. </aside>
  256. <footer class="footer">
  257. <nav class="pagination" aria-label="Footer">
  258. <div class="previous">
  259. <a href="http://laradock.io/help/" title="Help &amp; Questions">
  260. <span class="direction">
  261. Previous
  262. </span>
  263. <div class="page">
  264. <div class="button button-previous" role="button" aria-label="Previous">
  265. <i class="icon icon-back"></i>
  266. </div>
  267. <div class="stretch">
  268. <div class="title">
  269. Help &amp; Questions
  270. </div>
  271. </div>
  272. </div>
  273. </a>
  274. </div>
  275. <div class="next">
  276. <a href="http://laradock.io/license/" title="License">
  277. <span class="direction">
  278. Next
  279. </span>
  280. <div class="page">
  281. <div class="stretch">
  282. <div class="title">
  283. License
  284. </div>
  285. </div>
  286. <div class="button button-next" role="button" aria-label="Next">
  287. <i class="icon icon-forward"></i>
  288. </div>
  289. </div>
  290. </a>
  291. </div>
  292. </nav>
  293. </footer>
  294. </div>
  295. </article>
  296. <div class="results" role="status" aria-live="polite">
  297. <div class="scrollable">
  298. <div class="wrapper">
  299. <div class="meta"></div>
  300. <div class="list"></div>
  301. </div>
  302. </div>
  303. </div>
  304. </main>
  305. <script>
  306. var base_url = '';
  307. var repo_id = '';
  308. </script>
  309. <script src="http://laradock.io/javascripts/application.js"></script>
  310. <script>
  311. /* Add headers to scrollspy */
  312. var headers = document.getElementsByTagName("h2");
  313. var scrollspy = document.getElementById('scrollspy');
  314. if(scrollspy) {
  315. if(headers.length > 0) {
  316. for(var i = 0; i < headers.length; i++) {
  317. var li = document.createElement("li");
  318. li.setAttribute("class", "anchor");
  319. var a = document.createElement("a");
  320. a.setAttribute("href", "#" + headers[i].id);
  321. a.setAttribute("title", headers[i].innerHTML);
  322. a.innerHTML = headers[i].innerHTML;
  323. li.appendChild(a)
  324. scrollspy.appendChild(li);
  325. }
  326. } else {
  327. scrollspy.parentElement.removeChild(scrollspy)
  328. }
  329. /* Add permanent link next to the headers */
  330. var headers = document.querySelectorAll("h1, h2, h3, h4, h5, h6");
  331. for(var i = 0; i < headers.length; i++) {
  332. var a = document.createElement("a");
  333. a.setAttribute("class", "headerlink");
  334. a.setAttribute("href", "#" + headers[i].id);
  335. a.setAttribute("title", "Permanent link")
  336. a.innerHTML = "#";
  337. headers[i].appendChild(a);
  338. }
  339. }
  340. </script>
  341. <script>
  342. (function(i,s,o,g,r,a,m){
  343. i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||
  344. []).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  345. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;
  346. m.parentNode.insertBefore(a,m)
  347. })(window, document,
  348. 'script', '//www.google-analytics.com/analytics.js', 'ga');
  349. ga('create', 'UA-37514928-9', 'auto');
  350. ga('set', 'anonymizeIp', true);
  351. ga('send', 'pageview');
  352. var buttons = document.querySelectorAll('a');
  353. Array.prototype.map.call(buttons, function(item) {
  354. if (item.host != document.location.host) {
  355. item.addEventListener('click', function() {
  356. var action = item.getAttribute('data-action') || 'follow';
  357. ga('send', 'event', 'outbound', action, item.href);
  358. });
  359. }
  360. });
  361. var query = document.querySelector('.query');
  362. query.addEventListener('blur', function() {
  363. if (this.value) {
  364. var path = document.location.pathname;
  365. ga('send', 'pageview', path + '?q=' + this.value);
  366. }
  367. });
  368. </script>
  369. <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js"></script>
  370. <script>hljs.initHighlightingOnLoad();</script>
  371. </body>
  372. </html>