|
| 1 | + |
| 2 | + |
| 3 | +# Contributing |
| 4 | + |
| 5 | +Hey, thanks for your interest in contributing to Dokploy CLI! We appreciate your help and taking your time to contribute. |
| 6 | + |
| 7 | + |
| 8 | +Before you start, please first discuss the feature/bug you want to add with the owners and comunity via github issues. |
| 9 | + |
| 10 | +We have a few guidelines to follow when contributing to this project: |
| 11 | + |
| 12 | +- [Commit Convention](#commit-convention) |
| 13 | +- [Setup](#setup) |
| 14 | +- [Development](#development) |
| 15 | +- [Build](#build) |
| 16 | +- [Pull Request](#pull-request) |
| 17 | + |
| 18 | +## Commit Convention |
| 19 | + |
| 20 | +Before you craete a Pull Request, please make sure your commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. |
| 21 | + |
| 22 | +### Commit Message Format |
| 23 | +``` |
| 24 | +<type>[optional scope]: <description> |
| 25 | +
|
| 26 | +[optional body] |
| 27 | +
|
| 28 | +[optional footer(s)] |
| 29 | +``` |
| 30 | + |
| 31 | +#### Type |
| 32 | +Must be one of the following: |
| 33 | + |
| 34 | +* **feat**: A new feature |
| 35 | +* **fix**: A bug fix |
| 36 | +* **docs**: Documentation only changes |
| 37 | +* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
| 38 | +* **refactor**: A code change that neither fixes a bug nor adds a feature |
| 39 | +* **perf**: A code change that improves performance |
| 40 | +* **test**: Adding missing tests or correcting existing tests |
| 41 | +* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) |
| 42 | +* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) |
| 43 | +* **chore**: Other changes that don't modify `src` or `test` files |
| 44 | +* **revert**: Reverts a previous commit |
| 45 | + |
| 46 | +Example: |
| 47 | +``` |
| 48 | +feat: add new feature |
| 49 | +``` |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +## Setup |
| 55 | + |
| 56 | +Before you start, please make the clone based on the `main` branch. |
| 57 | + |
| 58 | +```bash |
| 59 | +git clone https://github.com/Dokploy/cli.git |
| 60 | +cd cli |
| 61 | +pnpm install |
| 62 | +``` |
| 63 | + |
| 64 | +## Development |
| 65 | + |
| 66 | +First step is to authenticate, you can connect to a dokploy localhost or a remote dokploy server. |
| 67 | + |
| 68 | +Authenticate |
| 69 | + |
| 70 | +```bash |
| 71 | +./bin/dev.js authenticate |
| 72 | +``` |
| 73 | + |
| 74 | +Let's take the example to create a new command for application called `start`. |
| 75 | + |
| 76 | +You can use the generators from OCLIF to create a new command. |
| 77 | + |
| 78 | +```bash |
| 79 | +oclif generate command application:start |
| 80 | +``` |
| 81 | + |
| 82 | +To run the command, you can use the following command: |
| 83 | + |
| 84 | +```bash |
| 85 | +./bin/dev.js application:start or ./bin/dev.js start |
| 86 | +``` |
| 87 | + |
| 88 | +## Build |
| 89 | + |
| 90 | +```bash |
| 91 | +pnpm run build |
| 92 | +``` |
| 93 | + |
| 94 | +## Publish |
| 95 | + |
| 96 | +```bash |
| 97 | +pnpm run publish |
| 98 | +``` |
| 99 | + |
| 100 | + |
| 101 | +## Pull Request |
| 102 | + |
| 103 | +- The `main` branch is the source of truth and should always reflect the latest stable release. |
| 104 | +- Create a new branch for each feature or bug fix. |
| 105 | +- Make sure to add tests for your changes. |
| 106 | +- Make sure to update the documentation for any changes Go to the [docs.dokploy.com](https://docs.dokploy.com) website to see the changes. |
| 107 | +- When creating a pull request, please provide a clear and concise description of the changes made. |
| 108 | +- If you include a video or screenshot, would be awesome so we can see the changes in action. |
| 109 | +- If your pull request fixes an open issue, please reference the issue in the pull request description. |
| 110 | +- Once your pull request is merged, you will be automatically added as a contributor to the project. |
| 111 | + |
| 112 | +Thank you for your contribution! |
| 113 | + |
0 commit comments