"Your local changes.... templates/postgres.template.yml"

AI-generated summary

joshhabka is experiencing issues with Discourse failing to start, with logs indicating unicorn process errors and a persistent git merge conflict on templates/postgres.template.yml during ./launcher rebuild app. The error suggests local modifications to the template file are blocking the update. Ethsim2 asks about the database server location, suggesting network configuration adjustments (e.g., --net=host) if using a local PostgreSQL instance, though joshhabka confirms using the standard install with co-located database. The suggested fix doesn’t resolve the issue joshhabka. Later, joshhabka manually copies and deletes the file, leading to a new problem linked to another topic. Ethsim2 warns that removing the template without proper mounting via app.yml is not recommended and advises using rm to delete it cleanly. joshhabka confirms deletion, questioning if it’s safe since it’s a template — but the core issue remains unresolved: local changes are preventing launcher updates, and removal may have unintended consequences. The discussion highlights a misconfiguration or unintended local edit to a critical template file, blocking system updates and stability.

Discourse is not starting. The logs for the container show:

ok: run: redis: (pid 47) 791s
ok: run: postgres: (pid 44) 791s
supervisor pid: 4051 unicorn pid: 4056
./config/unicorn_launcher: line 71: kill: (4056) - No such process
./config/unicorn_launcher: line 15: kill: (4056) - No such process
(4051) exiting
ok: run: redis: (pid 47) 793s
ok: run: postgres: (pid 44) 793s
supervisor pid: 4065 unicorn pid: 407

I tried to go to /var/discourse and do a ./launcher rebuild app and it shows this on loop:

Ensuring launcher is up to date
Updating Launcher...
Updating 721facb..34dd695
error: your local changes to the following files would be overwritten by merge: templates/postgres.template.yml
Please commit your changes or stash them before you merge.
Aborting
failed to update

Why did this happen and how can I fix this?

where is your database server located?


this dictates the arguments you need after the .\launcher rebuild app command.


For example, if using a Postgres instance on the host (127.0.0.1):

You should run the .\launcher rebuild app with host networking:

./launcher rebuild app --docker-args --net=host --skip-mac-address

My database server is the same as Discourse, I used the official install guide to install Discourse

That command shows the same error. This is weird because it normally works just fine

@Ethsim2 I did a cp of the file to a home directory and removed it from /templates

This is the new issue: Discourse Online Updater & ./launcher rebuild app failed from Discourse gamification

what deos free -h return?

intresting. You shouldn’t need the rebuild arguments for a standard install

or, say, if the PostgreSQL server was on 0.0.0.0 and the appropriate configurations in place for Discourse’s docker to maintain it’s network isolation.

this would require mounting in the app.yml to be useful in the relevant Discourse docker container, which is not recommended


you can always remove the file in host directory with rm

Yes I did do the rm /var/discourse/templates/postgres.template.yml which shouldn’t hurt anything since it’s a template file?