From dfdd334d1600e86f623ced815bb23cfe1f091ca2 Mon Sep 17 00:00:00 2001 From: Tylan Davis Date: Fri, 30 Jun 2023 19:07:48 -0400 Subject: [PATCH] docs: adds Cloud docs --- docs/cloud/configuration.mdx | 53 ++++++++++++++ docs/cloud/creating-a-project.mdx | 51 ++++++++++++++ docs/cloud/projects.mdx | 110 ++++++++++++++++++++++++++++++ docs/cloud/teams.mdx | 35 ++++++++++ 4 files changed, 249 insertions(+) create mode 100644 docs/cloud/configuration.mdx create mode 100644 docs/cloud/creating-a-project.mdx create mode 100644 docs/cloud/projects.mdx create mode 100644 docs/cloud/teams.mdx diff --git a/docs/cloud/configuration.mdx b/docs/cloud/configuration.mdx new file mode 100644 index 0000000000..83ea807fbe --- /dev/null +++ b/docs/cloud/configuration.mdx @@ -0,0 +1,53 @@ +--- +title: Project Configuration +label: Configuration +order: 20 +desc: Quickly configure and deploy your Payload Cloud project in a few simple steps. +keywords: configuration, config, settings, project, cloud, payload cloud, deploy, deployment +--- + +### Select your plan + +Once you have created a project, you will need to select your plan. This will determine the resources that are allocated to your project and the features that are available to you. + +Note: All Payload Cloud teams that deploy a project require a card on file. This helps us prevent fraud and abuse on our platform. If you select a plan with a free trial, You will not be charged until your trial period is over. We’ll remind you 7 days before your trial ends and you can cancel anytime. + +### Project Details + +| Field | Description | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Region** | Select the region closest to your audience. This will ensure the fastest communication between your data and your client. | +| **Project Name** | A name for your project. You can change this at any time. | +| **Project Slug** | Choose a unique slug to identify your project. This needs to be unique for your team and you can change it any time. | +| **Team** | Select the team you want to create the project under. If this is your first project, a personal team will be created for your automatically. You can modify your team settings and invite new members at any time from the Team Settings page. | + +### Build Settings + +If you are deploying a new project from a template, the following settings will all be automatically configured for you. If you are using your own repository, you will need to make sure your build settings are accurate for your project to deploy correctly. + +| Field | Description | +| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Root Directory** | The folder where your `package.json` file lives. | +| **Install Command** | The command used to install your modules, for example: `yarn install` or `npm install` | +| **Build Command** | The command used to build your application, for example: `yarn build` or `npm run build` | +| **Serve Command** | The command used to serve your application, for example: `yarn serve` or `npm run serve` | +| **Branch to Deploy** | Select the branch of your repository that you want to deploy from. This is the branch that will be used to build your project when you commit new changes. | +| **Default Domain** | Set a default domain for your project. This must be unique and you aren’t able to change it. You can always add a custom domain later in your project settings. | + +### Environment Variables + +Any of the features in Payload Cloud that require environment variables will automatically be provided to your application. If your app requires any custom environment variables, you can set them here. + +Note: For security reasons, any variables you wish to provide to the Admin panel must be prefixed with `PAYLOAD_PUBLIC_`. [Learn more](http://local.payloadcms.com:3000/docs/admin/webpack#admin-environment-vars). + +### Payment + +Payment methods can be set per project and can be updated any time. You can use team’s default payment method, or add a new one. You can modify your payment methods in your Project settings as well as Team settings. + + + Note: All Payload Cloud teams that deploy a project require a + card on file. This helps us prevent fraud and abuse on our platform. If you + select a plan with a free trial, You will not be charged until your trial + period is over. We’ll remind you 7 days before your trial ends and you can + cancel anytime. + diff --git a/docs/cloud/creating-a-project.mdx b/docs/cloud/creating-a-project.mdx new file mode 100644 index 0000000000..9f4e74916c --- /dev/null +++ b/docs/cloud/creating-a-project.mdx @@ -0,0 +1,51 @@ +--- +title: Getting Started +label: Getting Started +order: 10 +desc: Get started with Payload Cloud, a deployment solution specifically designed for Node + MongoDB applications. +keywords: cloud, hosted, database, storage, email, deployment, serverless, node, mongodb, s3, aws, cloudflare, atlas, resend, payload, cms +--- + +Payload Cloud is a deployment solution specifically designed for Node + MongoDB applications, offering seamless deployment of your entire stack in one place. You can get started in minutes with a one-click template, or bring your own codebase with you. Payload Cloud offers different plans tailored to meet your specific needs, including a MongoDB Atlas database, S3 file storage, and email delivery powered by Resend. To see the full breakdown of features and plans, see our [Cloud Pricing page](https://payloadcms.com/cloud-pricing). + +To get started with Payload Cloud, you will first need to create an account. From the login screen, select **Register for Free**. One you’ve created an account, you’ll need to verify it by visiting the link sent to your email. After that, you can log into your account and get started. + + + To create your first project, you can either [start from a + template](#starting-from-a-template), or [import an existing + project](#importing-from-an-existing-codebase) from your GitHub account. + + +## Starting from a Template + +Payload Cloud templates provide a one-click, simple solution to quickly deploy a new application. Templates come preconfigured, so there is no additional set up needed to run your application on Payload Cloud. + +![Screen for creating a new project from a template](https://payloadcms.com/images/docs/cloud/create-from-template.jpg) +_Creating a new project from a template._ + +After creating an account, select your desired template from the Projects page. At this point, you will need to connect to Authorize the Payload Cloud application with your GitHub account. Click Continue with GitHub and follow the prompts to authorize the app. + +Next, select your `GitHub Scope`. If you belong to multiple organizations they will show up here. If do not see the organization you are looking for, you may need to adjust your GitHub app permissions. + +After selecting your scope, choose a unique `repository name` for and select whether or not you want your repository to be public or private on GitHub. + + + Note: Public repositories can be accessed by anyone online, + while private repositories grant access to you and anyone you explicitly + authorize. + + +Once you are ready, click **Create Project**. This will clone a repository of the template you selected to your GitHub account, and take you to the configuration page to set up your project for deployment. + +## Importing from an Existing Codebase + +Payload Cloud works for any Node + MongoDB app. From the the New Project page, select **import an existing Git codebase**. Choose the organization and select the repository you want to import. From here, you will be taken to the configuration page to set up your project for deployment. + + + Note: In order to make use of the features of Payload Cloud + in your own codebase, you will need to add the [Cloud + Plugin](https://github.com/payloadcms/plugin-cloud) to your Payload app. + + +![Screen for creating a new project from an existing repository](https://payloadcms.com/images/docs/cloud/create-from-existing.jpg) +_Creating a new project from an existing repository._ diff --git a/docs/cloud/projects.mdx b/docs/cloud/projects.mdx new file mode 100644 index 0000000000..3612334134 --- /dev/null +++ b/docs/cloud/projects.mdx @@ -0,0 +1,110 @@ +--- +title: Cloud Projects +label: Projects +order: 40 +desc: Manage your Payload Cloud projects. +keywords: cloud, payload cloud, projects, project, overview, database, file storage, build settings, environment variables, custom domains, email, developing locally +--- + +### Overview + + + The overview tab shows you your most recent deployment, and its build and + deploy logs. From here, you can see your live URL, deployment details like + timestamps and commit hash, as well as the status of your deployment. You can + also trigger a redeployment manually, which will rebuild your project using + the current configuration. + + +![Payload Cloud Overview Page](https://payloadcms.com/images/docs/cloud/overview-page.jpg) +_A screenshot of the Overview page for a Cloud project._ + +### Database + +Your Payload Cloud project comes with a MongoDB serverless Atlas DB instance or Dedicated Atlas cluster, depending on your plan. To interact with your cloud database, you use a MongoDB connection string. This can be found under the **Database** tab of your project. + +`mongodb+srv://your_connection_string` + +### File Storage + +Payload Cloud gives you S3 file storage backed by Cloudflare as a CDN, and this plugin extends Payload so that all of your media will be stored in S3 rather than locally. + +AWS Cognito is used for authentication to your S3 bucket. The [Payload Cloud Plugin](https://github.com/payloadcms/plugin-cloud) will automatically pick up these values. These values are only if you'd like to access your files directly, outside of Payload Cloud. + +### Build Settings + +You can update settings from your Project’s Settings tab. Changes to your build settings will trigger a redeployment of your project. + +### Environment Variables + +From the Environment Variables page of the Settings tab, you can add new variables or adjust and delete current variables for your project. Like build settings, these changes will trigger a redeployment of your project. + + + Note: For security reasons, any variables you wish to provide to the Admin + panel must be prefixed with `PAYLOAD_PUBLIC_`. [Learn + more](http://local.payloadcms.com:3000/docs/admin/webpack#admin-environment-vars). + +### Custom Domains + +With Payload Cloud, you can add custom domain names to your project. To do so, first go to the Domains page of the Settings tab of your project. Here you can see your default domain. To add a new domain, type in the domain name you wish to use. + + + Note: do not include protocol (http:// or https://) or any routes (/page). + Only include the the domain name and extension, and optionally a subdomain. - + your-domain.com - backend.your-domain.com + + +Once you click save, a DNS record will be generated for your domain name to point to your live project. Add this record into your DNS provider’s records, and once the records are resolving properly (this can take 1hr to 48hrs in some cases), your domain will now to point to your live project. + +You will also need to configure your Payload project to use your specified domain. in your `payload.config.ts` file, specify your serverURL with your domain: + +```tsx +export default buildConfig({ + serverURL: 'https://example.com', + // the rest of your config, +}); +``` + +### Email + +Powered by Resend, Payload Cloud comes with integrated email support out of the box. No configuration is needed, and you can use `payload.sendEmail()` to send email right from your Payload app. To learn more about sending email with Payload, visit the [Email Configuration](https://payloadcms.com/docs/email/overview) page of the docs. + +If you are on the Pro or Enterprise plan, you can add your own custom Email domain name to send emails. From the Email page of your project’s Settings page, add the domain you wish to use for email delivery. This will generate a set of DNS records. Add these records to your DNS provider and click verify to check that your records are resolving properly. Once verified, your emails will now be sent from your custom domain name. + +### Developing Locally + +To make changes to your project, you will need to clone the repository defined in your project settings to your local machine. In order to run your project locally, you will need configure your local environment first. Refer to your repository’s `README.md` file to see the steps needed for your specific template. + +From there, you are ready to make updates to your project. When you want to add these changes to your live Cloud project, commit your changes to the branch you specified in your Project settings, and your application will automatically trigger a redeploy and build from your latest commit. + +### Cloud Plugin + +Projects generated from a template will come preconfigured with the official Cloud Plugin, but if you are using your own repository you will need to add this into your project. To do so, add the plugin to your Payload config: + +`yarn add @payloadcms/plugin-cloud` + +```jsx +import { payloadCloud } from '@payloadcms/plugin-cloud'; +import { buildConfig } from 'payload/config'; + +export default buildConfig({ + plugins: [payloadCloud()], + // rest of config +}); +``` + + + **Note:** If your Payload config already has an email with transport, this + will take precedence over Payload Cloud's email service. + + +##### **Optional configuration** + +If you wish to opt-out of any Payload cloud features, the plugin also accepts options to do so. + +```jsx +payloadCloud({ + storage: false, // Disable file storage + email: false, // Disable email delivery +}); +``` diff --git a/docs/cloud/teams.mdx b/docs/cloud/teams.mdx new file mode 100644 index 0000000000..30447dd3d9 --- /dev/null +++ b/docs/cloud/teams.mdx @@ -0,0 +1,35 @@ +--- +title: Cloud Teams +label: Teams +order: 30 +desc: Manage your Payload Cloud team and billing settings. +keywords: team, teams, billing, subscription, payment, plan, plans, cloud, payload cloud +--- + + + Within Payload Cloud, the team management feature offers you the ability to + manage your organization, team members, billing, and subscription settings. + + +![Payload Cloud Team Settings](https://payloadcms.com/images/docs/cloud/team-settings.jpg) +_A screenshot of the Team Settings page._ + +### Members + +Each team has member that can interact with your projects. You can invite multiple people to your team and each individual can belong to more than one team. You can delegate wether they have `owner` permissions or just User permissions. Owners are able to make admin-only changes, such as deleting projects, and editing billing information. + +### Adding Members + +To add a new member to your team, visit your Team’s Settings page, and click “Invite Teammate”. You can then add their email address, and assign their role. Press “Save” to send invitations, which will send an email to the invited team member where they can create a new account. + +### Billing + +Users can update billing settings and subscriptions for any teams where they are designated as an `owner`. To make updates to the team’s payment methods, visit the Billing page under the Team Settings tab. You can add new cards, delete cards, and set a payment method as a default. The default payment method will be used in the event that another payment method fails. + +### Subscriptions + +From the Subscriptions page, a team owner can see all current plans for their team. From here, you can see the price of each plan, if there is an active trial, and when you will be billed next. + +### Invoices + +The Invoices page will you show you the invoices for your account, as well as the status on their payment.