# Postgres.template.yml and the multi-container configuration

**URL:** <https://meta.discourse.org/t/postgres-template-yml-and-the-multi-container-configuration/149100>\
**Category:** Development\
**Created:** [April 24, 2020, 6:32am UTC](https://meta.discourse.org/t/postgres-template-yml-and-the-multi-container-configuration/149100 "2020-04-24T06:32:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [April 24, 2020, 6:32am UTC](https://meta.discourse.org/t/postgres-template-yml-and-the-multi-container-configuration/149100/1 "2020-04-24T06:32:33Z")

</div>

Noticed that when we moved into multi-container mode, restoring the DB resulted in unexpected site down time (while the backup is loaded into the DB):

So, I did some digging around in `postgres.template.yml` and noticed that `app.yml` and the path to the stand alone container `standalone` shared space are hardcoded into this template.

I’m not by any means an expert at these files (_yet_) , and since the code has mostly informative “echos”, the content looks more “informative to the user” than breaking:

> **Examples from Template**
>
> ```plaintext
> echo Run: "./launcher stop app"
> echo Run: "sudo mv /var/discourse/shared/standalone/postgres_data /var/discourse/shared/standalone/postgres_data_old"
> echo Run: "./launcher rebuild app"
> echo
> echo Run: "./launcher enter app"
> echo Run: "cd /shared/postgres_backup"
> echo Run: "sv stop unicorn"
> echo Run: "sudo -iu postgres dropdb discourse"
> echo Run: "sudo -iu postgres createdb discourse"
> echo Run: "sudo -iu postgres psql discourse < backup.db"
> echo Run: "exit"
> echo Run: "./launcher rebuild app"
> exit 1
> 
> ```
> 
> ```plaintext
> if ["$PG_MAJOR_OLD" = "9.5"]; then
> echo 'In containers/app.yml: Change "templates/postgres.template.yml" TO "templates/postgres.9.5.template.yml"'
> echo
> fi
> 
> ```
> 
> etc etc.

mostly all seems “informative and not breaking I assume”

It’s probably not important, but since the various tutorials on site mention this template and renaming the data container to “data” and the web container to “web-only”, for example, I thought it is worth mentioning.

FYI only, maybe for a future look way down the road …
