Deploy Spree Commerce on Pethost in one click
An open-source e-commerce platform: products, orders, payments and a headless API for any storefront
What happens
- You sign in to Pethost or make an account, with a passkey, GitHub or Google.
- No machine yet? You pick a plan, and we prepare one for you. The link waits in your browser until it is ready.
- New project opens at the app. You fill in what it asks for and click Create project: Email, Admin password.
- In a minute or two the app is live at its own address with HTTPS. Its secrets are made for it at random, and its data is in the nightly backup.
- It is a project like any other: its compose.yaml, its .env, its logs and a terminal are in the panel, and your agent can change it, roll it back or restore it.
First steps
Sign in to https://spree.sam.pethost.app/admin with the email and the admin password you gave: Spree makes that admin at the first start. Products, payment methods and shipping are set up there.
What it runs
The template is this compose.yaml and the variables it writes into the project’s .env. Pethost runs the file as it is written.
services:
spree:
image: ghcr.io/spree/spree:5.6.1
restart: unless-stopped
environment:
DATABASE_URL: postgres://spree:${POSTGRES_PASSWORD}@postgres:5432/spree_production
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY: ${ENCRYPTION_PRIMARY_KEY}
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY: ${ENCRYPTION_DETERMINISTIC_KEY}
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT: ${ENCRYPTION_KEY_DERIVATION_SALT}
SPREE_HOST: ${HOST}
RAILS_HOST: ${HOST}
# The seed makes the first admin from these instead of a stock account.
ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
volumes:
- storage:/rails/storage
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_USER: spree
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: spree_production
volumes:
- db:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U spree -d spree_production"]
interval: 5s
timeout: 5s
retries: 10
volumes:
storage:
db: