docs: migrated images to cloudinary from imgur (#2569)
This commit is contained in:
@@ -74,11 +74,11 @@ Before you can deploy your Medusa server you need to create a GitHub repository
|
||||
|
||||
On GitHub, click the plus icon at the top right, then click New Repository.
|
||||
|
||||

|
||||

|
||||
|
||||
You’ll then be redirected to a new page with a form. In the form, enter the Repository Name then scroll down and click Create repository.
|
||||
|
||||

|
||||

|
||||
|
||||
### Push Code to GitHub Repository
|
||||
|
||||
@@ -86,7 +86,7 @@ The next step is to push the code to the GitHub repository you just created.
|
||||
|
||||
After creating the repository, you’ll be redirected to the repository’s page. On that page, you should see a URL that you can copy to connect your repository to a local directory.
|
||||
|
||||

|
||||

|
||||
|
||||
Copy the link. Then, open your terminal in the directory that holds your Medusa server codebase and run the following commands:
|
||||
|
||||
@@ -111,13 +111,13 @@ 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.
|
||||
|
||||

|
||||

|
||||
|
||||
### Choose Repository
|
||||
|
||||
In the Create App page, choose GitHub from the Service Provider list.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||
@@ -125,7 +125,7 @@ Once DigitalOcean have access to your GitHub account, you should see a Repositor
|
||||
|
||||
Additional inputs will show up to choose the Branch, Source Directory, and Autodeploy options.
|
||||
|
||||

|
||||

|
||||
|
||||
If you host your Medusa server in a monorepo, you should change the Source Directory to the directory the server is available in the repository. Otherwise, it can be left as is.
|
||||
|
||||
@@ -135,7 +135,7 @@ Once you’re done, click Next to move on to the next step.
|
||||
|
||||
In the next step, you’ll see the resources to create.
|
||||
|
||||

|
||||

|
||||
|
||||
If you have a Dockerfile available in the server’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.
|
||||
|
||||
@@ -143,7 +143,7 @@ By default, DigitalOcean hosts the web service in a sub-path of the domain name
|
||||
|
||||
Then, scroll to HTTP Request Routes and expand it by clicking on Edit at its right. Change the value of the Routes input to `/`.
|
||||
|
||||

|
||||

|
||||
|
||||
Once you’re done click Save. You’ll be taken back to the Resources page.
|
||||
|
||||
@@ -151,15 +151,15 @@ Once you’re done click Save. You’ll be taken back to the Resources page.
|
||||
|
||||
On the same page, expand the Add Resources section, choose Database, then click Add.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
Once you’re done, click Create and Attach. You’ll be redirected back to the previous page with the database added to the resources.
|
||||
|
||||

|
||||

|
||||
|
||||
Once you’re done, click Next to move on to the next step.
|
||||
|
||||
@@ -169,7 +169,7 @@ 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.
|
||||
|
||||

|
||||

|
||||
|
||||
Click Edit on the second row to add environment variables specific to the Web Service. Add the following environment variables:
|
||||
|
||||
@@ -202,7 +202,7 @@ 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.
|
||||
|
||||

|
||||

|
||||
|
||||
Once you’re done, click Next to go to the next step.
|
||||
|
||||
@@ -214,15 +214,15 @@ While the server is being deployed, you can create the Redis resource.
|
||||
|
||||
Click the Create button at the top right and choose Database from the dropdown.
|
||||
|
||||

|
||||

|
||||
|
||||
In the new page under Choose a database engine, choose Redis.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
Once you’re done, click on Create Database Cluster.
|
||||
|
||||
@@ -232,11 +232,11 @@ 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.
|
||||
|
||||

|
||||

|
||||
|
||||
In the new page, click on the Previously Created DigitalOcean Database radio button. Then, under Database Cluster select the Redis database you just created.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||
@@ -244,11 +244,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.
|
||||
|
||||

|
||||

|
||||
|
||||
Then, go to `<YOUR_APP_URL>/store/products`. If the deployment was successful, you should receive a JSON response.
|
||||
|
||||

|
||||

|
||||
|
||||
## Run Commands on Your Server
|
||||
|
||||
@@ -263,7 +263,7 @@ medusa user --email <EMAIL> --password <PASSWORD>
|
||||
|
||||
Make sure to replace `<EMAIL>` and `<PASSWORD>` with the credentials you want to give the user.
|
||||
|
||||

|
||||

|
||||
|
||||
## Add Environment Variables
|
||||
|
||||
@@ -271,11 +271,11 @@ 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.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
Once you click Save, the environment variables will be saved and a redeployment will be triggered.
|
||||
|
||||
|
||||
@@ -48,11 +48,11 @@ Before you can deploy your Medusa server you need to create a GitHub repository
|
||||
|
||||
On GitHub, click the plus icon at the top right, then click New Repository.
|
||||
|
||||

|
||||

|
||||
|
||||
You’ll then be redirected to a new page with a form. In the form, enter the Repository Name then scroll down and click Create repository.
|
||||
|
||||

|
||||

|
||||
|
||||
### Push Code to GitHub Repository
|
||||
|
||||
@@ -60,7 +60,7 @@ The next step is to push the code to the GitHub repository you just created.
|
||||
|
||||
After creating the repository, you’ll be redirected to the repository’s page. On that page, you should see a URL that you can copy to connect your repository to a local directory.
|
||||
|
||||

|
||||

|
||||
|
||||
Copy the link. Then, open your terminal in the directory that holds your Medusa server codebase and run the following commands:
|
||||
|
||||
@@ -477,7 +477,7 @@ If you run into any errors while running this command, you can just re-run it af
|
||||
|
||||
Once the command finishes and the deployment is successful, you can access your server in the [Qovery Console](https://console.qovery.com/). Go to the project, environment, then the app that you created using Terraform and Qovery. In the app, click the Open button at the top right to open your website in a new tab.
|
||||
|
||||

|
||||

|
||||
|
||||
You can access any of the endpoints on your server using the server URL. For example, you can get the list of products using the endpoint `/store/products`.
|
||||
|
||||
@@ -504,7 +504,7 @@ You’ll likely need to add environment variables later such as Admin Cross-Orig
|
||||
|
||||
To add environment variables, in your [Qovery Console](https://console.qovery.com/) go to the Medusa app and choose Environment Variables from the sidebar. You can add environment variables here at any point later on.
|
||||
|
||||

|
||||

|
||||
|
||||
## What’s Next
|
||||
|
||||
|
||||
Reference in New Issue
Block a user