update documentation, change travis to only deploy on master
This commit is contained in:
parent
8495a59e36
commit
d66fad8b43
3 changed files with 24 additions and 28 deletions
25
.github/CONTRIBUTING.md
vendored
25
.github/CONTRIBUTING.md
vendored
|
@ -14,11 +14,11 @@ Here are links to all the sections in this document:
|
||||||
- [Creating a Pull request](#creating-a-pull-request)
|
- [Creating a Pull request](#creating-a-pull-request)
|
||||||
- - [Tips](#tips)
|
- - [Tips](#tips)
|
||||||
|
|
||||||
# Code of Conduct
|
## Code of Conduct
|
||||||
|
|
||||||
Please follow the guidelines mentioned at [CODE OF CONDUCT.md](https://github.com/processing/p5.js-web-editor/blob/master/CODE_OF_CONDUCT.md#p5js-code-of-conduct).
|
Please follow the guidelines mentioned at [CODE OF CONDUCT.md](https://github.com/processing/p5.js-web-editor/blob/master/CODE_OF_CONDUCT.md#p5js-code-of-conduct).
|
||||||
|
|
||||||
# How Can I Contribute?
|
## How Can I Contribute?
|
||||||
|
|
||||||
### First Timers
|
### First Timers
|
||||||
For first-time contributors or those who want to start with a small task: [check out our list of good first bugs](https://github.com/processing/p5.js-web-editor/labels/good%20first%20issue). First read the github discussion on that issue and find out if there's currently a person working on that or not. If no one is working on it or if there has was one claimed to but has not been active for a while, ask if it is up for grabs. It's okay to not know how to fix an issue and feel free to ask questions about to approach the problem! We are all just here to learn and make something awesome. Someone from the community would help you out and these are great issues for learning about the web editor, its file structure and its development process.
|
For first-time contributors or those who want to start with a small task: [check out our list of good first bugs](https://github.com/processing/p5.js-web-editor/labels/good%20first%20issue). First read the github discussion on that issue and find out if there's currently a person working on that or not. If no one is working on it or if there has was one claimed to but has not been active for a while, ask if it is up for grabs. It's okay to not know how to fix an issue and feel free to ask questions about to approach the problem! We are all just here to learn and make something awesome. Someone from the community would help you out and these are great issues for learning about the web editor, its file structure and its development process.
|
||||||
|
@ -30,31 +30,14 @@ If you're already familiar with the project or would like take on something a li
|
||||||
If you want to work on building new things, please take a look at [type: feature](https://github.com/processing/p5.js-web-editor/labels/type%3Afeature).
|
If you want to work on building new things, please take a look at [type: feature](https://github.com/processing/p5.js-web-editor/labels/type%3Afeature).
|
||||||
|
|
||||||
If you'd like to work on a bug, please comment on it to let the maintainers know.
|
If you'd like to work on a bug, please comment on it to let the maintainers know.
|
||||||
If someone else has already commented and taken up that bug, please refrain from working on it and submitting
|
If someone else has already commented and taken up that bug, please refrain from working on it and submitting a PR without asking the maintainers as it leads to unnecessary duplication of effort.
|
||||||
a PR without asking the maintainers as it leads to unnecessary duplication of effort.
|
|
||||||
|
|
||||||
### Contribution guides
|
### Contribution guides
|
||||||
|
|
||||||
* [https://guides.github.com/activities/hello-world/](https://guides.github.com/activities/hello-world/)
|
* [https://guides.github.com/activities/hello-world/](https://guides.github.com/activities/hello-world/)
|
||||||
* [https://guides.github.com/activities/forking/](https://guides.github.com/activities/forking/)
|
* [https://guides.github.com/activities/forking/](https://guides.github.com/activities/forking/)
|
||||||
|
|
||||||
# Creating a pull request
|
## Writing commit messages
|
||||||
|
|
||||||
Set up a new remote that points to the original project so that you can update your local repository once any changes have made to remote.
|
|
||||||
|
|
||||||
$ git remote add upstream https://github.com/processing/p5.js-web-editor
|
|
||||||
|
|
||||||
and also before you submit a [pull request](https://help.github.com/articles/creating-a-pull-request/), please remember to fetch the changes using:
|
|
||||||
|
|
||||||
$ git fetch upstream
|
|
||||||
|
|
||||||
When you create a pull request for a new fix or feature, be sure to mention the issue number for what you're working on. The best way to do it is to mention the issue like this at the top of your description:
|
|
||||||
|
|
||||||
Fixes #333
|
|
||||||
|
|
||||||
The issue number in this case is "333." The word *Fixes* is magical; GitHub will automatically close the issue when your pull request is merged.
|
|
||||||
|
|
||||||
# Writing commit messages
|
|
||||||
|
|
||||||
Good commit messages serve at least three important purposes:
|
Good commit messages serve at least three important purposes:
|
||||||
|
|
||||||
|
|
|
@ -28,11 +28,6 @@ before_deploy:
|
||||||
- gcloud --quiet components update kubectl
|
- gcloud --quiet components update kubectl
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
- provider: script
|
|
||||||
script: ./deploy.sh
|
|
||||||
skip_cleanup: true
|
|
||||||
on:
|
|
||||||
branch: production-docker
|
|
||||||
- provider: script
|
- provider: script
|
||||||
script: ./deploy.sh
|
script: ./deploy.sh
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# Deployment
|
# Deployment
|
||||||
|
|
||||||
|
This document contains information about how to deploy to production, all of the different platforms and tools, and how to configure them.
|
||||||
|
|
||||||
WIP.
|
WIP.
|
||||||
* Production Setup/Installation
|
* Production Setup/Installation
|
||||||
* Travis
|
* Travis
|
||||||
|
@ -11,12 +13,28 @@ WIP.
|
||||||
* DNS/Dreamhost
|
* DNS/Dreamhost
|
||||||
* mLab
|
* mLab
|
||||||
|
|
||||||
|
## Deployment Process
|
||||||
|
|
||||||
|
These are the steps that happen when you deploy the application.
|
||||||
|
|
||||||
|
1. Push to `master` branch, or merge in a pull request to the `master` branch.
|
||||||
|
2. This triggers a build on [Travis CI](https://travis-ci.org/processing/p5.js-web-editor).
|
||||||
|
3. Travis CI builds a (development) Docker image of the whole application.
|
||||||
|
4. Travis CI runs some tests, which in this case, is just `npm run lint`. This could be updated in the future to include more extensive tests. If the tests fail, the build stops here.
|
||||||
|
5. If the tests pass, then Travis CI builds a (production) Docker image of the whole application.
|
||||||
|
6. This image is pushed to [Docker Hub](https://hub.docker.com/r/catarak/p5.js-web-editor/) with a unique tag name (the Travis commit) and also to the `latest` tag.
|
||||||
|
7. The Kubernetes deployment is updated to image just pushed to Docker Hub on the cluster on Google Kubernetes Engine.
|
||||||
|
|
||||||
## Production Installation
|
## Production Installation
|
||||||
|
|
||||||
|
You'll only need to do this if you're testing the production environment locally.
|
||||||
|
|
||||||
1. Clone this repository and `cd` into it
|
1. Clone this repository and `cd` into it
|
||||||
2. `$ npm install`
|
2. `$ npm install`
|
||||||
3. Install MongoDB and make sure it is running
|
3. Install MongoDB and make sure it is running
|
||||||
4. `$ cp .env.example .env`
|
4. `$ cp .env.example .env`
|
||||||
5. (NOT Optional) edit `.env` and fill in all necessart values.
|
5. (NOT Optional) edit `.env` and fill in all necessary values.
|
||||||
6. `$ npm run fetch-examples` - this downloads the example sketches into a user called 'p5'
|
6. `$ npm run fetch-examples` - this downloads the example sketches into a user called 'p5'
|
||||||
7. `$ npm run build`
|
7. `$ npm run build`
|
||||||
8. `$ npm run start:prod`
|
8. Since production assumes your environment variables are in the shell environment, and not in a `.env` file, you will have to run `export $(grep -v '^#' .env | xargs)` or a similar command, see this [Stack Overflow answer](https://stackoverflow.com/a/20909045/4086967).
|
||||||
|
9. `$ npm run start:prod`
|
||||||
|
|
Loading…
Reference in a new issue