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 cloudflare pages deployment guide #1494

Closed
wants to merge 0 commits into from

Conversation

DataDrivenMD
Copy link
Contributor

This PR includes a step-by-step deployment guide for use on Cloudflare Pages as well as a GitHub Actions .yml file that can be used as part of a CD/CI workflow.

@stackblitz
Copy link

stackblitz bot commented Jan 27, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Jan 27, 2023

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit 3732a2c
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/640cb3b80aa6d0000808d683

@netlify
Copy link

netlify bot commented Jan 27, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit 3732a2c
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/640cb3b9d4981d000722b499
😎 Deploy Preview https://deploy-preview-1494--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@danielroe danielroe changed the title Cloudflare Pages Deployment Guide + GH Actions Template docs: add cloudflare pages deployment guide Jan 28, 2023
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

Before merging this:

@DataDrivenMD
Copy link
Contributor Author

Just dropping a quick note that I haven't forgotten about this PR-- I'm waiting until we sort out the HTTP 405s that prevent users from logging into the app when it is deployed to Cloudflare Pages (and CF Workers Sites). Once we get that squared away, I plan to circle back to make the requested changes to this PR along with any additional steps that may be necessary to a deploy a fully-functioning Elk instance on CF Pages

@DataDrivenMD
Copy link
Contributor Author

Just submitted PR #1798 which unblocks work on this PR (#1494). I'll circle back sometime over the weekend to make the changes requested by @danielroe + to expand on the instructions to incorporate additional details necessary to deploy to CF Pages with CI

@DataDrivenMD
Copy link
Contributor Author

DataDrivenMD commented Feb 21, 2023

Before merging this:

  • I've left a couple of minor comments
  • we also should add a note that Cloudflare Pages deployment is not yet fully supported (as you can't yet log in), and maybe link to the relevant issue: unjs/nitro#787

Added links to three issues that report the same bug in Nitro:

> If you're familiar with the Nitro build/prerendering system, you may have noticed that we're using the `cloudflare` preset instead of the `cloudflare_pages` preset- that's not a typo. In our testing, the `cloudflare_pages` preset generated an incomplete routing tree that throws errors and sends billable usage through the roof. The underlying cause of the problem is well-known, well-documented, and well-beyond the scope of the Elk project. If you're curious, see: [cloudflare/workers-sdk #1859](https://github.com/cloudflare/workers-sdk/issues/1859), [unjs/nitro #196](https://github.com/unjs/nitro/issues/196), and [unjs/nitro #497](https://github.com/unjs/nitro/issues/497). If you follow this guide, your deployment will use the source code in the `/functions` directory, which was written specifically to workaround these issues.

Also, I submitted a PR (#1798 #1798) that resolves the issue for the Elk project. The rationale for an Elk-specific workaround as implemented in PR 1798 (regardless of how/when/if the Nitro bug is fixed) is presented here

@socket-security
Copy link

socket-security bot commented Feb 21, 2023

Socket Security Pull Request Report

👍 No dependency changes detected in pull request

Pull request report summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

Powered by socket.dev

@DataDrivenMD
Copy link
Contributor Author

Hey @danielroe this PR should be ready for re-review at your convenience. It incorporates the changes you requested during the original PR review plus updates the Cloudflare Pages deployment guide to account for nitrojs/nitro#965

@danielroe
Copy link
Member

o no - don't close it!

@DataDrivenMD
Copy link
Contributor Author

@danielroe Crap. I synchronized with upstream without realizing that I created this PR directly from main. Sorry about that. Will revert.

@DataDrivenMD
Copy link
Contributor Author

@danielroe Double crap. I can't revert because the command was a force-push to my origin/main. I hadn't pulled the changes to my local clone, so I was able to reset the commit locally but I won't be able to restore this PR. I'll create a proper branch, commit the changes there, and then create a new PR to prevent this from happening again.

That was a rookie move on my part. Sorry about that.

Copy link
Member

no problem at all - sorry it has taken me so long to review!

@DataDrivenMD
Copy link
Contributor Author

No worries. I've been away from this project for a couple of weeks, which is why I mindlessly performed a hard sync with the upstream repo-- thinking that I probably missed so much that it would be more efficient to clear the table and start from scratch 🤦🏻‍♂️

DataDrivenMD added a commit to Distal-Labs/elk that referenced this pull request Mar 11, 2023
**NOTE** This is a resubmission of [PR elk-zone#1494](elk-zone#1494), which was inadvertently closed by a force-push

- [X] Add Cloudflare Pages to deployment guide
- [X] Refactor Netlify deployment guide
- [X] Add Getting Started page to the deployment guide that covers topics that are common/shared by multiple deployment types
- [X] Add cloudflare_pages.yml workflow file (set to workspace/manual trigger)
DataDrivenMD added a commit to Distal-Labs/elk that referenced this pull request Mar 11, 2023
**NOTE** This is a resubmission of [PR elk-zone#1494](elk-zone#1494), which was inadvertently closed by a force-push

- [X] Add Cloudflare Pages to deployment guide
- [X] Refactor Netlify deployment guide
- [X] Add Getting Started page to the deployment guide that covers topics that are common/shared by multiple deployment types
- [X] Add cloudflare_pages.yml workflow file (set to workspace/manual trigger)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: docs Documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants