Skip to content

Commit

Permalink
Update deployment documentation (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
dannytlake authored Sep 27, 2023
1 parent 4eca476 commit ce402d6
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 74 deletions.
49 changes: 10 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@ Start building your dream commerce site today with Composable UI!
- [Resources](#resources)
- [Deployment / Installation](#deployment--installation)
- [Option 1: Run in Localhost](#option-1-run-in-localhost)
- [Option 2: 1-Click Deployment to Vercel](#option-2-1-click-deployment-to-vercel)
- [Option 3: 1-Click Deployment to Netlify](#option-3-1-click-deployment-to-netlify)
- [Option 4: Run in Docker](#option-4-run-in-docker)
- [Option 2: 1-Click Deployments](#option-2-1-click-deployments)
- [Option 3: Run in Docker](#option-3-run-in-docker)
- [Configuring Algolia and Stripe](#configuring-algolia-and-stripe)
- [Algolia Setup](#algolia-setup)
- [Stripe Setup](#stripe-setup)
- [Documentation Installation](#documentation-installation)
- [Deployment](#deployment)
- [1-Click Deployment to Vercel](#1-click-deployment-to-vercel)
- [1-Click Deployment to Netlify](#1-click-deployment-to-netlify)
- [Documentation Deployment](#documentation-deployment)
- [What's inside?](#whats-inside)
- [Next Steps](#next-steps)
- [How to Contribute](#how-to-contribute)
Expand Down Expand Up @@ -65,9 +62,8 @@ Be sure to read the documentation on Composable UI's [environment variables](htt

<!-- no toc -->
- [Option 1: Run in Localhost](#option-1-run-in-localhost)
- [Option 2: 1-Click Deployment to Vercel](#option-2-1-click-deployment-to-vercel)
- [Option 3: 1-Click Deployment to Netlify](#option-3-1-click-deployment-to-netlify)
- [Option 4: Run in Docker](#option-4-run-in-docker)
- [Option 2: 1-Click Deployment ](#option-2-1-click-deployment)
- [Option 3: Run in Docker](#option-3-run-in-docker)

You can host Composable UI on any service that supports Next.js.

Expand All @@ -93,29 +89,12 @@ pnpm dev

You should now have the Composable UI application running locally. Go to your web browser and navigate to <http://localhost:3000>

### Option 2: 1-Click Deployment to Vercel
### Option 2: 1-Click Deployments

Use the button below to build and deploy your own copy of Composable UI to Vercel:
Refer to the [1-Click deployment documentation](https://docs.composable.com/docs/build_and_deploy/deploy#deploy-composable-ui) to quickly and easily deploy Composable UI to a frontend cloud provider.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcomposable-com%2Fcomposable-ui&root-directory=composable-ui&project-name=composable-ui&repository-name=composable-ui&demo-title=Composable%20UI&demo-description=Open%20Source%20React%20Storefront%20for%20Composable%20Commerce&demo-url=https%3A%2F%2Fstorefront.composable.com%2F&demo-image=https%3A%2F%2Fstorefront.composable.com%2Fimg%2Fdemo_image.png&envDescription=Enter%20your%20NEXTAUTH_SECRET.&env=NEXTAUTH_SECRET&envLink=https%3A%2F%2Fnext-auth.js.org%2Fconfiguration%2Foptions%23nextauth_secret)

- You’ll be prompted to authenticate with GitHub and choose a repository name.
- Vercel will then automatically create a repository in your GitHub account with a copy of the files from the Composable UI repository.
- You will be prompted to enter a value for the NEXTAUTH_SECRET environment variable. See the NextAuth docs for more information, including a script for how to generate a secure secret that will be used for cookie JWT encryption.
- Next, it will build and deploy the new site on Vercel.

### Option 3: 1-Click Deployment to Netlify

Use the button below to build and deploy your own copy of Composable UI to Netlify:

<a href="https://app.netlify.com/start/deploy?repository=https://github.com/composable-com/composable-ui&base=composable-ui#PNPM_FLAGS=--shamefully-hoist"><img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify"></a>

- You’ll be prompted to authenticate with GitHub and choose a repository name.
- Netlify will then automatically create a repository in your GitHub account with a copy of the files from the Composable UI repository.
- You will be prompted to enter a value for the NEXTAUTH_SECRET environment variable. See the NextAuth docs for more information, including a script for how to generate a secure secret that will be used for cookie JWT encryption.
- Next, it will build and deploy the new site on Netlify.

### Option 4: Run in Docker
### Option 3: Run in Docker

You can also run the Composable UI app easily using Docker and not worry about local dependencies. If you don't already have Docker installed, first [install Docker](https://docs.docker.com/get-docker/) before proceeding below.

Expand Down Expand Up @@ -181,17 +160,9 @@ You should now have the Docusaurus application running locally. Go to your web b

Alternatively, you can view the latest documentation directly at <https://docs.composable.com>

### Deployment

#### 1-Click Deployment to Vercel
Use the button below to build and deploy your own copy of Composable UI Docs to Vercel:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Foriuminc%2Fcomposable-open-labs&root-directory=docs&build-command=cd%20docs%20%26%26%20yarn%20build&install-command=cd%20docs%20%26%26%20yarn%20install&project-name=composable-ui-docs&repository-name=composable-ui&demo-title=Composable%20UI%20docs&demo-description=Docs%20for%20Open%20Source%20React%20Storefront%20for%20Composable%20Commerce&demo-url=https%3A%2F%2Fstorefront.composable.com&demo-image=https%3A%2F%2Fstorefront.composable.com%2Fdemo_image.png)

#### 1-Click Deployment to Netlify
Use the button below to build and deploy your own copy of Composable UI Docs to Netlify:
### Documentation Deployment

<a href="https://app.netlify.com/start/deploy?repository=https://github.com/composable-com/composable-ui&base=docs"><img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify"></a>
Refer to [Deploy Composable UI Docs](https://docs.composable.com/docs/build_and_deploy/deploy#deploy-composable-ui-docs) to deploy to a cloud provider.

---

Expand Down
Binary file added composable-ui/public/img/composable-ui-docs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions docs/docs/build_and_deploy/deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
sidebar_position: 1
---

# Deploy

## Deploy Composable UI

You can host Composable UI on any hosting service that supports Next.js applications such as Vercel, Netlify, or AWS.

### Environment Variables

When deploying to a cloud provider, you must set the `NEXTAUTH_SECRET` environment variable on the cloud platform. For more information on Composable UI environment variables, see the [Application Configuration](../essentials/configuration.md) section.
- [Setting environment variables on Vercel](https://vercel.com/docs/concepts/projects/environment-variables)
- [Setting environment variables on Netlify](https://docs.netlify.com/environment-variables/overview/)

### 1-Click Deployment to Vercel

Click the following button to build and deploy your own copy of Composable UI to Vercel:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcomposable-com%2Fcomposable-ui&root-directory=composable-ui&project-name=composable-ui&repository-name=composable-ui&demo-title=Composable%20UI&demo-description=Open%20Source%20React%20Storefront%20for%20Composable%20Commerce&demo-url=https%3A%2F%2Fstorefront.composable.com%2F&demo-image=https%3A%2F%2Fstorefront.composable.com%2Fimg%2Fdemo_image.png&envDescription=Enter%20your%20NEXTAUTH_SECRET.&env=NEXTAUTH_SECRET&envLink=https%3A%2F%2Fnext-auth.js.org%2Fconfiguration%2Foptions%23nextauth_secret)

When prompted, authenticate with GitHub and choose a repository name.
Vercel creates a repository automatically in your GitHub account with a copy of the files from the Composable UI repository and build and deploy the new site. However, you can deploy your Next.js application to Vercel regardless of whether you have a GitHub, Bitbucket, or GitLab account.

### 1-Click Deployment to Netlify

Click the following button to build and deploy your own copy of Composable UI to Netlify:

[![Deploy with Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/composable-com/composable-ui&base=composable-ui#PNPM_FLAGS=--shamefully-hoist)

When prompted, authenticate with GitHub and choose a repository name.
Netlify creates a repository in your GitHub account automatically with a copy of the files from the Composable UI repository, and the new site is built and deployed on Netlify.

## Deploy Composable UI Docs

You can host Composable UI Docs on any hosting service that supports Next.js applications such as Vercel, Netlify, or AWS.

### 1-Click Deployment to Vercel
Use the button below to build and deploy your own copy of Composable UI Docs to Vercel:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%composable-com%2Fcomposable-ui&root-directory=docs&build-command=cd%20docs%20%26%26%20yarn%20build&install-command=cd%20docs%20%26%26%20yarn%20install&project-name=composable-ui-docs&repository-name=composable-ui-docs&demo-title=Composable%20UI%20docs&demo-image=https%3A%2F%2Fstorefront.composable.com%2Fimg%2Fcomposable-ui-docs.png&demo-description=Docs%20for%20Open%20Source%20React%20Storefront%20for%20Composable%20Commerce&demo-url=https%3A%2F%2Fstorefront.composable.com)

### 1-Click Deployment to Netlify
Use the button below to build and deploy your own copy of Composable UI Docs to Netlify:

[![Deploy with Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/composable-com/composable-ui&base=docs#PNPM_FLAGS=--shamefully-hoist)

31 changes: 0 additions & 31 deletions docs/docs/build_and_deploy/deploy_configuration.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/docs/build_and_deploy/docker.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
---

# Running Composable UI in Docker
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/build_and_deploy/local.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 2
---

# Running in Localhost
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/essentials/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If you have deployed Composable UI to Vercel or Netlify, you will need to setup
- [Setting environment variables in Vercel](https://vercel.com/docs/concepts/projects/environment-variables)
- [Setting environment variables in Netlify](https://docs.netlify.com/environment-variables/overview/)

See the Composable UI docs for a [1-click deployment](../build_and_deploy/deploy_configuration.md) to Vercel or Netlify.
See the Composable UI docs for a [1-click deployment](../build_and_deploy/deploy.md) to Vercel or Netlify.
### Want to learn how to setup Algolia?
See the Composable UI [Algolia Integration](../integrations/search/algolia.md) guide.
### Want to learn how to setup Stripe?
Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const config = {
},
{
type: 'doc',
docId: 'build_and_deploy/deploy_configuration',
docId: 'build_and_deploy/deploy',
position: 'left',
label: 'Build & Deploy',
},
Expand Down

2 comments on commit ce402d6

@vercel
Copy link

@vercel vercel bot commented on ce402d6 Sep 27, 2023

Choose a reason for hiding this comment

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

@github-actions
Copy link

Choose a reason for hiding this comment

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

Lines Statements Branches Functions
Coverage: 44%
43.54% (297/682) 23.35% (46/197) 23.23% (33/142)

Please sign in to comment.