# Best practices for customizing deployment

**URL:** <https://meta.discourse.org/t/best-practices-for-customizing-deployment/290048>\
**Category:** Self-hosting\
**Created:** [December 29, 2023, 9:25pm UTC](https://meta.discourse.org/t/best-practices-for-customizing-deployment/290048 "2023-12-29T21:25:26Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![aas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aas/32/289331_2.png) [@aas](https://meta.discourse.org/u/aas)\
**Post date:** [December 29, 2023, 9:25pm UTC](https://meta.discourse.org/t/best-practices-for-customizing-deployment/290048/1 "2023-12-29T21:25:27Z")

</div>

It is common to edit `app.yml` in order to tweak Discourse settings.

Additionally, in [How to avoid throttling limits with admin API key? - #7 by aas](https://meta.discourse.org/t/how-to-avoid-throttling-limits-with-admin-api-key/274206/7) I discovered that I need to modify the nginx config to avoid rate-limiting API requests.

My question is, what are the recommended best practices for things like:

- Versioning files such as `app.yml`
  - I’d need to version it outside of `/var/discourse` and move it to `/var/discourse/containers/` any time I change it.

- Modifying, overriding, or adding new templates
  - [templates/web.ratelimited.template.yml](https://github.com/discourse/discourse_docker/blob/fcce1376043adeb09e21ec1ec079a41e4d29fe6e/templates/web.ratelimited.template.yml) is not ignored bit git. While it hasn’t changed for 6 years, editing it directly doesn’t seem wise. It is possible that `./launcher rebuild` would clobber it. Or the `git pull` commands would fail.

**Possible solution** :

- Create my own git repo with `app.yml` and a template.
- Write a GitHub action that uses Ansible to copy `app.yml` into `/var/discourse/containers/` and also copies the template to the server running Discourse
  - in this case, I could remove [templates/web.ratelimited.template.yml](https://github.com/discourse/discourse_docker/blob/fcce1376043adeb09e21ec1ec079a41e4d29fe6e/templates/web.ratelimited.template.yml) from the templates section of `app.yml` and replace it with my own template.

**Questions**

- Where would be a good place to put my custom template?

---

_[View the full topic](https://meta.discourse.org/t/best-practices-for-customizing-deployment/290048)._
