# Install and deploy the Merchant Center custom application

## Install the Merchant Center custom application

To install the commercetools Merchant Center application, contact your Digital River representative to obtain the Merchant Center application needed for deployment. If you do not have a Digital River representative, contact <commercetools-Integration@digitalriver.com>.

## Deploy the Merchant Center custom application

Once you have installed the Merchant Center custom application, complete the following tasks to deploy it for use in your integration.

### Create an .ENV file

Create a `.env` (environment variables) file with the following contents:

```
ENABLE_NEW_JSX_TRANSFORM="true"
FAST_REFRESH="true"
REACT_APP_PUBLIC_ENCRYPTION_KEY=<your PUBLIC encryption key>
PRODUCTION_URL=<url where the custom application is accessible>
MANUAL_PRODUCT_SYNC_ENDPOINT=<url where the connector us accessible>/api/v1/products/sync
ENTRY_POINT_URI_PATH=digital-river
APPLICATION_ID=<application id>
MANAGE_PERMISSION=ManageDigitalRiver
```

The next table shows additional details about the properties shown in the example above:

| Property                            | Source                                                                                                                                                                                                                                                                                                               |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| REACT\_APP\_PUBLIC\_ENCRYPTION\_KEY | See the topic [Create integration access keys](/commercetools-1/create-integration-access-keys.md) for details on access keys. Use only the lines between the BEGIN and END, and concatenate them to a single line.                                                                                                  |
| PRODUCTION\_URL                     | Depends on how you are deploying the custom application                                                                                                                                                                                                                                                              |
| MANUAL\_PRODUCT\_SYNC\_ENDPOINT     | Depends on how you are deploying connector. commercetools adds a JWT to the request which is used for for [authentication](https://docs.commercetools.com/custom-applications/concepts/integrate-with-your-own-api#authenticating-requests-from-the-external-api). As such, there is no need to secure this endpoint |
| APPLICATION\_ID                     | Refer to Configure Merchant for more information on this property.                                                                                                                                                                                                                                                   |

### Deploy the custom application

The custom application can be deployed using one of the following methods:&#x20;

* By following the instructions in one of the [guides](https://docs.commercetools.com/custom-applications/deployment-examples) provided by commercetools.
* By using a provided Dockerfile that creates an image that can be deployed to a cloud provider. A Google Cloud Run deployment example of this method is provided below in this topic.

#### Dockerfile and Google Cloud Run deployment example <a href="#gcloud" id="gcloud"></a>

Use the following steps to deploy the Merchant Center custom application in a Dockerfile/Google Cloud Run environment:

*Build the container*

```
docker build -t <a tag> . 
```

The tag should include the version from the `package.json.`

*Push the container to a registry*

This step depends upon the infrastructure that you are using. Refer to your infrastructure documentation for details on this process.

*Deploy the container*

The following shows an example of how to deploy the container:

```
gcloud run deploy <your service name> \
  --image <location of the image in the registry> \
  --project <your project> \
  --platform managed \
  --region <your region> \
  --allow-unauthenticated
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/commercetools-1/use-the-commercetools-merchant-center-custom-application/install-and-deploy-the-merchant-center-custom-application.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
