Skip to content

Commit 6fdcb8b

Browse files
committed
Added Postman collcetion
1 parent abda4c0 commit 6fdcb8b

File tree

2 files changed

+907
-25
lines changed

2 files changed

+907
-25
lines changed

CONTRIBUTING.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ Please note we have a code of conduct, please follow it in all your interactions
77

88
## IMPORTANT: CapRover Goals & Scope
99

10-
Since the birth of CapRover, there has been many contributions and suggestions that shaped CapRover as we know it today. One of the very important factor in the contribution you make is to stick with CapRover design philosophy.- CapRover is not an enterprise grade application like Kubernetes. *Do not* patch it with half-done features that make it look like one - it will eventually fail as we don't have resources to support such features.- CapRover scope is a helper around Docker, nginx and Let's Encrypt.
10+
Since the birth of CapRover, there has been many contributions and suggestions that shaped CapRover as we know it today. One of the very important factor in the contribution you make is to stick with CapRover design philosophy.- CapRover is not an enterprise grade application like Kubernetes. _Do not_ patch it with half-done features that make it look like one - it will eventually fail as we don't have resources to support such features.- CapRover scope is a helper around Docker, nginx and Let's Encrypt.
1111

1212
The goal is to make the common use-cases exposed via simple controls on UI while allowing further customizations to be done through hooks and scripts. If a new feature is doable via the existing features, or a basic tool, do not add it to CapRover. We do not want to bloat this application. One example is: "Add a flag to customize the placement constraints of containers". This is definitely doable in Docker, but we don't want to mirror every single functionality of Docker to CapRover. If we do that, CapRover becomes a very hard to maintain project. Instead we should add customization hooks for these advanced and rare use cases. For example, instead of mirroring every single nginx config, we added the ability of customizing the nginx config for advanced users.- Last but not least AVOID LARGE PULL REQUESTS at all cost as they won't get reviewed unless they are discussed in the Slack channel beforehand.
1313

1414
## Pull Request Process
1515

16-
1. IF APPLICABLE: Update the docs (https://github.com/caprover/caprover-website) with details of changes to the interface, this includes new environment
16+
1. IF APPLICABLE: Update the docs (https://github.com/caprover/caprover-website) with details of changes to the interface, this includes new environment
1717
variables, exposed ports, useful file locations and container parameters.
1818
2. Make sure your commit comments are self explanatory.
1919
3. Discuss the changes you want to make beforehand.
2020
4. Please avoid making opinion-based changes if it's just a code-style change - this includes, but not limited to, changes to how we work with promises, class inheritence and etc.
2121
5. To keep the process simple with just a few contributors, development happens directly on the master branch
2222
and releases will be deployed on the same branch.
2323
6. By creating a Pull Request, you agree to all terms in https://github.com/caprover/caprover/blob/master/contrib.md
24-
25-
## Running dev environment
24+
25+
### Running backend dev environment
2626

2727
First, you need a Captain instance running in debug mode, this can be a remote server, a VM on your local machine,
2828
or your local machine itself. Needless to say, Docker is required (same minimum version as mentioned in README). Ubuntu is the best dev environment for CapRover.
2929

30-
> Docker for Mac users: You need to add `/captain` to shared paths.
30+
> Docker for Mac users: You need to add `/captain` to shared paths.
3131
> To do so, click on the Docker icon -> Preferences -> File Sharing and add `/captain`
3232
> This is not possible in Catalina or above versions. You can try your luck by changing `CAPTAIN_BASE_DIRECTORY` in `src/utils/CaptainConstants.ts` and in `dev-scripts/dev-clean-run-as-dev.sh` but it might be best to develop in a linux VM for best results.
3333
@@ -38,18 +38,21 @@ $ npm install
3838
$ npm run build
3939
$ ./dev-scripts/dev-clean-run-as-dev.sh
4040
```
41+
4142
You are good to go! You can run the following line to see the logs for the back-end service.
4243

4344
```bash
4445
npm run dev
4546
```
47+
4648
The main differences between the release and debug mode are:
47-
- docker image is created from the local source file, instead of getting pulled from Docker hub
48-
- security is much weaker is debug due to a static salt
49-
- self health monitoring is disabled in debug so that we can see possible crashes
50-
- same origin policy is disabled in debug mode to make front end development easier
51-
- an additional endpoint is available at `/force-exit` which force restarts the backend service
52-
- static resources (including front end app) are not being served in debug build.
49+
50+
- docker image is created from the local source file, instead of getting pulled from Docker hub
51+
- security is much weaker is debug due to a static salt
52+
- self health monitoring is disabled in debug so that we can see possible crashes
53+
- same origin policy is disabled in debug mode to make front end development easier
54+
- an additional endpoint is available at `/force-exit` which force restarts the backend service
55+
- static resources (including front end app) are not being served in debug build.
5356

5457
Captain by default uses `captain.localhost` as its root domain. It's not always needed, but if you need a root
5558
domain for your development, you can simply run a local DNS server on your local machine and point
@@ -61,22 +64,25 @@ And add this line to it: `address=/captain.localhost/192.168.1.2` where `192.168
6164
To make sure you have dnsmasq, you can run `which dnsmasq` on your terminal, if it's available,
6265
path of it will be printed on the terminal, otherwise, there won't be anything printed on your terminal.
6366

67+
To test the API, you can import the Postman collection JSON in `./dev-scripts` directory.
6468

6569
### front end development:
70+
6671
See https://github.com/caprover/caprover-frontend
6772

6873
### CLI development:
6974

7075
See https://github.com/caprover/caprover-cli
7176

7277
### Backend development:
78+
7379
Start the debug build for the backend service as explained above. To see any changes you make,
7480
first save the changes, then you need to restart the service either by sending a request to `/force-exit` endpoint,
7581
or by running `npm run dev`.
7682

7783
### Security Issues
78-
Security issues are high priority and they will be addressed immediately. If you find a security issue, please do not post as a public issue, instead, please email it to us: security at caprover dot com.
7984

85+
Security issues are high priority and they will be addressed immediately. If you find a security issue, please do not post as a public issue, instead, please email it to us: security at caprover dot com.
8086

8187
## Code of Conduct
8288

@@ -94,22 +100,22 @@ orientation.
94100
Examples of behavior that contributes to creating a positive environment
95101
include:
96102

97-
* Using welcoming and inclusive language
98-
* Being respectful of differing viewpoints and experiences
99-
* Gracefully accepting constructive criticism
100-
* Focusing on what is best for the community
101-
* Showing empathy towards other community members
103+
- Using welcoming and inclusive language
104+
- Being respectful of differing viewpoints and experiences
105+
- Gracefully accepting constructive criticism
106+
- Focusing on what is best for the community
107+
- Showing empathy towards other community members
102108

103109
Examples of unacceptable behavior by participants include:
104110

105-
* The use of sexualized language or imagery and unwelcome sexual attention or
106-
advances
107-
* Trolling, insulting/derogatory comments, and personal or political attacks
108-
* Public or private harassment
109-
* Publishing others' private information, such as a physical or electronic
110-
address, without explicit permission
111-
* Other conduct which could reasonably be considered inappropriate in a
112-
professional setting
111+
- The use of sexualized language or imagery and unwelcome sexual attention or
112+
advances
113+
- Trolling, insulting/derogatory comments, and personal or political attacks
114+
- Public or private harassment
115+
- Publishing others' private information, such as a physical or electronic
116+
address, without explicit permission
117+
- Other conduct which could reasonably be considered inappropriate in a
118+
professional setting
113119

114120
### Our Responsibilities
115121

0 commit comments

Comments
 (0)