Connect to the PostgreSQL primary server instead of localhost

Move the db and user creation to its own recipe

Refs #186
This commit is contained in:
Greg Karékinian
2020-06-26 15:20:59 +02:00
parent 004a6913b4
commit 4583421597
3 changed files with 60 additions and 40 deletions

View File

@@ -1,15 +1,9 @@
# Service dependencies
REDIS_URL=<%= @redis_url %>
DB_HOST=localhost
DB_HOST=<%= @db_host %>
DB_NAME=mastodon
# TODO: Remove the condition once we have migrated mastodon to andromeda
<% if node[:platform_version].to_f < 18.04 -%>
DB_USER=postgres
DB_PASS=<%= node['postgresql']['password']['postgres'] %>
<% else -%>
DB_USER=mastodon
DB_PASS=<%= @db_pass %>
<% end -%>
DB_PORT=5432
# Federation