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

Adding deploy tutorial for Aerobatic #4437

Merged
merged 1 commit into from
May 9, 2018
Merged
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
40 changes: 40 additions & 0 deletions docs/docs/deploy-gatsby.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ title: "Deploying Gatsby"
* [GitLab Pages](/docs/deploy-gatsby/#gitlab-pages)
* [Heroku](/docs/deploy-gatsby/#heroku)
* [Now](/docs/deploy-gatsby/#now)
* [Aerobatic](/docs/deploy-gatsby/#aerobatic)

## Netlify

Expand Down Expand Up @@ -291,3 +292,42 @@ not caused by Gatsby. React uses HTML comments to help identify locations of
components that do not render anything. If you are using a CDN that minifies
your HTML, it will eliminate the HTML comments used by React to take control of
the page on the client. Cloudflare is a CDN that minifies HTML by default.

## Aerobatic

[Aerobatic](https://www.aerobatic.com) is a specialized static site host. You can easily deploy your Gatsby site to Aerobatic with the following steps:

1. Install the Aerobatic CLI:

`npm install aerobatic-cli -g`

2. Create a new Aerobatic site at the root of your Gatsby project:

`aero create --name <your-site-name>`

3. Deploy your Gatsby build output:

`aero deploy --directory public`

Your site will be ready on our CDN at https://<your-site-name>.aerobaticapp.com in a matter of seconds.

There are some additional HTTP header optimizations you can configure in your `aerobatic.yml` file:

```yaml
deploy:
# Note with below setting it is not neccessary to pass --directory to aero deploy command
directory: public
# Turn off the Aerobatic asset fingerprinting since Gatsby already does this
optimizer:
fingerprintAssets: false

plugins:
# Force aggressive 1yr max-age header for all .js and .js.map requests
- name: http-headers
path: ['/*.js', '/*.js.map']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't be safe until gatsby v2 actually https://www.gatsbyjs.org/docs/caching/

Copy link
Contributor Author

@dvonlehman dvonlehman Mar 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see. I'll update the PR so the headers are set to cache forever for the /static/* pattern along with a note about *.js becoming forever cache-able in V2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would love to get this in when you have a chance to push the update!

options:
"Cache-Control": "public, max-age=31536000"
- name: webpage
```

Learn more about Gatsy and Aerobatic at https://www.aerobatic.com/docs/static-site-generators/#react