blackbirdchess-docker-dev/DOCUMENTATION/_settings/content/contributing/index.md

165 lines
5.4 KiB
Markdown
Raw Normal View History

---
title: Contributing
type: index
2017-02-22 21:58:06 +01:00
weight: 6
---
Your contribution is more than welcome.
2017-03-17 08:36:00 +01:00
## I have a Question/Problem
2017-03-17 08:36:00 +01:00
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.
2017-03-17 08:36:00 +01:00
## 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).
2017-03-17 08:36:00 +01:00
**Steps to do before opening an Issue:**
2017-03-17 08:36:00 +01:00
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).
2017-03-17 08:36:00 +01:00
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.*
## 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)
2017-02-22 22:17:15 +01:00
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.
2017-03-17 08:36:00 +01:00
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, run the `hugo` command to generate the HTML docs (in the `/docs`).
2017-02-22 22:17:15 +01:00
2017-03-17 08:36:00 +01:00
### To Host the website locally
Go to `DOCUMENTATION/_settings` in your terminal and run `hugo serve` to host the website locally.
2017-02-22 22:17:15 +01:00
2017-03-17 08:36:00 +01:00
### 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`.
2017-02-22 22:17:15 +01:00
2017-03-17 08:36:00 +01:00
## How to support new Software (Add new Container)
* Create folder with the software name.
* Add a `Dockerfile`, write your code there.
* You may add additional files in the software folder.
* Add the software to the `docker-compose.yml` file.
* Make sure you follow our commenting style.
2017-03-17 08:36:00 +01:00
* Add the software in the `Documentation`.
2017-03-17 08:36:00 +01:00
## 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,
2017-03-17 08:36:00 +01:00
you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the Laradock repository.
2017-03-17 08:36:00 +01:00
* Make sure to update the `Documentation` in case you made any changes.
2017-03-17 08:36:00 +01:00
## Pull Request
2017-03-17 08:36:00 +01:00
### 1. Before Submitting a Pull Request (PR)
Always Test everything and make sure its working:
- Pull the latest updates (or fork of you dont have permission)
- Before editing anything:
- Test building the container (docker-compose build --no-cache container-name) build with no cache first.
- 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.
2017-03-17 08:36:00 +01:00
- Test it in a real App if possible.
2017-03-17 08:36:00 +01:00
### 2. Submitting a PR
Consider the following guidelines:
2017-03-17 08:36:00 +01:00
* 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:
```shell
git checkout -b my-fix-branch master
```
* Commit your changes using a descriptive commit message.
* Push your branch to GitHub:
```shell
git push origin my-fix-branch
```
* In GitHub, send a pull request to `laradock:master`.
* If we suggest changes then:
* Make the required updates.
* Commit your changes to your branch (e.g. `my-fix-branch`).
* Push the changes to your GitHub repository (this will update your Pull Request).
> If the PR gets too outdated we may ask you to rebase and force push to update the PR:
```shell
git rebase master -i
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.*
2017-03-17 08:36:00 +01:00
### 3. After your PR is merged
2017-03-17 08:36:00 +01:00
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:
```shell
git push origin --delete my-fix-branch
```
* Check out the master branch:
```shell
git checkout master -f
```
* Delete the local branch:
```shell
git branch -D my-fix-branch
```
* Update your master with the latest upstream version:
```shell
git pull --ff upstream master
```
<br>
2017-03-17 08:36:00 +01:00
#### Happy Coding :)