The following documentation will guide you through the one-click creation of a new Medusa project hosted on Heroku. Follow the steps below to get ready.
Ubuntu
sudo snap install --classic heroku
MacOS
brew tap heroku/brew && brew install heroku
Windows
Download the appropriate installer for your Windows installation:
64-bit installer 32-bit installer
heroku login
Follow the instructions on your terminal
git clone https://github.com/gianmarcomurru/heroku-starter-medusa.git
cd heroku-starter-medusa
HEROKU_PROJECT=medusa-$(uuid | cut -d "-" -f1)
heroku create $HEROKU_PROJECT
heroku git:remote -a $HEROKU_PROJECT
Install Postgresql using this command
heroku addons:create heroku-postgresql:hobby-dev
⚠️ Heroku requires you to add a payment method before installing RedisToGO
heroku addons:create redistogo:nano
heroku config:set NODE_ENV=production
heroku config:set MY_HEROKU_URL=$(heroku info -s | grep web_url | cut -d= -f2)
heroku config:set JWT_SECRET=your-super-secret
heroku config:set COOKIE_SECRET=your-super-secret-pt2
heroku config:set NPM_CONFIG_PRODUCTION=false
npm install cross-env babel-preset-medusa-package
git add .
git commit -m "Deploy Medusa App on Heroku"
heroku buildpacks:set heroku/nodejs
git push heroku HEAD:master
heroku logs -n 500000 --remote heroku --tail
Visit docs.medusa-commerce.com for further guides.
Website | Notion Home | Twitter | Docs