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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Add Render deploy option to docs and README
Damian Legawiecc64c0c065f43
diff --git a/README.md b/README.mdindex 7e019b19a6..c1def60f5f 100755--- a/README.md+++ b/README.md@@ -40,6 +40,12 @@ npx create-spree-app@latest my-storeYou need to have Node.js (22+) installed and Docker running.+Or deploy directly to the cloud:++[](https://render.com/deploy?repo=https://github.com/spree/spree-starter)++> **Note:** This uses Render's free plan for quick evaluation. Free instances spin down after inactivity and may take 30-60s to wake up. For production, see [recommended sizing](https://spreecommerce.org/docs/developer/deployment/render#production-sizing).+If you prefer to install Spree manually, you may follow the [Quickstart Guide](https://spreecommerce.org/docs/developer/getting-started/quickstart).If you like what you see, consider giving Spree a GitHub star :star:diff --git a/docs/developer/deployment/environment_variables.mdx b/docs/developer/deployment/environment_variables.mdxindex e127f60ce8..e55f43c5cd 100644--- a/docs/developer/deployment/environment_variables.mdx+++ b/docs/developer/deployment/environment_variables.mdx@@ -11,7 +11,8 @@ These variables are required to run Spree in production.| Variable | Description | Example || --- | --- | --- || `DATABASE_URL` | PostgreSQL connection URL | `postgres://user:pass@localhost:5432/spree` |-| `REDIS_URL` | Redis URL for background jobs (Sidekiq), caching, and Action Cable | `redis://localhost:6379/0` |+| `REDIS_URL` | Redis URL for background jobs (Sidekiq) and Action Cable | `redis://localhost:6379/0` |+| `REDIS_CACHE_URL` | Redis URL for caching (optional — falls back to `REDIS_URL`) | `redis://localhost:6380/0` || `SECRET_KEY_BASE` | Secret key for session encryption. Generate with `bin/rails secret` | `2fad5c0b79d25e4765d3018d8c740f8c3a665f0e5c...` |## Email (SMTP)diff --git a/docs/developer/deployment/render.mdx b/docs/developer/deployment/render.mdxindex ae7bdc5ebf..d1fd13b57c 100644--- a/docs/developer/deployment/render.mdx+++ b/docs/developer/deployment/render.mdx@@ -1,119 +1,95 @@---title: Render-description: Deploy your Spree application to [Render.com](https://render.com) Platform as a Service platform+description: Deploy Spree to Render with one click.----## Overview+## One-Click Deploy-Render is a Platform as a Service that makes deploying and hosting Spree applications super easy.+The fastest way to get Spree running on Render:-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.+[](https://render.com/deploy?repo=https://github.com/spree/spree-starter)-## 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.----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/quickstart) guide).+This creates all required services automatically:-Running the `bin/setup` script should set your `SECRET_KEY_BASE` environment variable correctly in the `.env` file.+- **Web** — Rails app serving the API and admin panel+- **Worker** — Sidekiq for background jobs+- **PostgreSQL** — database+- **Redis** — caching, jobs, Action Cable-<Warning>-Don't share your `.env` file with anyone!-</Warning>+The database is seeded on first deploy. Your store is ready in a few minutes.-## 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.+## Prerequisites-<img src="/images/developer/deployment/render_new_blueprint.png" />+- [Render account](https://render.com) with a credit card on file+- [GitHub account](https://github.com)-Now select your repository from the list of repositories.+## Custom Deployment-+If you need to customize the backend (add gems, models, etc.), start from the [Spree Starter](https://github.com/spree/spree-starter) template:-You should see the the new blueprint form.+1. Go to [spree/spree-starter](https://github.com/spree/spree-starter) and click **Use this template** > **Create a new repository**-+2. Clone your new repository and make your changes-1. Set your blueprint name - eg. `Spree App`-2. Generate a new `SECRET_KEY_BASE` value.+3. In the Render dashboard, click **New** > **Blueprint** and select your repository- ```bash- bin/rails secret- ```+4. Render reads the `render.yaml` from your repo and creates all services. Review and click **Deploy Blueprint**.-3. Paste it to the `SECRET_KEY_BASE` environment variable for both `web` and `worker` services (it needs to be the same value for both).+The included [`render.yaml`](https://github.com/spree/spree-starter/blob/main/render.yaml) handles:+- Build: `bundle install`, asset precompilation, `db:prepare`, `db:seed`+- Web: Puma with health check on `/up`+- Worker: Sidekiq with shared `SECRET_KEY_BASE`+- PostgreSQL 18 and Redis-After that is done click the "Deploy Blueprint" button. Now wait a few minutes for Render to setup your application.+## After Deployment-You should see the following screen with the list of created services.+### Admin Dashboard-+Access your admin panel at:-That's it! Your application is now deployed to Render.+```+https://<your-app-name>.onrender.com/admin+```-You can now access the admin dashboard of your application at the following URL.+Default credentials are created during `db:seed`. Change them immediately after first login.-```url-https://<your-application-name>.onrender.com/admin-```+### Environment Variables-The default credentials are:+Render sets `DATABASE_URL`, `REDIS_URL`, and `SECRET_KEY_BASE` automatically from the blueprint. For additional configuration (SMTP, file storage, Sentry, etc.), see [Environment Variables](/developer/deployment/environment_variables).-```-Email: [email protected]-Password: password-```+## Production Sizing-<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.+The free/starter plans work for trying Spree. For production workloads, we recommend:-<img src="/images/developer/deployment/render_shell.png" width="200" />+| Service | Plan | Resources | Auto-scaling |+|---|---|---|---|+| **Web** | Pro | 4 GB RAM, 2 CPU | 2–3 instances |+| **Worker** | Standard | 2 GB RAM, 1 CPU | — |+| **PostgreSQL** | Pro 4 GB | 4 GB RAM, 1 CPU | — |+| **Redis** (jobs) | Standard | 1 GB RAM | — |+| **Redis** (cache) | Standard | 1 GB RAM | — |-Now you can open the Rails console by running `bin/rails console`.+To enable auto-scaling, add this to the web service in your `render.yaml`:-```ruby-Spree.admin_user_class.first.update!(email: "<[email protected]>", password: "<your_password>", password_confirmation: "<your_password>")+```yaml+- type: web+ name: spree+ plan: pro+ scaling:+ minInstances: 2+ maxInstances: 3+ targetMemoryPercent: 80+ targetCPUPercent: 80```-</Warning>--<Info>-Render will automatically any new changes you push to your repository.-</Info>-## Next steps+## Next Steps-Now that your application is deployed, you also need to setup asset storage as Render only provides ephemeral storage.+Render provides ephemeral storage — uploaded files (product images, etc.) won't persist across deploys. Set up cloud storage:-- [Setup Asset storage](/developer/deployment/assets) (Amazon S3/Cloudflare R2)+- [Asset Storage](/developer/deployment/assets) (Amazon S3 / Cloudflare R2)-Before going to full production, we recommend to also:+Before going to production:-- [Set optional environment variables](/developer/deployment/environment_variables)-- [Setup CDN](/developer/deployment/cdn)-- [Configure Caching](/developer/deployment/caching)+- [Set environment variables](/developer/deployment/environment_variables) (SMTP, SSL, etc.)+- [Configure CDN](/developer/deployment/cdn)+- [Configure caching](/developer/deployment/caching)diff --git a/docs/docs.json b/docs/docs.jsonindex c90a132dfb..efb68a0367 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -289,6 +289,7 @@"icon": "server","pages": ["developer/deployment/docker",+ "developer/deployment/render","developer/deployment/environment_variables","developer/deployment/caching","developer/deployment/assets",diff --git a/docs/images/developer/deployment/github_setup_private_repo.png b/docs/images/developer/deployment/github_setup_private_repo.pngdeleted file mode 100644index ed74507a1a..0000000000Binary files a/docs/images/developer/deployment/github_setup_private_repo.png and /dev/null differdiff --git a/docs/images/developer/deployment/render_created_services.png b/docs/images/developer/deployment/render_created_services.pngdeleted file mode 100644index bf6c89f225..0000000000Binary files a/docs/images/developer/deployment/render_created_services.png and /dev/null differdiff --git a/docs/images/developer/deployment/render_deploy_blueprint.png b/docs/images/developer/deployment/render_deploy_blueprint.pngdeleted file mode 100644index bf5fee92d2..0000000000Binary files a/docs/images/developer/deployment/render_deploy_blueprint.png and /dev/null differdiff --git a/docs/images/developer/deployment/render_new_blueprint.png b/docs/images/developer/deployment/render_new_blueprint.pngdeleted file mode 100644index 6962946b31..0000000000Binary files a/docs/images/developer/deployment/render_new_blueprint.png and /dev/null differdiff --git a/docs/images/developer/deployment/render_select_repo.png b/docs/images/developer/deployment/render_select_repo.pngdeleted file mode 100644index 4b5dfbdb0d..0000000000Binary files a/docs/images/developer/deployment/render_select_repo.png and /dev/null differdiff --git a/docs/images/developer/deployment/render_shell.png b/docs/images/developer/deployment/render_shell.pngdeleted file mode 100644index 689c52e58b..0000000000Binary files a/docs/images/developer/deployment/render_shell.png and /dev/null differdiff --git a/docs/images/developer/deployment/setup_credentials.png b/docs/images/developer/deployment/setup_credentials.pngdeleted file mode 100644index 2d1d5dbf11..0000000000Binary files a/docs/images/developer/deployment/setup_credentials.png and /dev/null differ