# 4.3.6.1 Running a deployment

### Ensure your countryconfig container has built and pushed to Dockerhub successfully

Before you can deploy, you need to make sure that your country configuration Docker image has compiled and has been pushed to your container registry (E.G. Dockerhub). This was explained previously in [4.3.5.2](/v1.8/setup/3.-installation/3.3-set-up-a-server-hosted-environment/4.3.5-provisioning-servers/4.3.5.2-building-pushing-and-releasing-your-countryconfig-code.md)

Copy the tag associated with your **countryconfig** Docker container image because you will use it in the next step.

<figure><img src="/files/BtTOAXsX2xLQ97OzT2CU" alt=""><figcaption></figcaption></figure>

### Deploy to your environments

You can deploy to your server using the automated **"Deploy (development)"** Github Action for **development,** **qa** and **staging** environments and the **"Deploy (production)"** Github Action for **staging** and **production** environments.

First, use Deploy (development) to deploy to a relevant environment to test the process.

<figure><img src="/files/4zvmszSPDp53nRx9poV9" alt=""><figcaption></figcaption></figure>

a) You will be required to select the base Git branch and environment that you wish to deploy to.

b) You will be required to enter the OpenCRVS Core image tag. Please refer to the [OpenCRVS Core releases -page](https://github.com/opencrvs/opencrvs-core/releases) for available versions. Usually this will be an official release: e.g. **v1.7.0**

c) You will be required to enter the OpenCRVS Country Configuration version (or short Git hash tag for any tagged custom country configuration build on Dockerhub)

d) (optional) In Deploy (development), there is a checkbox available to you to "Reset the environment". This will empty all databases in the environment allowing you to re-seed. This is useful during development and testing. In production, there is no way to clear all databases from a Github action as a security posture.

e) Click Run workflow, and watch the output to make sure that the deployment was successful.

<figure><img src="/files/t2j6Z5A68q9aIljfA7hi" alt=""><figcaption></figcaption></figure>

If this is your first time deploying OpenCRVS, you need to seed it explained [here](/v1.8/setup/3.-installation/3.3-set-up-a-server-hosted-environment/3.3.6-deploy-automated-and-manual/4.3.6.2-seeding-a-server-environment.md).

If your environment is already seeded ***(you only need to seed an environment once)***, then you can proceed to login.

You can use the **Deploy(production)** action to similarly deploy to your **production** & **staging** environments before seeding them too.

{% embed url="<https://youtu.be/ngyTxZXx14Q>" %}


---

# 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://documentation.opencrvs.org/v1.8/setup/3.-installation/3.3-set-up-a-server-hosted-environment/3.3.6-deploy-automated-and-manual/4.3.6.1-running-a-deployment.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.
