Spree Starter uses several environment variables to configure the application.

Required environment variables

This variables are required to run Spree Starter.

VariableDescriptionExample
DATABASE_URLDatabase URL, this could be your AWS RDS instance or any other PostgreSQL instancepostgres://user:pass@localhost:5432/spree
REDIS_URLRedis URL, used for background jobs processing,this could be your AWS ElastiCache instance or any other Redis instanceredis://localhost:6379/0
SECRET_KEY_BASEYou can generate this by running bin/rails secret2fad5c0b79d25e4765d3018d8c740f8c3a665f0e5c...

Optional environment variables

There are also some other environment variables that you can set to customize your Spree application.

VariableDescriptionDefault valueExample
DEVISE_SESSION_TIMEOUTSession timeout (in days)1430
GOOGLE_PLACES_API_KEYGoogle Places API key (optional, used on checkout for address autocomplete)ABCD1234567890
PORTWeb server port30004000
RAILS_ENVRails environment (production, development, test)productionstaging
RAILS_LOG_LEVELLog level, you can switch it to debug to see more detailed logsinfodebug
RAILS_MAX_THREADSWeb server (Puma) threads35
REDIS_CACHE_URLRedis 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
SCREENSHOT_API_TOKENScreenshot API token (optional, used for screenshot generation)1234132512341234
SENDGRID_API_KEYSendGrid API key (optional, if not provided will not send transactional emails)SG.1234567890
SENDGRID_DOMAINThe domain you want to use for sending emails that was verified in SendGridmystore.com
SENTRY_DSNSentry DSN (optional, if not provided will not send errors to Sentry)https://sentry.io/...