Medusa + Railway Template
This repo provides a super fast way to get started using Medusa on Railway
Build a headless e-commerce store the open-source way with Medusa (the open-source Shopify alternative) and Railway (infrastructure, instantly).
Deploy your own Medusa server by clicking this button:
This template will automatically build everything you need to get started:
A Redis database ✅
A PostgresSQL database ✅
And a clone of the Medusa server ✅
So there is no need to setup a database locally! 🎉
Environment variables
When using this template you will be asked for the following environment variables:
PORT=9000
COOKIE_SECRET=changeme
JWT_SECRET=changeme
DATABASE_URL=changeme
REDIS_URL=changeme
During setup on Railway these variables can be set to anything as above, then updated after install.
For local development PORT
should be set to 9000
, unless you have changed the default values.
DATABASE_URL
and REDIS_URL
will then need to be updated to the database urls after setup is complete.
DATABASE_URL
variable with the Postgres Connection url
Set the - Click on the PostgreSQL card.
- Choose the Connect tab.
- Copy the Postgres Connection URL.
- Click on the GitHub repository’s card.
- Choose the Variables tab.
- Set the
DATEBASE_URL
value by pasting in the URL.
REDIS_URL
variable with the Redis database url
Set the - Click on the Redis card.
- Choose the Connect tab.
- Copy the Redis Connection URL.
- Click on the GitHub repository’s card.
- Choose the Variables tab.
- Set the
REDIS_URL
value by pasting in the URL.
For the Medusa docs explaining this setup (without this template) see: https://docs.medusajs.com/deployments/server/deploying-on-railway.
Links
Note: This repo only contains the backend server for Medusa, to create a full Medusa powered e-commerce store you will also need a storefront and admin both of which can be hosted on Netlify.
Repos
Medusa admin: https://github.com/medusajs/admin
Gatsby storefront starter: https://github.com/medusajs/gatsby-starter-medusa
Next.js storefront starter: https://github.com/medusajs/nextjs-starter-medusa
Full Documentation
Medusa's docs: https://docs.medusajs.com
Railway's docs: https://docs.railway.app