Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): Add first batch of Cloud docs #36218

Merged
merged 32 commits into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
cd56398
[DO NOT MERGE] feat: start adding cloud docs
DSchau Jul 22, 2022
e567c51
added \"Adding a Custom Domain\" article
pragmaticpat Jul 27, 2022
db8e08c
env vars, and updated the label on image cdn docs
pragmaticpat Jul 27, 2022
e03c22f
added gatsby cloud env var doc
pragmaticpat Jul 28, 2022
02dcb98
added builds overview article
pragmaticpat Jul 28, 2022
d4952be
Update docs/docs/reference/cloud/gatsby-cloud-environment-variables.md
pragmaticpat Jul 29, 2022
9449a7a
Update docs/docs/how-to/cloud/enable-image-cdn.md
pragmaticpat Jul 29, 2022
6f37894
Update docs/docs/how-to/cloud/enable-image-cdn.md
pragmaticpat Jul 29, 2022
91591fa
corrected missing image for enabling image cdn how-to
pragmaticpat Jul 29, 2022
4bea1f1
Merge branch 'master' into docs/cloud
pragmaticpat Jul 29, 2022
c357e3d
clarified that API Key is required, and added screenshot from datadog…
pragmaticpat Jul 29, 2022
78ae668
Merge branch 'docs/cloud' of github.com:gatsbyjs/gatsby into docs/cloud
pragmaticpat Jul 29, 2022
5fe3e7c
Update docs/docs/how-to/cloud/adding-a-custom-domain.md
pragmaticpat Aug 1, 2022
101dfab
applied formatting via prettier - began addressing other style guide …
pragmaticpat Aug 1, 2022
14da60e
gave useful names to images, and minimized use of bold content for ad…
pragmaticpat Aug 1, 2022
20db942
applied the style guidelines for how-to docs on the log drains how-to
pragmaticpat Aug 1, 2022
61abd61
applied how-to structure to the redirects how-to doc
pragmaticpat Aug 1, 2022
bffa449
pointed path_prefix content to OSS docs
pragmaticpat Aug 1, 2022
f5b92e5
Merge branch 'master' into docs/cloud
pragmaticpat Aug 1, 2022
d790d5f
fix: address some stylistic / comprehension feedback
DSchau Aug 1, 2022
e42ab12
Update docs/docs/how-to/cloud/configuring-log-drains.md
pragmaticpat Aug 3, 2022
877d0ff
corrected the section title formats
pragmaticpat Aug 3, 2022
308e958
corrected section title formatting
pragmaticpat Aug 3, 2022
ad047a0
removing unneeded article - this content is to be addressed via the h…
pragmaticpat Aug 3, 2022
7a0b69b
the image cdn how-to needs a more complete review with the owning tea…
pragmaticpat Aug 3, 2022
031047c
Merge branch 'master' into docs/cloud
LekoArts Aug 3, 2022
e938680
Update working-with-redirects-and-rewrites.md
LekoArts Aug 3, 2022
9aea60c
Update working-with-redirects-and-rewrites.md
LekoArts Aug 3, 2022
f8dd42b
Update working-with-redirects-and-rewrites.md
LekoArts Aug 3, 2022
dc1fa15
fix linting
LekoArts Aug 3, 2022
c6645d2
Merge branch 'master' into docs/cloud
pragmaticpat Aug 5, 2022
aeae8f3
Merge branch 'master' into docs/cloud
LekoArts Aug 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions docs/docs/how-to/cloud/adding-a-custom-domain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Adding a Custom Domain to Your Site on Gatsby Cloud
description: Learn how to add a custom domain to your site on Gatsby Cloud
---

## Introduction

Gatsby Cloud allows you to specify Custom Domains for your Gatsby websites. This guide provides the steps for applying Custom Domains to your sites on Gatsby Cloud.

## Prerequisites

Before you can add a custom domain, you'll need to be hosting with Gatsby Cloud. If you haven't already, [turn on Gatsby Hosting](https://support.gatsbyjs.com/hc/en-us/articles/360061641114).

## Directions

### 1. Add a domain

1. Go to Site Settings > Hosting.
1. Click **"Add Domain"** above the domain list to start the process
![Click Add Domain](../../images/click-add-domain.png)
1. In the **"Please enter a domain"** field, add one of the following:

- your apex or root domain (this is your custom domain without the www. part, e.g. mysite.com)
- your subdomain (e.g., www.mysite.com or store.mysite.com)
![Enter your domain](../../images/hosting-domain-modal.png)

Whichever one you choose will become the primary domain for your site.

#### Redirect to the primary domain

If you add an apex domain, Gatsby Hosting will automatically add a redirect that points the www. subdomain to the apex domain. Similarly, if you add a www. subdomain, Gatsby Hosting will automatically add a redirect that points the apex domain to it. Read more about redirected domains in [Working with Redirected Domains](https://support.gatsbyjs.com/hc/en-us/articles/1500003051241).

### 2. Configure your domain name system (DNS)

Next you'll need to visit your 3rd party DNS registrar (e.g. GoDaddy, NameCheap, etc.) to add some DNS records. A DNS Record is an entry in a DNS with details about how to route a request for a given domain name.

#### Apex domain configuration

If you added an apex domain, you will need to add an Address Mapping Record (A Record).

1. Copy one of the IP addresses from the "Value" column for the A records shown next to your custom domain.
1. In your DNS provider's domain settings, create an A Record for the IP address you chose.
![Copy IP Address for A Record](../../images/copy-ip-address-for-a-record.png)

The A Record must point to one of the IP addresses shown for your site. It is only necessary to create an A Record for one of the IP addresses listed.

#### Subdomain configuration

If you added a subdomain, you will need to add a Canonical Name Record (CNAME). The CNAME record must point to the default domain for your site.
![Configure a subdomain](../../images/configure-subdomain.png)

#### How to add DNS records for popular registrars

Here's documentation on adding DNS records for some popular name registrars:

- Go Daddy: [A Record](https://www.godaddy.com/help/add-an-a-record-19238) | [CNAME](https://www.godaddy.com/help/add-a-cname-record-19236)
- Name.com: [A Record](https://www.namecheap.com/support/knowledgebase/article.aspx/319/2237/how-can-i-set-up-an-a-address-record-for-my-domain/) | [CNAME](https://www.namecheap.com/support/knowledgebase/article.aspx/9646/2237/how-to-create-a-cname-record-for-your-domain/)
- NameCheap: [A Record](https://www.name.com/support/articles/115004893508-Adding-an-A-record) | [CNAME](https://www.name.com/support/articles/115004895548-Adding-a-CNAME-Record)
- Google Domains: [A Record](https://support.google.com/a/answer/2579934?hl=en&ref_topic=2721296) | [CNAME](https://support.google.com/a/answer/47283)

## 3. Check DNS status

Once you've added your DNS record, click **"Check Status"** or refresh the page to check that your DNS record has been recognized by Gatsby Hosting.
![Check DNS Status](../../images/check-domain-status.png)

If your domain fails to validate after 24 hours, try creating an A Record for one of the other IP addresses available instead.
![Domain failed to validate](../../images/domain-validation-failed.png)

## 4. Generate SSL certificate

After the domain is validated, we'll generate a free SSL certificate via Let's Encrypt and automatically configure it. This whole process can take a few minutes to complete.
![Generating SSL Certificate](../../images/generate-ssl-certificate.png)

**Note**: DNS records need to be fully propagated in order to properly verify the certificates. If not, SSL certification generation will fail.

## 5. Finish

Once your custom domain has the **"HTTPS On"** label next to it, you should be able to visit it to see your site live.
![Confirm site is successfully connected](../../images/confirm-site-is-connected.png)

If you encounter errors related to the the connection not being secure, please allow a few minutes as it can take time for DNS changes to take effect and be detected by all browsers. Use this time to verify that you followed the above steps completely.

## Other considerations

If you see the following when you visit your custom domain, the site may still be building.
![Site is still building](../../images/site-is-still-building.png)

Check the **"Deploys"** tab for your site to see the current status of your builds.
![Latest build status](../../images/see-latest-build-status.png)
41 changes: 20 additions & 21 deletions docs/docs/how-to/cloud/configuring-log-drains.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,56 @@ title: Configuring Log Drains on Gatsby Cloud
description: Learn how to connect Gatsby Cloud's hosting logs to third party log analytics providers like DataDog
---

## Introduction

Gatsby Cloud can deliver hosting logs to the 3rd party services (currently only [DataDog](https://www.datadoghq.com/)), which allows developers and marketers to review server side analytics, and accelerate the troubleshooting process when hosting layer errors occur.

## Prerequisites

- The Log Drains feature is limited to enterprise plans in Gatsby Cloud, therefore this feature will only appear within site settings for sites within enterprise plans.
- You must have an account with DataDog. Currently, Gatsby Cloud only supports integration with DataDog, but will introduce additional logging targets based on customer demand in the future.

## Enable Log Drains
## Directions

### Enable log drains

1. [Log in](https://app.datadoghq.com/account/login) to your DataDog account
1. [Add a new API Key](https://docs.datadoghq.com/account_management/api-app-keys/#add-an-api-key-or-client-token), giving it a name that will help you remember that this key is used for receiving logs from Gatsby Cloud.

**Note**: If you’re enabling Log Drains for multiple Gatsby Cloud sites, we recommend that you create a separate API key for each Gatsby Cloud site.
**Notes**:

1. Copy the newly-created API Key
- If you’re enabling Log Drains for multiple Gatsby Cloud sites, we recommend that you create a separate `API Key` for each Gatsby Cloud site.
- Be sure you create an `API Key` in DataDog, not an Application Key.
![Be sure to create an API Key, not an Application Key](../../images/log-drains-datadog-api-key.png)

1. Copy the newly-created `API Key`
1. Take note of the region (["SITE" in DataDog terminology](https://docs.datadoghq.com/getting_started/site/#pagetitle)) for your DataDog account.

**Note**: Your DataDog region may appear as the subdomain when logged into DataDog

1. [Log in](/dashboard/login) to Gatsby Cloud
1. Select the site whose logs you’d like to integrate with DataDog
1. Access "Site Settings" for that site
1. Select "Log Drains" in the left navigation

1. Select "Log Drains" in the left navigation
![Log Drains Navigation Item](../../images/log-drains-nav-item.png)

**Note**: If you do not see Log Drains, then the selected site is not likely within an enterprise plan. [Contact us](/support/) if you have any questions.

1. Click Connect

1. Click Connect
![Click Connect to configure log drains](../../images/connect-log-drains-1.png)

1. Select the appropriate region for your DataDog instance

1. Select the appropriate region for your DataDog instance
![Select the appropriate region](../../images/select-region-3.png)

1. In DataDog, this is the value for [Site](https://docs.datadoghq.com/getting_started/site/#pagetitle)
1. Enter the API key you created in DataDog from step 3

1. Enter the `API Key` you created in DataDog from step 3
![Add your Log Analytics service's API Key](../../images/add-api-key.png)

1. Click Connect
1. You will see a confirmation that DataDog is now connected

1. You will see a confirmation that DataDog is now connected
![Connected confirmation message](../../images/connect-confirmation.png)

1. View the [Live Tail](https://app.datadoghq.com/logs/livetail) for this Gatsby site’s logs in your DataDog account to confirm that you’re now receiving logs from Gatsby Cloud

**Note**: It can take up to 10 minutes for your initial set of logs to appear

## Modify Log Drains
### Modify log drains

1. Access your site’s "Site Settings" in Gatsby Cloud
1. Navigate to "Log Drains" in the left-hand navigation
Expand All @@ -62,7 +61,7 @@ Gatsby Cloud can deliver hosting logs to the 3rd party services (currently only
1. Update the settings accordingly
1. Click Save

## Disconnect Log Drains
### Disconnect log drains

1. Access your site’s "Site Settings" in Gatsby Cloud
1. Navigate to "Log Drains" in the left-hand navigation
Expand All @@ -73,8 +72,8 @@ Gatsby Cloud can deliver hosting logs to the 3rd party services (currently only

## Troubleshooting

- After selecting the region and specifying my API key, I receive an error upon clicking Connect from Gatsby Cloud
- Confirm that you’ve entered the DataDog API Key properly
- After selecting the region and specifying my `API Key`, I receive an error upon clicking Connect from Gatsby Cloud
- Confirm that you’ve entered the DataDog `API Key` properly
- Confirm that you’ve selected the appropriate Region in Step 10
- If all of these are correct, please [Contact us](/support/)
- It’s been more than 10 minutes, and I still don’t see any logs in DataDog. What now?
Expand Down
Loading