Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

[Skip CI] Added dev docs deployment section (#12483)

Damian Legawiec729d73f8ab51
diff --git a/docs/developer/getting-started/adding_spree_to_rails_app.mdx b/docs/developer/advanced/adding_spree_to_rails_app.mdx
similarity index 78%
rename from docs/developer/getting-started/adding_spree_to_rails_app.mdx
rename to docs/developer/advanced/adding_spree_to_rails_app.mdx
index 103ae77d6c..31e5444cb5 100644
--- a/docs/developer/getting-started/adding_spree_to_rails_app.mdx
+++ b/docs/developer/advanced/adding_spree_to_rails_app.mdx
@@ -3,12 +3,8 @@ title: Adding to an existing Rails app
description: This guide will show you how to add Spree to an existing Ruby on Rails application.
---
-<Note>
-If you followed the [Quickstart guide](quickstart) you can skip this page and go to the [Core Concepts](../core-concepts) section.
-</Note>
-
<Warning>
- This guide is aimed at advanced users who want to add Spree to an existing Rails application. If you are new to Spree, please follow the [Quickstart guide](quickstart).
+ This guide is aimed at advanced users who want to add Spree to an existing Rails application. If you are new to Spree, please follow the [Quickstart guide](/getting-started/quickstart).
</Warning>
## Overview
@@ -37,7 +33,7 @@ If you already have a Ruby on Rails application, you can add Spree to it by foll
```
</Accordion>
- <Accordion icon="terminal" title="Run the install generators">
+ <Accordion icon="terminal" title="Run the install generator">
These commands will run generators which will perform operations required for Spree to work properly.
```bash
@@ -46,19 +42,16 @@ If you already have a Ruby on Rails application, you can add Spree to it by foll
### Installation options
- By default, the installation generator (`rails g spree:install`) will run migrations as well as adding seed. This can be disabled using
-
- ```bash
- bin/rails g spree:install --migrate=false --sample=false --seed=false
- ```
+ * `user_class`: The class that you want to use for your users, eg. `Spree::User` or `User`. This class needs to be present in your application.
+ * `authentication`: The authentication gem to use, eg. `devise` or `custom`. Custom will require you to provide your own authentication code.
+ * `install_admin`: Whether to install the Admin Panel.
+ * `install_storefront`: Whether to install the Storefront.
+ * `migrate`: Whether to run migrations.
+ * `sample`: Whether to add sample data (products, taxons, etc).
+ * `seed`: Whether to run the seed file.
+ * `admin_email`: The email of the (first) admin user.
+ * `admin_password`: The password of the (first) admin user.
- You can always perform any of these steps later by using these commands.
-
- ```bash
- bin/rake railties:install:migrations
- bin/rails db:migrate
- bin/rails db:seed
- ```
</Accordion>
<Accordion icon="box" title="Adding sample data">
diff --git a/docs/developer/core-concepts/architecture.mdx b/docs/developer/core-concepts/architecture.mdx
index 618145ded1..5e17e84e30 100644
--- a/docs/developer/core-concepts/architecture.mdx
+++ b/docs/developer/core-concepts/architecture.mdx
@@ -46,9 +46,6 @@ These gems are the core of Spree and they are the most important part of the Spr
<Accordion title="Gateway">
The Gateway module in Spree is responsible for handling payment processing. It integrates with various payment gateways and providers, allowing Spree stores to accept payments from customers through different methods and channels. This module ensures secure and efficient transaction processing, supporting a wide range of payment options to cater to diverse customer preferences.
</Accordion>
- <Accordion title="Auth Devise">
- The Auth Devise module leverages the Devise gem for authentication in Spree. It provides a robust and flexible authentication solution for Spree stores, including features such as user registration, login, password recovery, and more. This module is essential for managing user access and ensuring secure user authentication processes within a Spree store.
- </Accordion>
</AccordionGroup>
### 3rd party Extensions
diff --git a/docs/developer/customization/authentication.mdx b/docs/developer/customization/authentication.mdx
index daea1bb217..7603aae5a8 100644
--- a/docs/developer/customization/authentication.mdx
+++ b/docs/developer/customization/authentication.mdx
@@ -1,6 +1,7 @@
---
title: Authentication
description: Learn how to use a custom authentication setup with Spree
+version: v4
---
This guide covers using a custom authentication setup with Spree, such as one provided by your own application. This is ideal in situations where you want to handle the sign-in or sign-up flow of your application uniquely, outside the realms of what would be possible with Spree or you have an existing authentication with user accounts present.
diff --git a/docs/developer/customization/deface_overrides_tutorial.mdx b/docs/developer/customization/deface_overrides_tutorial.mdx
index 8f362eb22f..d581d66d2d 100644
--- a/docs/developer/customization/deface_overrides_tutorial.mdx
+++ b/docs/developer/customization/deface_overrides_tutorial.mdx
@@ -1,6 +1,7 @@
---
title: Deface Overrides
section: advanced
+version: v4
---
# Deface
diff --git a/docs/developer/customization/images.mdx b/docs/developer/customization/images.mdx
index 965128c038..7f672acfda 100644
--- a/docs/developer/customization/images.mdx
+++ b/docs/developer/customization/images.mdx
@@ -1,5 +1,6 @@
---
title: Images
+version: v4
---
## Overview
diff --git a/docs/developer/deployment/assets.mdx b/docs/developer/deployment/assets.mdx
new file mode 100644
index 0000000000..a2f6ba1388
--- /dev/null
+++ b/docs/developer/deployment/assets.mdx
@@ -0,0 +1,160 @@
+---
+title: Assets
+---
+
+Spree uses [Active Storage](https://guides.rubyonrails.org/active_storage_overview.html) to handle file uploads (eg. product images). By default, Active Storage uses local disk storage for attachments. This isn't suitable for production environments.
+
+For production environments, we recommend using a cloud storage service such as [AWS S3](https://aws.amazon.com/s3/) or [Cloudflare R2](https://www.cloudflare.com/r2/).
+
+## AWS S3
+
+To use Amazon S3 as your storage service, you need to configure the storage in the `config/storage.yml` file.
+
+```yaml
+amazon:
+ service: S3
+ access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
+ secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
+ region: "" # e.g. 'us-east-1'
+ bucket: your_own_bucket-<%= Rails.env %>
+```
+
+You will also need to add the `aws-sdk-s3` gem to your Gemfile.
+
+```ruby
+gem "aws-sdk-s3", require: false
+```
+
+And run `bundle install`.
+
+Now you need to switch the storage service in your `config/environments/production.rb` file.
+
+```ruby
+config.active_storage.service = :amazon
+```
+
+Now you will need to grab the credentials from your AWS S3 bucket and add them to rails credentials by running the following command:
+
+```bash
+EDITOR="code --wait" bin/rails credentials:edit
+```
+
+Add the following credentials:
+
+```yaml
+aws:
+ access_key_id: <your_access_key_id>
+ secret_access_key: <your_secret_access_key>
+ region: <your_region>
+ bucket: <your_bucket>
+```
+
+Save and exit the editor. Remember to commit the changes to your repository.
+
+### CORS Configuration
+
+Spree Admin Dashboard uses direct uploads to handle file uploads. For this to work properly, you need to configure CORS on your S3 bucket.
+
+1. Go to your S3 bucket in AWS Console
+2. Click on "Permissions" tab
+3. Scroll down to "Cross-origin resource sharing (CORS)"
+4. Click "Edit" and paste the following configuration:
+
+```json
+[
+ {
+ "AllowedMethods": ["GET", "PUT", "POST"],
+ "AllowedOrigins": ["https://myspreestore.com"],
+ "AllowedHeaders": ["*"],
+ "ExposeHeaders": ["ETag"]
+ }
+]
+```
+
+<Info>
+`myspreestore.com` should be replaced with your domain name which you access your Spree Admin Dashboard.
+</Info>
+
+## Cloudflare R2
+
+Cloudflare R2 is an S3-compatible, zero egress-fee, object storage with a built-in CDN. We strongly recommend using it as your storage service.
+
+To use Cloudflare R2 as your storage service, you need to configure the storage in the `config/storage.yml` file.
+
+```yaml
+cloudflare:
+ service: S3
+ endpoint: <%= Rails.application.credentials.dig(:cloudflare, :endpoint) %>
+ access_key_id: <%= Rails.application.credentials.dig(:cloudflare, :access_key_id) %>
+ secret_access_key: <%= Rails.application.credentials.dig(:cloudflare, :secret_access_key) %>
+ region: auto
+ bucket: <%= Rails.application.credentials.dig(:cloudflare, :bucket) %>
+```
+
+You will also need to add the `aws-sdk-s3` gem to your Gemfile.
+
+```ruby
+gem "aws-sdk-s3", require: false
+```
+
+And run `bundle install`.
+
+Now you need to switch the storage service in your `config/environments/production.rb` file.
+
+```ruby
+config.active_storage.service = :cloudflare
+```
+
+Now you will need to grab the credentials from your Cloudflare R2 bucket and add them to rails credentials by running the following command:
+
+```bash
+EDITOR="code --wait" bin/rails credentials:edit
+```
+
+Add the following credentials:
+
+```yaml
+cloudflare:
+ endpoint: <your_endpoint>
+ access_key_id: <your_access_key_id>
+ secret_access_key: <your_secret_access_key>
+ bucket: <your_bucket>
+```
+
+Save and exit the editor. Remember to commit the changes to your repository.
+
+### CORS Configuration
+
+Spree Admin Dashboard uses direct uploads to handle file uploads. For this to work properly, you need to configure CORS on your R2 bucket.
+
+1. Go to your R2 bucket in Cloudflare Console
+2. Click on "Settings" tab
+3. Scroll down to "CORS policy"
+4. Click "Edit CORS policy" and paste the following configuration:
+
+```json
+[
+ {
+ "AllowedOrigins": [
+ "https://myspreestore.com"
+ ],
+ "AllowedMethods": [
+ "PUT"
+ ],
+ "AllowedHeaders": [
+ "*"
+ ],
+ "ExposeHeaders": [
+ "Origin",
+ "Content-Type",
+ "Content-MD5",
+ "Content-Disposition"
+ ],
+ "MaxAgeSeconds": 3600
+ }
+]
+```
+
+<Info>
+`myspreestore.com` should be replaced with your domain name which you access your Spree Admin Dashboard.
+</Info>
\ No newline at end of file
diff --git a/docs/developer/deployment/caching.mdx b/docs/developer/deployment/caching.mdx
new file mode 100644
index 0000000000..c4d85b3e9b
--- /dev/null
+++ b/docs/developer/deployment/caching.mdx
@@ -0,0 +1,73 @@
+---
+description: >-
+ This guide will cover all sorts of topics related to Spree application
+ performance
+---
+
+Caching is a great way to improve the performance of your Spree application. In all modern web applications, usually the most time consuming operations are database queries and rendering templates. Caching allows you to store the results of these operations in memory and serve them from there.
+
+We recommend using a distributed cache storage engine such as [Solid Cache](https://github.com/rails/solid_cache), Memcached or Redis. Spree Starter uses Solid Cache by default as it doesn't require any additional setup or services to be installed.
+
+## Setting up `solid_cache` as a cache storage engine
+
+<Info>
+If you're using Spree Starter, you don't need to do anything as it's already pre-configured for you.
+</Info>
+
+Firstly add `solid_cache` to your project
+
+```bash
+bundle add solid_cache
+```
+
+And run the installation script:
+
+```bash
+bin/rails solid_cache:install
+```
+
+Now, you will need to change the `config/environments/production.rb` from:
+
+```ruby
+# config.cache_store = :mem_cache_store
+```
+
+to:
+
+```ruby
+config.cache_store = :solid_cache_store
+```
+
+## Testing locally
+
+To enable caching in the development environment please type in your project directory:
+
+```bash
+bin/rails dev cache
+```
+
+You will need to restart your webserver after this.
+
+## API cache
+
+<Info>
+Changing Spree API cache is only required for applications heavily using the API. The default configuration is already optimized for the most common use cases.
+</Info>
+
+Additionally Spree API has a built-in caching mechanism. It's enabled by default and you don't need to do anything to enable it. You can however tweak it to your needs.
+
+The default cache TTL is 1 hour. You can change it by setting `Spree::Api::Config[:api_v2_serializers_cache_ttl]` in `config/initializers/spree.rb`, eg.
+
+```ruby
+Spree::Api::Config[:api_v2_serializers_cache_ttl] = 3600 # 1 hour
+```
+
+This is the setting for caching individual objects (serializers), eg. Products, Orders, etc.
+
+We also have a setting for caching collections of objects (serializers), eg. Product listings. It's `Spree::Api::Config[:api_v2_collection_cache_ttl]`.
+
+```ruby
+Spree::Api::Config[:api_v2_collection_cache_ttl] = 3600 # 1 hour
+```
+
+After modifying the settings, you will need to restart your webserver.
diff --git a/docs/developer/deployment/cdn.mdx b/docs/developer/deployment/cdn.mdx
new file mode 100644
index 0000000000..7340cb93d5
--- /dev/null
+++ b/docs/developer/deployment/cdn.mdx
@@ -0,0 +1,39 @@
+---
+title: CDN
+description: >-
+ Learn how to improve performance of your Spree application by using a CDN (Content Delivery Network).
+---
+
+To improve performance of your Spree application, we recommend using a CDN (Content Delivery Network) to cache images and static files.
+
+We recommend using [Cloudflare](https://www.cloudflare.com/) as your CDN provider. It's free and simple to setup.
+
+After setting up your Cloudflare account and adding your domain name to Cloudflare, you will need to set your cache settings.
+
+Go to your domain name in Cloudflare and click on "Caching" tab and select "Cache Rules".
+
+![Cloudflare Cache Rules](/images/developer/deployment/cloudflare_caching.png)
+
+Click on "Create Rule" and setup the rule as bellow:
+
+![Cloudflare Cache Rule Settings](/images/developer/deployment/cloudflare_cache_rule_1.png)
+
+Supply the first value with
+
+```url
+/rails/active_storage/representations/
+```
+
+and the second value with
+
+```url
+/assets
+```
+
+This will handle caching of both images and static files such as JavaScript and CSS files.
+
+Now scroll down and set the settings as bellow:
+
+![Cloudflare Cache Rule Settings](/images/developer/deployment/cloudflare_cache_rule_2.png)
+
+Finally, click on "Deploy" and you are done!
\ No newline at end of file
diff --git a/docs/developer/deployment/docker.mdx b/docs/developer/deployment/docker.mdx
new file mode 100644
index 0000000000..130da22be0
--- /dev/null
+++ b/docs/developer/deployment/docker.mdx
@@ -0,0 +1,55 @@
+---
+title: Docker
+description: Learn how to build a Docker image of your Spree application.
+---
+
+Spree (when using Spree Starter template) comes with a Dockerfile that can be used to build a Docker image of your application.
+
+You can find the Dockerfile in the [Dockerfile](https://github.com/spree/spree_starter/blob/main/Dockerfile) file in the root of the project or in the Spree Starter repository.
+
+This Dockerfile is pre-configured to run Spree with PostgreSQL database. That's the only external dependency you need to have installed on your machine to be able to run Spree.
+
+You can later use that image to run your application in a containerized environment eg. AWS ECS, AWS Fargate, Azure Container Instances, etc.
+
+## Building the Docker image
+
+```bash
+docker build -t spree .
+```
+
+## Running the Docker container
+
+```bash
+docker run -p 3000:3000 spree
+```
+
+You can also run the container with a specific environment variable by using `-e` flag.
+
+```bash
+docker run -e RAILS_ENV=production spree
+```
+
+### Environment variables
+
+You can set environment variables by using `-e` flag when running the container.
+
+```bash
+docker run -e RAILS_ENV=production -e RAILS_MASTER_KEY=... -e DATABASE_URL=... spree
+```
+
+You will need to set the following environment variables:
+
+| Variable | Description | Example |
+| --- | --- | --- |
+| `RAILS_ENV` | Rails environment (production, development, test) | `production` |
+| `RAILS_MASTER_KEY` | This should be the contents of your `config/master.key` file | `2fad5c0b79d25e4765d3018d8c740f8c3a665f0e5c...` |
+| `DATABASE_URL` | Database URL, this could be your AWS RDS instance or any other PostgreSQL instance | `postgres://user:pass@localhost:5432/spree` |
+
+There are also some other environment variables that you can set to customize your Spree application.
+
+| Variable | Description | Default value |
+| --- | --- | --- |
+| `RAILS_MAX_THREADS` | Web server (Puma) threads | `3` |
+| `PORT` | Web server port | `3000` |
+| `RAILS_LOG_LEVEL` | Log level, you can switch it to `debug` to see more detailed logs | `info` |
+| `DEVISE_SESSION_TIMEOUT` | Session timeout in days | `14` |
diff --git a/docs/developer/deployment/heroku.mdx b/docs/developer/deployment/heroku.mdx
index a464db7387..4bc91d0c19 100644
--- a/docs/developer/deployment/heroku.mdx
+++ b/docs/developer/deployment/heroku.mdx
@@ -1,7 +1,6 @@
---
title: Heroku
section: deployment
-order: 1
---
# Heroku
@@ -41,11 +40,6 @@ There are 2 types of dynos:
| Bucketeer | Hobbyist | Micro |
| Edge | Hobby | Micro |
| Heroku Postgres | Hobby Basic | Standard-0 |
-| Heroku Scheduler | N/A | N/A |
-| Memcached Cloud | Free | 1 GB |
-| Papertrail | Choklad | Fixa |
-| Redis Cloud | Free | 250 MB |
-| Scout APM | Free | Free small traffic or Eldora medium traffic |
| Sendgrid | Free | Bronze |
| Sentry | Free | Small |
diff --git a/docs/developer/deployment/performance.mdx b/docs/developer/deployment/performance.mdx
deleted file mode 100644
index f97c2b36fd..0000000000
--- a/docs/developer/deployment/performance.mdx
+++ /dev/null
@@ -1,58 +0,0 @@
----
-description: >-
- This guide will cover all sorts of topics related to Spree application
- performance
----
-
-# Performance
-
-## Application
-
-### API
-
-#### OJ gem
-
-We strongly recommend adding [OJ gem](https://github.com/ohler55/oj) to your application.
-
-If you're using [Spree Starter](https://github.com/spree/spree_starter) this gem is already pre-installed and pre-configured. If you're not using Spree Starter you can easily add it yourself - please see this [git commit](https://github.com/spree/spree_starter/commit/e50973be8e8833f5d6eeaa0226f322746a860cd2).
-
-#### Caching configuration
-
-There are several configuration options you can put in `config/initializers/spree.rb` to adjust API caching configuration:
-
-```ruby
-Spree::Api::Config[:api_v2_cache_ttl] = 3600 # TTL for cached resources in seconds
-```
-
-This is the time when API objects will be available in cache storage. Objects such as Products also auto-expire when they are updated or one of their associated resources eg. Variants are updated also.
-
-### Background jobs
-
-Sending emails, parsing big amounts of data - it's not recommended to do it in the web process.
-
-We recommend setting up ActiveJob adapter such as [Solid Queue](https://github.com/basecamp/solid_queue) or [Sidekiq](https://github.com/mperham/sidekiq/wiki/Active-Job). Spree Starter users don't need to do anything as it's already pre-configured for them (with Solid Queue).
-
-### Testing locally
-
-To enable caching in the development environment please type in your project directory:
-
-```bash
-bin/rails dev cache
-```
-
-After that, you will need to restart your webserver / or stop/start docker-compose.
-
-## Infrastructure
-
-### Cache storage engine
-
-We recommend using a distributed cache storage engine such as [Solid Cache](https://github.com/rails/solid_cache), Memcached or Redis. Spree Starter uses Solid Cache by default as it
-doesn't require any additional setup or services to be installed.
-
-#### Memcached
-
-Please see the configuration options [detailed in Rails Guides](https://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-memcachestore).
-
-#### Redis
-
-Please see the configuration options [detailed in Rails Guides](https://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-rediscachestore).
\ No newline at end of file
diff --git a/docs/developer/deployment/render.mdx b/docs/developer/deployment/render.mdx
new file mode 100644
index 0000000000..9af3a1f8d0
--- /dev/null
+++ b/docs/developer/deployment/render.mdx
@@ -0,0 +1,147 @@
+---
+title: Render
+description: Deploy your Spree application to [Render.com](https://render.com) Platform as a Service platform
+---
+
+## Overview
+
+Render is a Platform as a Service that makes deploying and hosting Spree applications super easy.
+
+Spree Starter is pre-configured to work with Render out of the box. It includes [render.yaml](https://github.com/spree/spree_starter/blob/main/render.yaml) file that is used to deploy the application.
+
+## Prerequisites
+
+- [Render account](https://render.com) - you will also need to add a credit card to your Render account to be able to deploy the application.
+- [GitHub account](https://github.com)
+
+## Setup repository
+
+Firstly create your own repository based on Spree Starter template.
+
+Go to [Spree Starter repository](https://github.com/spree/spree_starter) and click on "Use this template" button and select "Create a new repository".
+
+<img src="/images/spree_starter_create_repo.png" width="300" />
+
+Supply the repository name and click on "Create repository from template" button.
+
+![Create repository from template](/images/developer/deployment/github_setup_private_repo.png)
+
+<Warning>
+Make sure to set your repository visibility to "Private" so no one can see your code. This is crucial for your application security.
+</Warning>
+
+Now clone the repository to your local machine.
+
+```bash
+git clone https://github.com/your-username/my_spree_app.git
+```
+
+Now you can start working on your application. Make sure your environment is set up correctly (follow the [Getting Started](/developer/getting_started) guide).
+
+Running the `bin/setup` script should set your credentials correctly.
+
+![Setup credentials](/images/developer/deployment/setup_credentials.png)
+
+<Warning>
+Don't loose your `config/master.key` file or share it with anyone. It's crucial for your application to work. We recommend to add it to 1password or other password manager.
+</Warning>
+
+Now add your `config/credentials.yml.enc` file to the repository.
+
+```bash
+git add config/credentials.yml.enc
+```
+
+Commit the changes.
+
+```bash
+git commit -m "Add credentials"
+git push
+```
+
+This file is encrypted and cannot be seen by anyone without the `master.key` file.
+
+<Warning>
+Don't commit your `master.key` file to the repository!
+</Warning>
+
+<Info>
+You can learn more about credentials in the [Ruby on Rails Security Guide](https://guides.rubyonrails.org/security.html#custom-credentials).
+</Info>
+
+## Create Render account and connect your repository
+
+Go to [render.com](https://render.com) and create an account. We recommend to use your GitHub account to sign up as it will automatically link your GitHub repositories to Render.
+
+## Create Render blueprint
+
+[Render blueprints](https://render.com/docs/blueprint-spec) are YAML files used to deploy your application to Render. They consist a list of services that are required to run your application.
+
+In the Render dashboard select "New blueprint" from the "+New" button.
+
+<img src="/images/developer/deployment/render_new_blueprint.png" width="200" />
+
+Now select your repository from the list of repositories.
+
+![Render select repository](/images/developer/deployment/render_select_repo.png)
+
+You should see the the new blueprint form.
+
+![Render services](/images/developer/deployment/render_deploy_blueprint.png)
+
+1. Set your blueprint name - eg. `Spree App`
+2. Copy your `config/master.key` file to the clipboard.
+
+ ```bash
+ cat config/master.key | pbcopy
+ ```
+
+3. Paste it to the `RAILS_MASTER_KEY` environment variable.
+
+After that is done click the "Deploy Blueprint" button. Now wait a few minutes for Render to setup your application.
+
+You should see the following screen with the list of created services.
+
+![Render deploy blueprint](/images/developer/deployment/render_created_services.png)
+
+That's it! Your application is now deployed to Render.
+
+You can now access the admin dashboard of your application at the following URL.
+
+```url
+https://<your-application-name>.onrender.com/admin
+```
+
+The default credentials are:
+
+```
+Password: password
+```
+
+<Warning>
+We recommend changing credentials after logging in! You can also do it from the Rails console. In your Render dashboard select your `web` service and click on the "Shell" tab.
+
+<img src="/images/developer/deployment/render_shell.png" width="200" />
+
+Now you can open the Rails console by running `bin/rails console`.
+
+```ruby
+Spree::User.first.update!(email: "<[email protected]>", password: "<your_password>", password_confirmation: "<your_password>")
+```
+</Warning>
+
+<Info>
+Render will automatically any new changes you push to your repository.
+</Info>
+
+## Next steps
+
+Now that your application is deployed, you also need to setup asset storage as Render only provides ephemeral storage.
+
+- [Setup Asset storage](/developer/deployment/assets) (Amazon S3/Cloudflare R2)
+
+Before going to full production, we recommend to also:
+
+- [Setup CDN](/developer/deployment/cdn)
+- [Configure Caching](/developer/deployment/caching)
diff --git a/docs/images/developer/deployment/cloudflare_cache_rule_1.png b/docs/images/developer/deployment/cloudflare_cache_rule_1.png
new file mode 100644
index 0000000000..4b97e89662
Binary files /dev/null and b/docs/images/developer/deployment/cloudflare_cache_rule_1.png differ
diff --git a/docs/images/developer/deployment/cloudflare_cache_rule_2.png b/docs/images/developer/deployment/cloudflare_cache_rule_2.png
new file mode 100644
index 0000000000..4f988c5966
Binary files /dev/null and b/docs/images/developer/deployment/cloudflare_cache_rule_2.png differ
diff --git a/docs/images/developer/deployment/cloudflare_caching.png b/docs/images/developer/deployment/cloudflare_caching.png
new file mode 100644
index 0000000000..0675d64b4e
Binary files /dev/null and b/docs/images/developer/deployment/cloudflare_caching.png differ
diff --git a/docs/images/developer/deployment/github_setup_private_repo.png b/docs/images/developer/deployment/github_setup_private_repo.png
new file mode 100644
index 0000000000..107acaf3c4
Binary files /dev/null and b/docs/images/developer/deployment/github_setup_private_repo.png differ
diff --git a/docs/images/developer/deployment/render_created_services.png b/docs/images/developer/deployment/render_created_services.png
new file mode 100644
index 0000000000..f57196ff8b
Binary files /dev/null and b/docs/images/developer/deployment/render_created_services.png differ
diff --git a/docs/images/developer/deployment/render_deploy_blueprint.png b/docs/images/developer/deployment/render_deploy_blueprint.png
new file mode 100644
index 0000000000..1ffea1da78
Binary files /dev/null and b/docs/images/developer/deployment/render_deploy_blueprint.png differ
diff --git a/docs/images/developer/deployment/render_new_blueprint.png b/docs/images/developer/deployment/render_new_blueprint.png
new file mode 100644
index 0000000000..e0760f6f44
Binary files /dev/null and b/docs/images/developer/deployment/render_new_blueprint.png differ
diff --git a/docs/images/developer/deployment/render_select_repo.png b/docs/images/developer/deployment/render_select_repo.png
new file mode 100644
index 0000000000..1300106830
Binary files /dev/null and b/docs/images/developer/deployment/render_select_repo.png differ
diff --git a/docs/images/developer/deployment/render_shell.png b/docs/images/developer/deployment/render_shell.png
new file mode 100644
index 0000000000..7537271bfc
Binary files /dev/null and b/docs/images/developer/deployment/render_shell.png differ
diff --git a/docs/images/developer/deployment/setup_credentials.png b/docs/images/developer/deployment/setup_credentials.png
new file mode 100644
index 0000000000..2d1d5dbf11
Binary files /dev/null and b/docs/images/developer/deployment/setup_credentials.png differ
diff --git a/docs/images/spree_starter_create_repo.png b/docs/images/spree_starter_create_repo.png
new file mode 100644
index 0000000000..5d823769aa
Binary files /dev/null and b/docs/images/spree_starter_create_repo.png differ
diff --git a/docs/mint.json b/docs/mint.json
index 6cb9c140c9..c7e1556580 100644
--- a/docs/mint.json
+++ b/docs/mint.json
@@ -75,8 +75,7 @@
{
"group": "Getting started",
"pages": [
- "developer/getting-started/quickstart",
- "developer/getting-started/adding_spree_to_rails_app"
+ "developer/getting-started/quickstart"
]
},
{
@@ -119,6 +118,17 @@
]
},
+ {
+ "group": "Deployment",
+ "pages": [
+ "developer/deployment/render",
+ "developer/deployment/docker",
+ "developer/deployment/assets",
+ "developer/deployment/cdn",
+ "developer/deployment/caching"
+ ]
+ },
+
{
"group": "Upgrading",
"pages": [
@@ -159,6 +169,12 @@
"developer/contributing/creating-an-extension"
]
},
+ {
+ "group": "Advanced",
+ "pages": [
+ "developer/advanced/adding_spree_to_rails_app"
+ ]
+ },
{
"group": "API basics",