- Notifications
You must be signed in to change notification settings - Fork30
One-click deploy template for railway
rpuls/medusajs-for-railway-boilerplate
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Medusajs open source ecommerce platform
one-click deploy on railway!
New version alert!
Check out medusajs 2.0 (preview version)
Combine Medusa's modules for your commerce backend with the newest Next.js 14 features for a performant storefront.
This boilerplate is a monorepo consisting of snapshot of a medusajs backend and storefront app created withnpx create-medusa-app@latest
February 2024 - updated 16th October 2024. Modified to be plug n' play deployable onrailway.app!
Use one-click deploy template:
Please change the value of environtment variables:COOCKIE_SECRET
andJWT_SECRET
.
- Install dependencies
yarn
- Rename
.env.template
->.env
- To connect to your online database, from local; copy the
DATABASE_URL
value that have been auto generated on railway, and add to your.env
- postgres database (will be automatically generated if using railway template)
- redis (will be automatically generated if using railway template)
- cloudinary: I highly recommend using a proper media service.
- Sign up a free account withcloudinary choose "developer API calls" type of user.
- Add your
cloud_name
,api_key
&api_secret
to .env.local this will eneable Cloudinary as a file service on local dev environment - Configure the same environment variables in your railway dashboard to enable cloudinary in production.
- If the steps above was confusin, visithttps://medusajs.com/plugins/medusa-file-cloudinary/ for more setup details.
cd medusajs-backend/
yarn build
will compile app.yarn dev
will start local admin dashboard app to manage products and orders etc.yarn start
will start the backend server, needed for the storefront
intall dependenciesyarn
Rename.env.local.template
->.env.local
- running backend
npm run start
- needed to fetch products data and more, to build nextjs pages.
cd medusajs-storefront/
yarn wait
will keep calling backend endpoint until a backend responds.yarn build
will build the nextjs app - remember to start backend app prior to running this command.yarn start
will serve the frontend web shop.
About
One-click deploy template for railway
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.