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

docs: add deploying docs section #716

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 36 additions & 0 deletions docs/documentation/09-Deploying/datadog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
slug: /deploying/datadog
sidebar_label: Setting up Datadog
---

# Setting up Datadog

If you have access to Datadog for application monitoring and want to configure your HeadstartWP project to send data to Datadog, then this guide will help you get started. As of this writing, this guide is meant to assist you when running HeadstartWP in your own hosting infrastructure or on a hosting platform that offers Datadog APM. Adding basic Datadog support is extremely simple and only requires a couple of steps. Your hosting platform may have additional requirements so check with them to ensure you have configured everything properly.

The following steps will help you get Datadog tracing installed and activate:

### Add dd-trace
You must first add Datadog's dd-trace library to your project. How you do so depends on if you are using workspaces or not. In general, you add the dd-trace library in the usual way with:

```
npm install -s dd-trace
```

Modify this to add the `--workspace` option if you are using workspaces, adjusting the path to locate your project. The command will look similar to:

```
npm install -s --workspace @path/to/workspace dd-trace
```

You will find more detailed directions at [https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/nodejs/](https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/nodejs/)

### Activate dd-trace
Once dd-trace is added to your project you must activate it in the hosting environment. While you can activate dd-trace in code, you may find it easier to activate using an environment variable passed to the Node process. In addition to the usual set of [environment variables used to configure dd-trace](https://ddtrace.readthedocs.io/en/stable/configuration.html) you can tell the Node process itself to initialize dd-trace using an environment variable. How this variable is set depends on the hosting platform and your preferences.

The required environment variable to pass to the Node process is:

```
NODE_OPTIONS='--require dd-trace/init'
```

You can set this however you please but note that you _cannot_ set this using the .env file for your project. This file is loaded too late in the initialization process to take affect.
19 changes: 19 additions & 0 deletions docs/documentation/09-Deploying/gettining-ready.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
slug: /deploying
sidebar_label: Getting Ready
sidebar_position: 0
---

# Getting Ready to deploy

Before deploying we recommend checking out a few things to ensure a smooth launch. Here's a quick checklist:

- Confirm SEO meta tags are working. HeadstartWP has an out-of-the-box integration with the Yoast SEO plugin.
- Confirm your sitemaps are working. If you have the Yoast SEO plugin, HeadstartWP will proxy sitemaps through WP and ensure links are replaced with the front-end links
- Check out your robots.txt, HeadstarWP will proxy it through WP as well.
- Check out ads.txt, HeadstartWP will also proxy it through WP. We recommend installing the [ads.txt](https://wordpress.org/plugins/ads-txt/) plugin.
- Consider setting up application monitoring such as [Datadog](./datadog.md), New-Relic or Sentry.

## Hosting

You can deploy HeadstartWP to any hosting that supports Next.js. We've tested HeadstartWP on a few platforms. Check out our [Hosting](./hosting.md) page for some tips.
15 changes: 15 additions & 0 deletions docs/documentation/09-Deploying/hosting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
slug: /deploying/hosting
sidebar_label: Hosting
sidebar_position: 1
---

# Hosting

We've tested HeadstartWP on the following hosting platforms. We've listed here some tips when hosting on these platforms.

## Vercel

## WordPress VIP

## WP Engine Atlas
Loading