diff --git a/docs/content/deployments/server/deploying-on-digital-ocean.md b/docs/content/deployments/server/deploying-on-digital-ocean.md index b2b92c0384..2961716833 100644 --- a/docs/content/deployments/server/deploying-on-digital-ocean.md +++ b/docs/content/deployments/server/deploying-on-digital-ocean.md @@ -116,22 +116,16 @@ After pushing the changes, you can find the files in your GitHub repository. After logging into your account, click on the Create button at the top right, then choose App. -![Click Create button then choose Apps](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002030/Medusa%20Docs/Digital%20Ocean/PQgPZ0q_xntr2i.png) - ### Choose Repository In the Create App page, choose GitHub from the Service Provider list. -![Choose GitHub from list of providers](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002043/Medusa%20Docs/Digital%20Ocean/nBY9wGE_zyy1e6.png) - If you haven’t given DigitalOcean access before, click on Manage Access under Source Code. You’ll then be redirected to GitHub to give DigitalOcean access. -Once DigitalOcean have access to your GitHub account, you should see a Repository input. Click on it and search for the repository you created earlier. +Once DigitalOcean has access to your GitHub account, you should see a Repository input. Click on it and search for the repository you created earlier. Additional inputs will show up to choose the Branch, Source Directory, and Autodeploy options. -![Enter master for Branch input, backslash for Source Directory, and check Autodeploy](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002055/Medusa%20Docs/Digital%20Ocean/kjk9E2B_qpwrx4.png) - If you host your Medusa backend in a monorepo, you should change the Source Directory to the directory the backend is available in the repository. Otherwise, it can be left as is. Once you’re done, click Next to move on to the next step. @@ -140,32 +134,22 @@ Once you’re done, click Next to move on to the next step. In the next step, you’ll see the resources to create. -![List of resources showing a docker resource and web service resource](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002067/Medusa%20Docs/Digital%20Ocean/6TlpWB9_wfppc7.png) - -If you have a Dockerfile available in the backend’s codebase (which is available by default), you’ll have two resources showing. You can remove it by clicking on the trash icon at the right of the resource. +If you have a Dockerfile available in the backend’s codebase, you’ll have two resources showing. You can remove it by clicking on the trash icon at the right of the resource. By default, DigitalOcean hosts the web service in a sub-path of the domain name of the created App. To change it to the root of the domain, click on the edit icon at the right of the Web Service resource. Then, scroll to HTTP Request Routes and expand it by clicking on Edit at its right. Change the value of the Routes input to `/`. -![Enter backslash for Routes](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002076/Medusa%20Docs/Digital%20Ocean/ta0jHh4_ddcz3r.png) - Once you’re done click Save. You’ll be taken back to the Resources page. ### Specify Database Resources On the same page, expand the Add Resources section, choose Database, then click Add. -![Choose Database](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002090/Medusa%20Docs/Digital%20Ocean/MfK9E8o_ensfu0.png) - In the new page, you’ll be shown a PostgreSQL database to be created. Notice that it’s important to choose a name that you’ll remember as you’ll need the name in next steps. You can leave the name as is if it’s not necessary to change it. -![Enter db for Choose Name input](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002099/Medusa%20Docs/Digital%20Ocean/jYxENhr_wxkspz.png) - Once you’re done, click Create and Attach. You’ll be redirected back to the previous page with the database added to the resources. -![Database showing in the list of resources with web service](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002109/Medusa%20Docs/Digital%20Ocean/jNZ7rxg_msmgbz.png) - Once you’re done, click Next to move on to the next step. ### Set Environment Variables @@ -174,8 +158,6 @@ In this section, you’ll add environment variables that are essential to your M You should see two ways to add environment variables: Global or specific to the Web Service. -![Global environment variables and web service environment variables](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002118/Medusa%20Docs/Digital%20Ocean/VOYykPT_qoili6.png) - Click Edit on the second row to add environment variables specific to the Web Service. Add the following environment variables: ```bash @@ -213,8 +195,6 @@ Once you’re done click Save. In the next section, you’ll be shown the app info and the region it will be deployed to. You can leave it all as is or make changes if you find it necessary. -![App info and region details](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002128/Medusa%20Docs/Digital%20Ocean/XVS0yej_kwmaim.png) - Once you’re done, click Next to go to the next step. In the final step, you can see a review of everything you created. If everything looks good, scroll down and click Create Resource. @@ -225,16 +205,10 @@ While the backend is being deployed, you can create the Redis resource. Click the Create button at the top right and choose Database from the dropdown. -![Click Create then choose Databases](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002138/Medusa%20Docs/Digital%20Ocean/8BzUzuO_bhwcpd.png) - In the new page under Choose a database engine, choose Redis. -![For the Choose a database engine input choose Redis](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002149/Medusa%20Docs/Digital%20Ocean/lninWzJ_joycrd.png) - Then, scroll down to the “Choose a name” input. Since you used the name `redis` in the `REDIS_URL` environment variables, change the value to `redis` here. -![For the choose a name input set the value to redis](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002158/Medusa%20Docs/Digital%20Ocean/E81Qc4l_gid9qa.png) - Once you’re done, click on Create Database Cluster. ### Attach Redis Database @@ -243,12 +217,8 @@ Once the Redis database is created go back to the App you created earlier by cho Click at the white Create button at the top right and choose Create/Attach Database. -![Click at the create button and choose create/attach database](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002168/Medusa%20Docs/Digital%20Ocean/jdh702G_fjssat.png) - In the new page, click on the Previously Created DigitalOcean Database radio button. Then, under Database Cluster select the Redis database you just created. -![Choose Previously Created DigitalOcean Database then under Database Cluster choose redis](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002177/Medusa%20Docs/Digital%20Ocean/aBJ2z0B_yzwpym.png) - Once you’re done click Attach Database. This will add the Redis database to the list of resources of your App and will trigger a redeploy of the App. --- @@ -257,11 +227,11 @@ Once you’re done click Attach Database. This will add the Redis database to th Once the redeployment is complete, copy the URL of the App which can be found under the App’s name. -![Copy URL under the app name](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002186/Medusa%20Docs/Digital%20Ocean/i3ws777_ooknst.png) - Then, go to `/store/products`. If the deployment was successful, you should receive a JSON response. -![JSON response with list of products](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002196/Medusa%20Docs/Digital%20Ocean/5xTdMbY_pqwyzy.png) +### Health Route + +You can access `/health` to get health status of your deployed backend. ### Testing the Admin @@ -288,8 +258,6 @@ medusa user --email --password Make sure to replace `` and `` with the credentials you want to give the user. -![Console in the DigitalOcean App](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002204/Medusa%20Docs/Digital%20Ocean/9RMfD4C_u0mdqs.png) - --- ## Add Environment Variables @@ -298,12 +266,8 @@ You’ll likely need to add environment variables later such as Admin Cross-Orig To add environment variables, on the App’s page click on Settings and choose the Web Service component. -![Choose the Settings tab then choose the web service container](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002217/Medusa%20Docs/Digital%20Ocean/qLPARaV_ocit6w.png) - Then, scroll down and find Environment Variables. You can expand the environment variables by clicking Edit on the right. Here, you can edit, add, and remove environment variables. -![Expand the Environment Variables section by clicking edit](https://res.cloudinary.com/dza7lstvk/image/upload/v1668002227/Medusa%20Docs/Digital%20Ocean/4x6JGjX_wzltiq.png) - Once you click Save, the environment variables will be saved and a redeployment will be triggered. --- diff --git a/docs/content/deployments/server/deploying-on-heroku.mdx b/docs/content/deployments/server/deploying-on-heroku.mdx index ad8ce79361..f1de7b03eb 100644 --- a/docs/content/deployments/server/deploying-on-heroku.mdx +++ b/docs/content/deployments/server/deploying-on-heroku.mdx @@ -239,6 +239,10 @@ The backend's URL is available under "Web URL". You can copy it and perform requ For example, you can send a request to `/store/products` and you should receive a JSON response with the products in your store. +### Health Route + +You can access `/health` to get health status of your deployed backend. + ### Testing the Admin :::note diff --git a/docs/content/deployments/server/deploying-on-microtica.md b/docs/content/deployments/server/deploying-on-microtica.md index 6b5d2ec90b..82ae8008cc 100644 --- a/docs/content/deployments/server/deploying-on-microtica.md +++ b/docs/content/deployments/server/deploying-on-microtica.md @@ -96,6 +96,10 @@ Once the build process is complete, a new deployment with the infrastructure res After the deployment is finished, navigate to Resources → [AppName] (Medusa in this example) → Overview. Then, under the Resource Outputs section you should see the "AccessUrl". This is the backend's URL that you can use to access API endpoints and test them. You can try getting the list of products using the endpoint `/store/products`. +### Health Route + +You can access `/health` to get health status of your deployed backend. + ### Testing the Admin :::note diff --git a/docs/content/deployments/server/deploying-on-railway.md b/docs/content/deployments/server/deploying-on-railway.md index 9cc191d674..8527e46f9f 100644 --- a/docs/content/deployments/server/deploying-on-railway.md +++ b/docs/content/deployments/server/deploying-on-railway.md @@ -191,6 +191,10 @@ If you generated a random domain, you can find it by clicking on the GitHub repo ::: +### Health Route + +You can access `/health` to get health status of your deployed backend. + ### Testing the Admin :::note diff --git a/docs/content/development/backend/install.mdx b/docs/content/development/backend/install.mdx index 7b1524f77e..112203c3f7 100644 --- a/docs/content/development/backend/install.mdx +++ b/docs/content/development/backend/install.mdx @@ -75,6 +75,10 @@ After these three steps and in only a couple of minutes, you now have a complete curl localhost:9000/store/products ``` +### Health Route + +You can access `/health` to get health status of your backend. + --- ## Next Steps