title | date | draft | type |
---|---|---|---|
Medusa.js |
2023-11-13 11:00:11 +0100 |
true |
docs |
- Deploy a PostgreSQL add-on and a Redis add-on
- Copy the value of
POSTGRESQL_ADDON_URI
- In your terminal, run
npx create-medusa-app@latest --db-url <POSTGRESQL_ADDON_URI_value>
- Follow the steps to configure your Medusa project
- In your code, replace
DB_URL
byPOSTGRESQL_ADDON_URI
- Create a Node.js app in Clever Cloud
- Inject your environment variables
- Set a domain name and inject it as an environment variable:
MEDUSA_URL
=<your-domain-name
- In your project, run
git init
and add the git remote - The run
npm run build
- Connect your app to your database
- In
medusa-config.js
, set the ssl database options:
module.exports = {
projectConfig: {
// ...
database_extra: { ssl: { rejectUnauthorized: false } },
},
}
- Add the admin to enable deploying with the backend:
npm install @medusajs/admin
- Set the port:
const plugins = [
// ...
{
resolve: "@medusajs/admin",
/** @type {import('@medusajs/admin').PluginOptions} */
options: {
port: 8080,
},
},
]