# Deploy custom code

**URL:** <https://forum.dimagi.com/t/deploy-custom-code/8494>\
**Category:** Developers\
**Created:** [October 11, 2021, 9:08am UTC](https://forum.dimagi.com/t/deploy-custom-code/8494 "2021-10-11T09:08:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erobinson](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/erobinson/32/2652_2.png) [@erobinson](https://forum.dimagi.com/u/erobinson)\
**Post date:** [October 11, 2021, 9:08am UTC](https://forum.dimagi.com/t/deploy-custom-code/8494/1 "2021-10-11T09:08:15Z")

</div>

Is it possible to use the CCHQ Ansible scripts to deploy a modified code base? There are times when I see the need to (maybe temporarily) create a project space with access to custom reports perhaps not warranting a pull request. e.g. I may want to temporarily add entries to the domains section here:

> <https://github.com/dimagi/commcare-hq/blob/1a2c3bddbde5964c6ba9199632b29d96cd1bacf9/custom/inddex/ucr/data_sources/food_consumption_indicators.json>

...and an additional item to DOMAIN\_MODULE\_MAP here:

> <https://github.com/dimagi/commcare-hq/blob/a556a0586eb7029c83f3496366b1cbb78f7515a2/settings.py>

Is there an easy way to go about that? Can I just edit the files after deploy and restart services to have them take effect?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Simon\_Kelly](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/simon_kelly/32/494_2.png) [@Simon\_Kelly](https://forum.dimagi.com/u/Simon_Kelly)\
**Post date:** [October 11, 2021, 10:23am UTC](https://forum.dimagi.com/t/deploy-custom-code/8494/2 "2021-10-11T10:23:19Z")

</div>

Hi Ed,

You could indeed edit the code in the current release and restart the services.

Alternately you can change the github repository used to deploy code. In `fab-settings.yml` you can set the following two values (values shown below are the defaults):

```auto
code_repo: 'https://github.com/dimagi/commcare-hq.git'
default_branch: master

```

---

<div class="post-metadata">

**Author:** ![erobinson](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/erobinson/32/2652_2.png) [@erobinson](https://forum.dimagi.com/u/erobinson)\
**Post date:** [October 11, 2021, 11:14am UTC](https://forum.dimagi.com/t/deploy-custom-code/8494/3 "2021-10-11T11:14:23Z")

</div>

Brilliant, thanks Simon, that's helpful!
