fix(docs): remove subfolders because we use relative linking (#39812)

* fix(docs): remove subfolders because we use relative linking

* fix(docs): links to chinese section should be direct
This commit is contained in:
Mrugesh Mohapatra
2020-10-08 22:46:44 +05:30
committed by GitHub
parent 94f0cf0ef8
commit 0fa965849e
36 changed files with 767 additions and 759 deletions

View File

@ -1,31 +1,34 @@
- **Getting Started**
- [Introduction](index 'Contribute to the freeCodeCamp.org Community')
- [Frequently Asked Questions](/FAQ.md)
- [Frequently Asked Questions](FAQ.md)
- **Code Contribution**
- - [Set up freeCodeCamp locally](/how-to-setup-freecodecamp-locally.md)
- [Open a pull request](/how-to-open-a-pull-request.md)
- [Work on coding challenges](/how-to-work-on-coding-challenges.md)
- [Work on video challenges](/how-to-help-with-video-challenges.md)
- [Work on the news theme](/how-to-work-on-the-news-theme.md)
- [Work on the docs theme](/how-to-work-on-the-docs-theme.md)
- - [Set up freeCodeCamp locally](how-to-setup-freecodecamp-locally.md)
- [Open a pull request](how-to-open-a-pull-request.md)
- [Work on coding challenges](how-to-work-on-coding-challenges.md)
- [Work on video challenges](how-to-help-with-video-challenges.md)
- [Work on the news theme](how-to-work-on-the-news-theme.md)
- [Work on the docs theme](how-to-work-on-the-docs-theme.md)
- **Optional Guides**
- [Catch outgoing emails locally](/how-to-catch-outgoing-emails-locally.md)
- [Set up freeCodeCamp on WSL](/how-to-setup-wsl.md)
- [Catch outgoing emails locally](how-to-catch-outgoing-emails-locally.md)
- [Set up freeCodeCamp on WSL](how-to-setup-wsl.md)
---
<!-- The section below should not use relative linking -->
- **中文社区贡献指南**
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/Chinese/news-author-application.md)
- [文章翻译计划](/i18n/Chinese/news-translations.md)
- [视频翻译计划](/i18n/Chinese/video-translations.md)
<!-- The section above should not use relative linking -->
---
- **Flight Manuals** (for Staff & Mods)
- [Moderator Handbook](/flight-manuals/moderator-handbook.md)
- [Reply Templates](/flight-manuals/using-reply-templates.md)
- [DevOps Overview](/devops.md)
- [Working on Servers](/flight-manuals/working-on-virtual-machines.md)
- [Moderator Handbook](moderator-handbook.md)
- [Reply Templates](moderator-handbook?id=using-reply-templates)
- [DevOps Handbook](devops.md)
---

View File

@ -1,10 +1,10 @@
# Developer Operations at freeCodeCamp.org
# DevOps Handbook
This guide will help you understand our infrastructure stack and how we maintain our platforms. While this guide does not have exhaustive details for all operations, it could be used as a reference for your understanding of the systems.
Let us know, if you have feedback or queries, and we will be happy to clarify.
## How do we build, test and deploy the codebase?
# Flight Manual - Code deployments
This repository is continuously built, tested and deployed to **separate sets of infrastructure (Servers, Databases, CDNs, etc.)**.
@ -47,7 +47,7 @@ The build pipeline goes on to trigger a corresponding release pipeline if it com
Status of builds and releases are [available here](#build-test-and-deployment-status).
## Triggering a build, test and deployment.
## Trigger a build, test and deploy
Currently, only members on the developer team can push to the production branches. The changes to the `production-*` branches can land only via fast-forward merge to the [`upstream`](https://github.com/freeCodeCamp/freeCodeCamp).
@ -234,3 +234,511 @@ There are some known limitations and tradeoffs when using the beta version of th
Please open fresh issues for discussions and reporting bugs. You can label them as **[`release: next/beta`](https://github.com/freeCodeCamp/freeCodeCamp/labels/release%3A%20next%2Fbeta)** for triage.
You may send an email to `dev[at]freecodecamp.org` if you have any queries. As always all security vulnerabilities should be reported to `security[at]freecodecamp.org` instead of the public tracker and forum.
# Flight Manual - Server Maintenance
> [!WARNING]
>
> 1. The guide applies to the **freeCodeCamp Staff members only**.
> 2. These instructions should not be considered exhaustive, please use caution.
As a member of the staff, you may have been given access to our cloud service providers like Azure, Digital Ocean, etc.
Here are some handy commands that you can use to work on the Virtual Machines (VM), for instance performing maintenance updates or doing general houeskeeping.
## Get a list of the VMs
> [!NOTE] While you may already have SSH access to the VMs, that alone will not
> let you list VMs unless you been granted access to the cloud portals as well.
### Azure
Install Azure CLI `az`: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
> **(One-time) Install on macOS with [`homebrew`](https://brew.sh):**
```
brew install azure-cli
```
> **(One-time) Login:**
```
az login
```
> **Get the list of VM names and P addresses:**
```
az vm list-ip-addresses --output table
```
### Digital Ocean
Install Digital Ocean CLI `doctl`:
https://github.com/digitalocean/doctl#installing-doctl
> **(One-time) Install on macOS with [`homebrew`](https://brew.sh):**
```
brew install doctl
```
> **(One-time) Login:**
Authentication and context switching:
https://github.com/digitalocean/doctl#authenticating-with-digitalocean
```
doctl auth init
```
> **Get the list of VM names and IP addresses:**
```
doctl compute droplet list --format "ID,Name,PublicIPv4"
```
## Spin a VM (or VM Scale Set)
> Todo: Add instructions for spinning VM(s)
<!--
The below instructions are stale.
### 0. Prerequisites (workspace Setup) for Staff
Get a login session on `azure cli`, and clone the
[`infra`](https://github.com/freeCodeCamp/infra) for setting up template
workspace.
```console
az login
git clone https://github.com/freeCodeCamp/infra
cd infra
```
Use the Scratchpad subdirectory for temporary files, and making one-off edits.
The contents in this subdirectory are intentionally ignored from source control.
### 1. Provision VMs on Azure.
List all Resource Groups
```console
az group list --output table
```
```console
Name Location Status
--------------------------------- ------------- ---------
tools-rg eastus Succeeded
```
Create a Resource Group
```
az group create --location eastus --name stg-rg
```
```console
az group list --output table
```
```console
Name Location Status
--------------------------------- ------------- ---------
tools-rg eastus Succeeded
stg-rg eastus Succeeded
```
Next per the need, provision a single VM or a scaleset.
#### A. provision single instances
```console
az vm create \
--resource-group stg-rg-eastus \
--name <VIRTUAL_MACHINE_NAME> \
--image UbuntuLTS \
--size <VIRTUAL_MACHINE_SKU>
--custom-data cloud-init/nginx-cloud-init.yaml \
--admin-username <USERNAME> \
--ssh-key-values <SSH_KEYS>.pub
```
#### B. provision scaleset instance
```console
az vmss create \
--resource-group stg-rg-eastus \
--name <VIRTUAL_MACHINE_SCALESET_NAME> \
--image UbuntuLTS \
--size <VIRTUAL_MACHINE_SKU>
--upgrade-policy-mode automatic \
--custom-data cloud-init/nginx-cloud-init.yaml \
--admin-username <USERNAME> \
--ssh-key-values <SSH_KEYS>.pub
```
> [!NOTE]
>
> - The custom-data config should allow you to configure and add SSH keys,
> install packages etc. via the `cloud-init` templates in your local
> workspace. Tweak the files in your local workspace as needed. The cloud-init
> config is optional and you can omit it completely to do setups manually as
> well.
>
> - The virtual machine SKU is something like: **Standard_B2s** which can be
> retrived by executing something like
> `az vm list-sizes -l eastus --output table` or checking the Azure portal
> pricing.
-->
## Keep VMs updated
You should keep the VMs up to date by performing updates and upgrades. This will
ensure that the virtual machine is patched with latest security fixes.
> [!WARNING] Before you run these commands:
>
> - Make sure that the VM has been provisioned completely and there is no
> post-install steps running.
> - If you are updating packages on a VM that is already serving an application,
> make sure the app has been stopped / saved. Package updates will cause
> network bandwidth, memory and/or CPU usage spikes leading to outages on
> running applications.
Update package information
```console
sudo apt update
```
Upgrade installed packages
```console
sudo apt upgrade -y
```
Cleanup unused packages
```console
sudo apt autoremove -y
```
## Work on Web Servers (Proxy)
We are running load balanced (Azure Load Balancer) instances for our web
servers. These servers are running NGINX which reverse proxy all of the traffic
to freeCodeCamp.org from various applications running on their own
infrastructures.
The NGINX config is available on
[this repository](https://github.com/freeCodeCamp/nginx-config).
### First Install
Provisioning VMs with the Code
#### 1. (Optional) Install NGINX and configure from repository.
The basic setup should be ready OOTB, via the cloud-init configuration. SSH and
make changes as necessary for the particular instance(s).
If you did not use the cloud-init config previously use the below for manual
setup of NGINX and error pages:
```console
sudo su
cd /var/www/html
git clone https://github.com/freeCodeCamp/error-pages
cd /etc/
rm -rf nginx
git clone https://github.com/freeCodeCamp/nginx-config nginx
cd /etc/nginx
```
#### 2. Install Cloudflare origin certificates and upstream application config.
Get the Cloudflare origin certificates from the secure storage and install at
required locations.
**OR**
Move over existing certificates:
```console
# Local
scp -r username@source-server-public-ip:/etc/nginx/ssl ./
scp -pr ./ssl username@target-server-public-ip:/tmp/
# Remote
rm -rf ./ssl
mv /tmp/ssl ./
```
Update Upstream Configurations:
```console
vi configs/upstreams.conf
```
Add/update the source/origin application IP addresses.
#### 3. Setup networking and firewalls.
Configure Azure firewalls and `ufw` as needed for ingress origin addresses.
#### 4. Add the VM to the load balancer backend pool.
Configure and add rules to load balancer if needed. You may also need to add the
VMs to load balancer backend pool if needed.
### Logging and Monitoring
1. Check status for NGINX service using the below command:
```console
sudo systemctl status nginx
```
2. Logging and monitoring for the servers are available at:
> <h3 align="center"><a href='https://amplify.nginx.com' _target='blank'>https://amplify.nginx.com</a></h3>
### Updating Instances (Maintenance)
Config changes to our NGINX instances are maintained on GitHub, these should be
deployed on each instance like so:
1. SSH into the instance and enter sudo
```console
sudo su
```
2. Get the latest config code.
```console
cd /etc/nginx
git fetch --all --prune
git reset --hard origin/master
```
3. Test and reload the config
[with Signals](https://docs.nginx.com/nginx/admin-guide/basic-functionality/runtime-control/#controlling-nginx).
```console
nginx -t
nginx -s reload
```
## Work on API Instances
1. Install build tools for node binaries (`node-gyp`) etc.
```console
sudo apt install build-essential
```
### First Install
Provisioning VMs with the Code
1. Install Node LTS.
2. Update `npm` and install PM2 and setup logrotate and startup on boot
```console
npm i -g npm
npm i -g pm2
pm2 install pm2-logrotate
pm2 startup
```
3. Clone freeCodeCamp, setup env and keys.
```console
git clone https://github.com/freeCodeCamp/freeCodeCamp.git
cd freeCodeCamp
git checkout production-current # or any other branch to be deployed
```
4. Create the `.env` from the secure credentials storage.
5. Create the `google-credentials.json` from the secure credentials storage.
6. Install dependencies
```console
npm ci
```
7. Build the server
```console
npm run ensure-env && npm run build:server
```
8. Start Instances
```console
cd api-server
pm2 start production-start.js -i max --max-memory-restart 600M --name org
```
### Logging and Monitoring
```console
pm2 logs
```
```console
pm2 monit
```
### Updating Instances (Maintenance)
Code changes need to be deployed to the API instances from time to time. It can
be a rolling update or a manual update. The later is essential when changing
dependencies or adding enviroment variables.
> [!DANGER] The automated pipelines are not handling dependencies updates at the
> minute. We need to do a manual update before any deployment pipeline runs.
#### 1. Manual Updates - Used for updating dependencies, env variables.
1. Stop all instances
```console
pm2 stop all
```
2. Install dependencies
```console
npm ci
```
3. Build the server
```console
npm run ensure-env && npm run build:server
```
4. Start Instances
```console
pm2 start all --update-env && pm2 logs
```
#### 2. Rolling updates - Used for logical changes to code.
```console
pm2 reload all --update-env && pm2 logs
```
> [!NOTE] We are handling rolling updates to code, logic, via pipelines. You
> should not need to run these commands. These are here for documentation.
## Work on Client Instances
1. Install build tools for node binaries (`node-gyp`) etc.
```console
sudo apt install build-essential
```
### First Install
Provisioning VMs with the Code
1. Install Node LTS.
2. Update `npm` and install PM2 and setup logrotate and startup on boot
```console
npm i -g npm
npm i -g pm2
npm install -g serve
pm2 install pm2-logrotate
pm2 startup
```
3. Clone client config, setup env and keys.
```console
git clone https://github.com/freeCodeCamp/client-config.git client
cd client
```
```console
git clone https://github.com/freeCodeCamp/client-config.git client
cd client
```
Start placeholder instances for the web client, these will be updated with
artifacts from the Azure pipline.
> Todo: This setup needs to move to S3 or Azure Blob storage
```console
echo "serve -c ../../serve.json www -p 50505" >> client-start-primary.sh
chmod +x client-start-primary.sh
pm2 delete client-primary
pm2 start ./client-start-primary.sh --name client-primary
echo "serve -c ../../serve.json www -p 52525" >> client-start-secondary.sh
chmod +x client-start-secondary.sh
pm2 delete client-secondary
pm2 start ./client-start-secondary.sh --name client-secondary
```
### Logging and Monitoring
```console
pm2 logs
```
```console
pm2 monit
```
### Updating Instances (Maintenance)
Code changes need to be deployed to the API instances from time to time. It can
be a rolling update or a manual update. The later is essential when changing
dependencies or adding enviroment variables.
> [!DANGER] The automated pipelines are not handling dependencies updates at the
> minute. We need to do a manual update before any deployment pipeline runs.
#### 1. Manual Updates - Used for updating dependencies, env variables.
1. Stop all instances
```console
pm2 stop all
```
2. Install or update dependencies
3. Start Instances
```console
pm2 start all --update-env && pm2 logs
```
#### 2. Rolling updates - Used for logical changes to code.
```console
pm2 reload all --update-env && pm2 logs
```
> [!NOTE] We are handling rolling updates to code, logic, via pipelines. You
> should not need to run these commands. These are here for documentation.

View File

@ -1,126 +0,0 @@
# Using Reply Templates
These are some of the standard reply templates that you may use while reviewing pull requests and triaging issues.
> You can make your own with GitHub's built-in [**Saved replies**](https://github.com/settings/replies/) feature or use the ones below.
### Thank you
```markdown
Thank you for your contribution to the page! 👍
We are happy to accept these changes and look forward to future contributions. 🎉
```
### Thank you and congrats
> For thanking and encouraging first-time contributors.
```markdown
Hi @username. Congrats on your first pull request (PR)! 🎉
Thank you for your contribution to the page! 👍
We are happy to accept these changes and look forward to future contributions. 📝
```
### Build Error
```markdown
Hey @username
We would love to be able to merge your changes but it looks like there is an error with the Travis CI build. ⚠️
Once you resolve these issues, We will be able to review your PR and merge it. 😊
---
> Feel free to reference the [Style guide for writing articles](https://github.com/freeCodeCamp/freeCodeCamp#article-title) for this repo on formatting an article correctly so your Travis CI build passes. ✅
>
> Also, it's good practice on GitHub to write a brief description of your changes when creating a PR. 📝
```
### Syncing Fork
> When PR is not up to date with the `master` branch.
``````markdown
Hey @username
We would love to be able to merge your changes but it looks like there is an error with the Travis CI build. ⚠️
```bash
Error: ENOTDIR: not a directory, open 'src/pages/java/data-abstraction/index.md'
```
This particular error was not caused by your file but was an old error caused by merging faulty code to the `master` branch. It has since been resolved.
To pass the build, you will have to sync the latest changes from the `master` branch of the `freeCodeCamp/freeCodeCamp` repo.
Using the command line, you can do this in three easy steps:
```bash
git remote add upstream git://github.com/freeCodeCamp/freeCodeCamp.git
git fetch upstream
git pull upstream master
```
If you're using a GUI, you can simply `Add a new remote...` and use the link `git://github.com/freeCodeCamp/freeCodeCamp.git` from above.
Once you sync your fork and pass the build, We will be able to review your PR and merge it. 😊
---
> Feel free to reference the [Syncing a Fork](https://help.github.com/articles/syncing-a-fork/) article on GitHub for more insight on how to keep your fork up-to-date with the upstream repository. 🔄
>
> Also, it's good practice on GitHub to write a brief description of your changes when creating a PR. 📝
``````
### Merge Conflicts
> When PR has merge conflicts that need to be resolved.¹
```markdown
Hey @username
We would love to be able to merge your changes but it looks like you have some merge conflicts. ⚠️
Once you resolve these conflicts, We will be able to review your PR and merge it. 😊
---
> If you're not familiar with the merge conflict process, feel free to look over GitHub's guide on ["Resolving a merge conflict"](https://help.github.com/articles/resolving-a-merge-conflict-on-github/). 🔍️
>
> Also, it's good practice on GitHub to write a brief description of your changes when creating a PR. 📝
```
¹ If a first-time-contributor has a merge conflict, maintainers will resolve the conflict for them.
### Duplicate
> When PR is repetitive or a duplicate.
```markdown
Hey @username
It seems that similar changes have already been accepted earlier for this article you are editing, sorry about that. 😓
If you feel you have more to add, please feel free to open up a new PR.
Thanks again! 😊
---
> If you have any questions, feel free to reach out through [Gitter](https://gitter.im/FreeCodeCamp/Contributors) or by commenting below. 💬
```
### Closing invalid pull requests
> When PR is invalid.
```markdown
Hey @username
You have not added any content, We will be closing this PR and marking it as `invalid`. 😓️
Feel free to open another PR though! 👍
```

View File

@ -1,505 +0,0 @@
# Flight Manual for working on Virtual Machines
As a member of the staff or the dev-team, you may have been given access to our
cloud service providers like Azure, Digital Ocean, etc.
Here are some handy commands that you can use to work on the Virtual Machines
(VM), for instance performing maintenance updates or doing general houeskeeping.
# Get a list of the VMs
> [!NOTE] While you may already have SSH access to the VMs, that alone will not
> let you list VMs unless you been granted access to the cloud portals as well.
## Azure
Install Azure CLI `az`:
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
> **(One-time) Install on macOS with [`homebrew`](https://brew.sh):**
```
brew install azure-cli
```
> **(One-time) Login:**
```
az login
```
> **Get the list of VM names and P addresses:**
```
az vm list-ip-addresses --output table
```
## Digital Ocean
Install Digital Ocean CLI `doctl`:
https://github.com/digitalocean/doctl#installing-doctl
> **(One-time) Install on macOS with [`homebrew`](https://brew.sh):**
```
brew install doctl
```
> **(One-time) Login:**
Authentication and context switching:
https://github.com/digitalocean/doctl#authenticating-with-digitalocean
```
doctl auth init
```
> **Get the list of VM names and IP addresses:**
```
doctl compute droplet list --format "ID,Name,PublicIPv4"
```
# Spin a VM (or VM Scale Set)
> Todo: Add instructions for spinning VM(s)
<!--
The below instructions are stale.
### 0. Prerequisites (workspace Setup) for Staff
Get a login session on `azure cli`, and clone the
[`infra`](https://github.com/freeCodeCamp/infra) for setting up template
workspace.
```console
az login
git clone https://github.com/freeCodeCamp/infra
cd infra
```
Use the Scratchpad subdirectory for temporary files, and making one-off edits.
The contents in this subdirectory are intentionally ignored from source control.
### 1. Provision VMs on Azure.
List all Resource Groups
```console
az group list --output table
```
```console
Name Location Status
--------------------------------- ------------- ---------
tools-rg eastus Succeeded
```
Create a Resource Group
```
az group create --location eastus --name stg-rg
```
```console
az group list --output table
```
```console
Name Location Status
--------------------------------- ------------- ---------
tools-rg eastus Succeeded
stg-rg eastus Succeeded
```
Next per the need, provision a single VM or a scaleset.
#### A. provision single instances
```console
az vm create \
--resource-group stg-rg-eastus \
--name <VIRTUAL_MACHINE_NAME> \
--image UbuntuLTS \
--size <VIRTUAL_MACHINE_SKU>
--custom-data cloud-init/nginx-cloud-init.yaml \
--admin-username <USERNAME> \
--ssh-key-values <SSH_KEYS>.pub
```
#### B. provision scaleset instance
```console
az vmss create \
--resource-group stg-rg-eastus \
--name <VIRTUAL_MACHINE_SCALESET_NAME> \
--image UbuntuLTS \
--size <VIRTUAL_MACHINE_SKU>
--upgrade-policy-mode automatic \
--custom-data cloud-init/nginx-cloud-init.yaml \
--admin-username <USERNAME> \
--ssh-key-values <SSH_KEYS>.pub
```
> [!NOTE]
>
> - The custom-data config should allow you to configure and add SSH keys,
> install packages etc. via the `cloud-init` templates in your local
> workspace. Tweak the files in your local workspace as needed. The cloud-init
> config is optional and you can omit it completely to do setups manually as
> well.
>
> - The virtual machine SKU is something like: **Standard_B2s** which can be
> retrived by executing something like
> `az vm list-sizes -l eastus --output table` or checking the Azure portal
> pricing.
-->
# Keep VMs updated
You should keep the VMs up to date by performing updates and upgrades. This will
ensure that the virtual machine is patched with latest security fixes.
> [!WARNING] Before you run these commands:
>
> - Make sure that the VM has been provisioned completely and there is no
> post-install steps running.
> - If you are updating packages on a VM that is already serving an application,
> make sure the app has been stopped / saved. Package updates will cause
> network bandwidth, memory and/or CPU usage spikes leading to outages on
> running applications.
Update package information
```console
sudo apt update
```
Upgrade installed packages
```console
sudo apt upgrade -y
```
Cleanup unused packages
```console
sudo apt autoremove -y
```
# Work on Web Servers (Proxy)
We are running load balanced (Azure Load Balancer) instances for our web
servers. These servers are running NGINX which reverse proxy all of the traffic
to freeCodeCamp.org from various applications running on their own
infrastructures.
The NGINX config is available on
[this repository](https://github.com/freeCodeCamp/nginx-config).
## First Install
Provisioning VMs with the Code
### 1. (Optional) Install NGINX and configure from repository.
The basic setup should be ready OOTB, via the cloud-init configuration. SSH and
make changes as necessary for the particular instance(s).
If you did not use the cloud-init config previously use the below for manual
setup of NGINX and error pages:
```console
sudo su
cd /var/www/html
git clone https://github.com/freeCodeCamp/error-pages
cd /etc/
rm -rf nginx
git clone https://github.com/freeCodeCamp/nginx-config nginx
cd /etc/nginx
```
### 2. Install Cloudflare origin certificates and upstream application config.
Get the Cloudflare origin certificates from the secure storage and install at
required locations.
**OR**
Move over existing certificates:
```console
# Local
scp -r username@source-server-public-ip:/etc/nginx/ssl ./
scp -pr ./ssl username@target-server-public-ip:/tmp/
# Remote
rm -rf ./ssl
mv /tmp/ssl ./
```
Update Upstream Configurations:
```console
vi configs/upstreams.conf
```
Add/update the source/origin application IP addresses.
### 3. Setup networking and firewalls.
Configure Azure firewalls and `ufw` as needed for ingress origin addresses.
### 4. Add the VM to the load balancer backend pool.
Configure and add rules to load balancer if needed. You may also need to add the
VMs to load balancer backend pool if needed.
## Logging and Monitoring
1. Check status for NGINX service using the below command:
```console
sudo systemctl status nginx
```
2. Logging and monitoring for the servers are available at:
> <h3 align="center"><a href='https://amplify.nginx.com' _target='blank'>https://amplify.nginx.com</a></h3>
## Updating Instances (Maintenance)
Config changes to our NGINX instances are maintained on GitHub, these should be
deployed on each instance like so:
1. SSH into the instance and enter sudo
```console
sudo su
```
2. Get the latest config code.
```console
cd /etc/nginx
git fetch --all --prune
git reset --hard origin/master
```
3. Test and reload the config
[with Signals](https://docs.nginx.com/nginx/admin-guide/basic-functionality/runtime-control/#controlling-nginx).
```console
nginx -t
nginx -s reload
```
# Work on API Instances
1. Install build tools for node binaries (`node-gyp`) etc.
```console
sudo apt install build-essential
```
## First Install
Provisioning VMs with the Code
1. Install Node LTS.
2. Update `npm` and install PM2 and setup logrotate and startup on boot
```console
npm i -g npm
npm i -g pm2
pm2 install pm2-logrotate
pm2 startup
```
3. Clone freeCodeCamp, setup env and keys.
```console
git clone https://github.com/freeCodeCamp/freeCodeCamp.git
cd freeCodeCamp
git checkout production-current # or any other branch to be deployed
```
4. Create the `.env` from the secure credentials storage.
5. Create the `google-credentials.json` from the secure credentials storage.
6. Install dependencies
```console
npm ci
```
7. Build the server
```console
npm run ensure-env && npm run build:server
```
8. Start Instances
```console
cd api-server
pm2 start production-start.js -i max --max-memory-restart 600M --name org
```
## Logging and Monitoring
```console
pm2 logs
```
```console
pm2 monit
```
## Updating Instances (Maintenance)
Code changes need to be deployed to the API instances from time to time. It can
be a rolling update or a manual update. The later is essential when changing
dependencies or adding enviroment variables.
> [!DANGER] The automated pipelines are not handling dependencies updates at the
> minute. We need to do a manual update before any deployment pipeline runs.
### 1. Manual Updates - Used for updating dependencies, env variables.
1. Stop all instances
```console
pm2 stop all
```
2. Install dependencies
```console
npm ci
```
3. Build the server
```console
npm run ensure-env && npm run build:server
```
4. Start Instances
```console
pm2 start all --update-env && pm2 logs
```
### 2. Rolling updates - Used for logical changes to code.
```console
pm2 reload all --update-env && pm2 logs
```
> [!NOTE] We are handling rolling updates to code, logic, via pipelines. You
> should not need to run these commands. These are here for documentation.
# Work on Client Instances
1. Install build tools for node binaries (`node-gyp`) etc.
```console
sudo apt install build-essential
```
## First Install
Provisioning VMs with the Code
1. Install Node LTS.
2. Update `npm` and install PM2 and setup logrotate and startup on boot
```console
npm i -g npm
npm i -g pm2
npm install -g serve
pm2 install pm2-logrotate
pm2 startup
```
3. Clone client config, setup env and keys.
```console
git clone https://github.com/freeCodeCamp/client-config.git client
cd client
```
```console
git clone https://github.com/freeCodeCamp/client-config.git client
cd client
```
Start placeholder instances for the web client, these will be updated with
artifacts from the Azure pipline.
> Todo: This setup needs to move to S3 or Azure Blob storage
```console
echo "serve -c ../../serve.json www -p 50505" >> client-start-primary.sh
chmod +x client-start-primary.sh
pm2 delete client-primary
pm2 start ./client-start-primary.sh --name client-primary
echo "serve -c ../../serve.json www -p 52525" >> client-start-secondary.sh
chmod +x client-start-secondary.sh
pm2 delete client-secondary
pm2 start ./client-start-secondary.sh --name client-secondary
```
## Logging and Monitoring
```console
pm2 logs
```
```console
pm2 monit
```
## Updating Instances (Maintenance)
Code changes need to be deployed to the API instances from time to time. It can
be a rolling update or a manual update. The later is essential when changing
dependencies or adding enviroment variables.
> [!DANGER] The automated pipelines are not handling dependencies updates at the
> minute. We need to do a manual update before any deployment pipeline runs.
### 1. Manual Updates - Used for updating dependencies, env variables.
1. Stop all instances
```console
pm2 stop all
```
2. Install or update dependencies
3. Start Instances
```console
pm2 start all --update-env && pm2 logs
```
### 2. Rolling updates - Used for logical changes to code.
```console
pm2 reload all --update-env && pm2 logs
```
> [!NOTE] We are handling rolling updates to code, logic, via pipelines. You
> should not need to run these commands. These are here for documentation.

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -15,9 +15,9 @@
---
- **中文社区贡献指南**
- [成为专栏作者](i18n/chinese/news-author-application.md)
- [文章翻译计划](i18n/chinese/news-translations.md)
- [视频翻译计划](i18n/chinese/video-translations.md)
- [成为专栏作者](/i18n/chinese/news-author-application.md)
- [文章翻译计划](/i18n/chinese/news-translations.md)
- [视频翻译计划](/i18n/chinese/video-translations.md)
---

View File

@ -23,7 +23,7 @@ freeCodeCamp is an inclusive community, and we need to keep it that way.
We have a single code of conduct that governs our entire community. The fewer the rules, the easier they are to remember. You can read those rules and commit them to memory [here](https://code-of-conduct.freecodecamp.org).
# Moderating GitHub
## Moderating GitHub
Moderators have the ability to close issues and accept or close pull requests.
@ -32,11 +32,11 @@ Moderators have two primary responsibilities regarding GitHub:
1. QA'ing and merging pull requests
2. Evaluating and responding to issues
## Moderating Pull Requests
### Moderating Pull Requests
Pull Requests (PRs) are how contributors submit changes to freeCodeCamp's repository. It's important that we perform Quality Assurance (QA) on pull requests before we decide whether to merge them or close them.
### Types of Pull Requests
#### Types of Pull Requests
1. **Challenge Instruction Edits** These are changes to the text of challenges - the Description, Instructions, or Test Text. You can also review these right on GitHub and decide whether to merge them. We need to be a bit more careful about these, because millions of people will encounter this text as they work through the freeCodeCamp curriculum. Does the pull request make the text more clear without making it much longer? Are the edits relevant and not overly pedantic? Remember that our goal is for challenges to be as clear and as short as possible. They aren't the place for obscure details. Also, contributors may try to add links to resources to the challenges. You can close these pull requests and reply to them with this:
@ -50,7 +50,7 @@ Pull Requests (PRs) are how contributors submit changes to freeCodeCamp's reposi
3. **Codebase Changes** These code edits change the functionality of the freeCodeCamp platform itself. Sometimes contributors try to make changes without much explanation, but for code changes we need to make sure there's a genuine need for the change. So these pull requests should reference an existing GitHub issue where the reasons for the change are discussed. Then you can open the pull request on your computer and test them out locally. After you've done so, if the changes look good, don't merge them quite yet. You can comment on the pull request saying "LGTM", then mention @raisedadead so he can take a final look.
### How to merge or close pull requests
#### How to merge or close pull requests
First of all, when you choose a pull request to QA, you should assign yourself to it. You can do this by clicking the "assign yourself" link below the "assignees" part on the right hand column of GitHub's interface.
@ -84,11 +84,11 @@ In both of these situations, you should go ahead and close their pull request an
If you need a second opinion on a pull request, go ahead and leave your comments on the pull request, then add the "discussing" label to the pull request.
## Moderating GitHub Issues
### Moderating GitHub Issues
freeCodeCamp is an active open source project. We get new issues every day, all of which need to be triaged and labeled.
### Types of GitHub Issues
#### Types of GitHub Issues
1. **Code Help Requests**, which people have mistakenly created GitHub issues for. If someone is asking for help, paste the following message, then close the issue.
@ -122,7 +122,7 @@ freeCodeCamp is an active open source project. We get new issues every day, all
>
> If you think I'm wrong in closing this issue, please reopen it and add further clarification. Thank you and happy coding.
### Closing Stale, Outdated, Inactive Issues and Pull Requests
#### Closing Stale, Outdated, Inactive Issues and Pull Requests
- Stale Issues or PRs are those that have not seen any activity from the OP for 21 days (3 weeks from the last activity), but only after a moderator has requested more information/changes. These can be closed in an automated/bot script or by the moderators themselves.
@ -130,7 +130,7 @@ freeCodeCamp is an active open source project. We get new issues every day, all
- If the OP asks for additional assistance or even time, the above can be relaxed and revisited after a response is given. In any case the mods should use their best judgement to resolve the outstanding PR's status.
### Other guidelines for Moderators on GitHub
#### Other guidelines for Moderators on GitHub
Though you will have write access to freeCodeCamp's repository, **you should never push code directly to freeCodeCamp repositories**. All code should enter freeCodeCamp's codebase in the form of a pull request from a fork of the repository.
@ -138,7 +138,7 @@ Also, you should never accept your own PRs. They must be QA'd by another moderat
If you notice anyone breaking the [code of conduct](https://code-of-conduct.freecodecamp.org) on GitHub issues, or opening pull requests with malicious content or code, email dev@freecodecamp.org with a link to the offending pull request and we can consider banning them from freeCodeCamp's GitHub organization entirely.
# Moderating the Forum
## Moderating the Forum
As a Moderator, you help keep our community an enjoyable place for anyone to learn and get help. You will deal with flagged posts and handle spam, off-topic, and other inappropriate conversations.
@ -184,7 +184,7 @@ Please rejoin once you have reached at least 13 years of age.
Thank you for understanding.
```
# Moderating Facebook
## Moderating Facebook
If you see anything that seems to break our [Code of Conduct](https://code-of-conduct.freecodecamp.org/), you should delete it immediately.
@ -192,7 +192,7 @@ Sometimes people will post things that they think are funny. They don't realize
But if it is an egregious offense that can't reasonably be attributed to a cultural difference or a misunderstanding of the English language, then you should strongly consider blocking the member from the Facebook group.
# Moderating Discord
## Moderating Discord
Here's how moderators deal with violations of our [Code of Conduct](https://code-of-conduct.freecodecamp.org/) on Discord:
@ -280,7 +280,7 @@ In all other situations - even situations where the code of conduct is violated
10. **Temporarily inactive**
If you're not going to be active as a Moderator for a while due to vacation, illness or any other reason, make sure to let the others know in the #mod-chat channel. This is so we know if we can count on you to be regularly active in the server or not.
# How to become a moderator
## How to become a moderator
If you are helping people in the community consistently over time, our Moderator Team will eventually take notice, and one of them will mention you as a possible moderator to [our staff](https://forum.freecodecamp.org/g/Team). There are no shortcuts to becoming a moderator.
@ -288,7 +288,7 @@ If you are approved, we will add you to our Moderator Teams on [GitHub](https://
> [!NOTE] > **For GitHub:** After you've been accepted as a moderator, you will receive a Github repository invitation. You'll need to head over towards [freeCodeCamp GitHub Organisation Invitation](https://github.com/orgs/freeCodeCamp/invitation) to be able to accept the invitation. This is required for us to be able to give you write access on some of our repositories.
# How we retire inactive moderators
## How we retire inactive moderators
Please note that we will frequently remove mods whom we think are inactive. When we do this we will send the following message:
@ -296,17 +296,17 @@ Please note that we will frequently remove mods whom we think are inactive. When
> If you think we did this in error, or once you're ready to come back and contribute more, just reply to this message letting me know.
# How our Contributors room works
## How our Contributors room works
Anyone is welcome in the [Contributors room on our Discord](https://discord.gg/KVUmVXA). It is the designated chat room for moderators and other campers who are contributing to our community in any number of ways, including through study groups.
Our assumption is that contributors will read anything in this room that directly mentions them with an `@username`. Everything else is optional. But feel free to read anything anyone posts in there and interact.
# Dealing with solicitors
## Dealing with solicitors
You may be approached by organizations who want to partner or co-brand with freeCodeCamp in some way. Once you realize that this is what they're after, please stop talking to them and tell them to email quincy@freecodecamp.org. He gets proposals like this all the time and is in the best position to judge whether such a relationship will be worth it for our community (and it rarely is).
# Dealing with (mental) health inquiries
## Dealing with (mental) health inquiries
You may come across situations where users are seeking medical advice or are dealing with mental health issues and are looking for support. As a matter of policy, you should avoid talking privately about these matters. Should the situation at some point reflect back to fCC, we want to have the conversation(s) on record. Make it clear that we are not medical professionals and that you encourage the user to find professional help. As difficult as it sometimes can be, avoid giving any tips or advice other than pointing the user in the direction of professional help!
@ -329,7 +329,7 @@ Helpful URLs:
http://www.suicide.org/international-suicide-hotlines.html
# A note on free speech
## A note on free speech
Sometimes people will defend something offensive or incendiary that they said as "free speech."
@ -338,3 +338,131 @@ This XKCD comic perfectly summarizes most communities' thoughts on free speech.
<div align="center"><img src='https://aws1.discourse-cdn.com/freecodecamp/original/3X/4/3/43a8b2eafe4c8622e02838f66f1dc6227de32c70.png' width="400" height="400" /></div>
Thanks for reading this, and thanks for helping the developer community!
## Using Reply Templates
These are some of the standard reply templates that you may use while reviewing pull requests and triaging issues.
> You can make your own with GitHub's built-in [**Saved replies**](https://github.com/settings/replies/) feature or use the ones below.
### Thank you
```markdown
Thank you for your contribution to the page! 👍
We are happy to accept these changes and look forward to future contributions. 🎉
```
### Thank you and congrats
> For thanking and encouraging first-time contributors.
```markdown
Hi @username. Congrats on your first pull request (PR)! 🎉
Thank you for your contribution to the page! 👍
We are happy to accept these changes and look forward to future contributions. 📝
```
### Build Error
```markdown
Hey @username
We would love to be able to merge your changes but it looks like there is an error with the Travis CI build. ⚠️
Once you resolve these issues, We will be able to review your PR and merge it. 😊
---
> Feel free to reference the [Style guide for writing articles](https://github.com/freeCodeCamp/freeCodeCamp#article-title) for this repo on formatting an article correctly so your Travis CI build passes. ✅
>
> Also, it's good practice on GitHub to write a brief description of your changes when creating a PR. 📝
```
### Syncing Fork
> When PR is not up to date with the `master` branch.
````markdown
Hey @username
We would love to be able to merge your changes but it looks like there is an error with the Travis CI build. ⚠️
```bash
Error: ENOTDIR: not a directory, open 'src/pages/java/data-abstraction/index.md'
```
This particular error was not caused by your file but was an old error caused by merging faulty code to the `master` branch. It has since been resolved.
To pass the build, you will have to sync the latest changes from the `master` branch of the `freeCodeCamp/freeCodeCamp` repo.
Using the command line, you can do this in three easy steps:
```bash
git remote add upstream git://github.com/freeCodeCamp/freeCodeCamp.git
git fetch upstream
git pull upstream master
```
If you're using a GUI, you can simply `Add a new remote...` and use the link `git://github.com/freeCodeCamp/freeCodeCamp.git` from above.
Once you sync your fork and pass the build, We will be able to review your PR and merge it. 😊
---
> Feel free to reference the [Syncing a Fork](https://help.github.com/articles/syncing-a-fork/) article on GitHub for more insight on how to keep your fork up-to-date with the upstream repository. 🔄
>
> Also, it's good practice on GitHub to write a brief description of your changes when creating a PR. 📝
````
### Merge Conflicts
> When PR has merge conflicts that need to be resolved.¹
```markdown
Hey @username
We would love to be able to merge your changes but it looks like you have some merge conflicts. ⚠️
Once you resolve these conflicts, We will be able to review your PR and merge it. 😊
---
> If you're not familiar with the merge conflict process, feel free to look over GitHub's guide on ["Resolving a merge conflict"](https://help.github.com/articles/resolving-a-merge-conflict-on-github/). 🔍️
>
> Also, it's good practice on GitHub to write a brief description of your changes when creating a PR. 📝
```
¹ If a first-time-contributor has a merge conflict, maintainers will resolve the conflict for them.
### Duplicate
> When PR is repetitive or a duplicate.
```markdown
Hey @username
It seems that similar changes have already been accepted earlier for this article you are editing, sorry about that. 😓
If you feel you have more to add, please feel free to open up a new PR.
Thanks again! 😊
---
> If you have any questions, feel free to reach out through [Gitter](https://gitter.im/FreeCodeCamp/Contributors) or by commenting below. 💬
```
### Closing invalid pull requests
> When PR is invalid.
```markdown
Hey @username
You have not added any content, We will be closing this PR and marking it as `invalid`. 😓️
Feel free to open another PR though! 👍
```