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
[Skip CI] Docs: updated docker instructions
Damian Legawiecb9631f3b13b1
diff --git a/docs/developer/deployment/docker.mdx b/docs/developer/deployment/docker.mdxindex 72fbd452fc..f57b7bbfc5 100644--- a/docs/developer/deployment/docker.mdx+++ b/docs/developer/deployment/docker.mdx@@ -8,7 +8,7 @@ Spree (when using Spree Starter template) comes with a Dockerfile that can be usYou 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.+This Dockerfile is pre-configured to run Spree with PostgreSQL database and Redis. 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.@@ -21,36 +21,24 @@ docker build -t spree .## Running the Docker container```bash-docker run -p 3000:3000 spree+docker run -p 3000:3000 -e SECRET_KEY_BASE=... -e DATABASE_URL=... -e REDIS_URL=... 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:+You will need to supply the following environment variables to run the container:| 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...` |+| `SECRET_KEY_BASE` | You can generate this by running `bin/rails secret` | `2fad5c0b79d25e4765d3018d8c740f8c3a665f0e5c...` || `DATABASE_URL` | Database URL, this could be your AWS RDS instance or any other PostgreSQL instance | `postgres://user:pass@localhost:5432/spree` |+| `REDIS_URL` | Redis URL, used for background jobs processing,this could be your AWS ElastiCache instance or any other Redis instance | `redis://localhost:6379/0` |There are also some other environment variables that you can set to customize your Spree application.| Variable | Description | Default value || --- | --- | --- |+| `RAILS_ENV` | Rails environment (production, development, test) | `production` || `RAILS_MAX_THREADS` | Web server (Puma) threads | `3` |+| `REDIS_CACHE_URL` | Redis URL, used for caching, this could be your AWS ElastiCache instance or any other Redis instance (optional, if not provided will use file based cache) | `redis://localhost:6379/1` || `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` |+| `DEVISE_SESSION_TIMEOUT` | Session timeout (in days) | `14` |