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 Deployment section
Damian Legawiec327d6dcdfef6
diff --git a/guides/src/content/developer/5_deployment/aws.md b/guides/src/content/developer/5_deployment/aws.mdnew file mode 100644index 0000000000..de94755451--- /dev/null+++ b/guides/src/content/developer/5_deployment/aws.md@@ -0,0 +1,33 @@+---+title: Amazon Web Services (AWS)+section: deployment+order: 0+---++Amazon Web Services offers reliable, scalable, and inexpensive cloud computing services. Free to join, pay only for what you use.++AWS is also one of the most popular choices for hosting a Spree application. There are several services you can use to host Spree on AWS, here we're briefly touch upon those options.++## AWS Elastic Beanstalk++The easiest way to run Spree or any other Ruby on Rails application on AWS is through AWS Elastic Beanstalk which is comparable to Heroku PaaS (Platform as a Service).++This is the recommended approach if you're just starting up. Please follow [Beanstalk Deployment guide](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ruby-rails-tutorial.html) for more details.++## AWS ECS++Another option is [Elastic Container Service](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html) to host and deploy your Docker containers.++This is more advanced than Beanstalk and will require DevOps knowledge. For building Docker images we recommend you use [Spree Starter Dockerfile](https://github.com/spree/spree_starter/blob/main/Dockerfile.production).++## AWS EC2++[EC2](https://aws.amazon.com/ec2/) is the most basic offering, running a single or multiple instances of servers. This is the bare bones variant, you need to setup the deployment all by yourself using tools like [Capistrano](https://capistranorb.com/).++## Recommended AWS services++* [AWS S3](https://aws.amazon.com/s3/) - object storage service to store and read your uploaded files such as Product images etc. We **do not recommend** keeping your uploads on the same instance as the application.+* [AWS RDS](https://aws.amazon.com/rds/) - Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. Spree works great with multiple databases: [Amazon Aurora (both MySQL and PostgreSQL variants)](https://aws.amazon.com/rds/aurora/), [RDS PostgreSQL](https://aws.amazon.com/rds/postgresql/), [RDS MySQL](https://aws.amazon.com/rds/mysql/) and [RDS MariaDB](https://aws.amazon.com/rds/mariadb/)+* [AWS ElastiCache Redis](https://aws.amazon.com/elasticache/redis/?nc=sn&loc=2&dn=1) - we recommend setting up a Redis database for [Active Job background queue](https://guides.rubyonrails.org/active_job_basics.html), which we use for sending out transactional emails+* [AWS ElastiCache Memcached](https://aws.amazon.com/elasticache/memcached/?nc=sn&loc=2&dn=1) - we recommend using [Memcached as a cache storage](https://guides.rubyonrails.org/caching_with_rails.html) to increase performance and scalability of your Spree application+* [AWS CloudFront](https://aws.amazon.com/cloudfront/) - fast content delivery network (CDN) to speed up your asset (images/stylesheets/javascripts) delivery. This will greatly enhance your application responsiveness.diff --git a/guides/src/content/developer/5_deployment/docker.md b/guides/src/content/developer/5_deployment/docker.mdnew file mode 100644index 0000000000..991ce2d351--- /dev/null+++ b/guides/src/content/developer/5_deployment/docker.md@@ -0,0 +1,6 @@+---+title: Docker+section: deployment+order: 2+hidden: true+---diff --git a/guides/src/content/developer/5_deployment/heroku.md b/guides/src/content/developer/5_deployment/heroku.mdnew file mode 100644index 0000000000..df4430cbbb--- /dev/null+++ b/guides/src/content/developer/5_deployment/heroku.md@@ -0,0 +1,58 @@+---+title: Heroku+section: deployment+order: 1+---++## Overview++Heroku is a Platform as a Service that makes deploying and hosting Spree applications super easy.++You should just follow [Heroku Rails 6 guide](https://devcenter.heroku.com/articles/getting-started-with-rails6).++We recommend you start and stick to Heroku if you do not have DevOps-skilled team members. [Spree Starter](https://github.com/spree/spree_starter) is pre-configured to work with Heroku out of the box.++## Dynos++[Heroku Dynos](https://www.heroku.com/dynos) are lightweight, isolated environments that provide compute and run yuor application.++There's 2 type of dynos:++* Web - for running the web interface of yuour Store (Storefront, API, Admin Panel)+* Worker - for running background jobs via [Active Job](https://guides.rubyonrails.org/active_job_basics.html) such as email send out, report generation, etc++### Recommended sizing++Dynos | Staging environment | Production environment+--- | --- | ---+**web** | 1 x Standard-2x | 1 x Standard-2x (small traffic) or 1 x Performance-M (medium traffic)+**worker** | 1 x Standard-1x | 1 x Standard-1x++## Add-Ons++[Heroku Add-Ons](https://elements.heroku.com/addons) are tools and services for developing, extending, and operating your app.++### Recommended Add-Ons and plans++Plan | Staging environment | Production environment+--- | --- | ---+Bucketeer | Hobbyist |Micro+Edge | Hobby | Micro+Heroku Postgres | Hobby Basic | Standard-0+Heroku Scheduler | N/A | N/A |+Memcached Cloud | Free | 100 MB+Papertrail | Choklad | Fixa+Redis Cloud | Free | 100 MB+Scout APM | Free | Free (small traffic) or Eldora (medium traffic)+Sendgrid | Free | Bronze+Sentry | Free | Small++## Other resources++* https://devcenter.heroku.com/categories/reference++* https://devcenter.heroku.com/articles/getting-started-with-rails6++* https://devcenter.heroku.com/categories/monitoring-metrics++* https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-serverdiff --git a/guides/src/content/developer/5_deployment/index.md b/guides/src/content/developer/5_deployment/index.mdnew file mode 100644index 0000000000..62570c152e--- /dev/null+++ b/guides/src/content/developer/5_deployment/index.md@@ -0,0 +1,10 @@+---+title: Deployment+section: deployment+---++Spree currently is not a SaaS (Software-as-a-Service) aplication, you need to self-host it. However there are no limitations to what hosting provider or type you can choose from. You can run Spree in the cloud (AWS, Microsoft Azure, Google Cloud, etc), VPS (DigitalOcean, etc) or dedicated servers.++Spree is a Ruby on Rails application and all resources / guides that cover Ruby on Rails are applicable to Spree as well.++In this section we've provided some resources and guidelines for popular services to help you with your Spree hosting and deployment issues.diff --git a/guides/src/content/developer/5_deployment/other.md b/guides/src/content/developer/5_deployment/other.mdnew file mode 100644index 0000000000..39d8e4f247--- /dev/null+++ b/guides/src/content/developer/5_deployment/other.md@@ -0,0 +1,5 @@+---+title: Other+section: deployment+hidden: true+---