Use server name from attribute everywhere

pull/13/head
raucao 6 years ago
parent 521f48a21e
commit 0cf22f7f71
  1. 4
      site-cookbooks/kosmos-mastodon/recipes/default.rb
  2. 2
      site-cookbooks/kosmos-mastodon/recipes/nginx.rb

@ -64,13 +64,13 @@ application mastodon_path do
group "mastodon"
variables redis_db: 1,
redis_actioncable_db: 2,
domain: "kosmos.social",
domain: node["kosmos-mastodon"]["server_name"],
paperclip_secret: mastodon_credentials['paperclip_secret'],
secret_key_base: mastodon_credentials['secret_key_base'],
otp_secret: mastodon_credentials['otp_secret'],
smtp_login: mastodon_credentials['smtp_user_name'],
smtp_password: mastodon_credentials['smtp_password'],
smtp_from_address: "mail@kosmos.social",
smtp_from_address: "mail@#{node["kosmos-mastodon"]["server_name"]}",
s3_bucket: "kosmos-social",
aws_access_key_id: mastodon_credentials['aws_access_key_id'],
aws_secret_access_key: mastodon_credentials['aws_secret_access_key'],

@ -38,7 +38,7 @@ end
unless node.chef_environment == "development"
include_recipe "kosmos-base::letsencrypt"
execute "letsencrypt cert for kosmos.social" do
execute "letsencrypt cert for #{server_name}" do
command "./certbot-auto certonly --webroot --agree-tos --email ops@5apps.com --webroot-path /var/www/mastodon -d #{server_name} -n"
cwd "/usr/local/certbot"
not_if { File.exist? "/etc/letsencrypt/live/#{server_name}/fullchain.pem" }

Loading…
Cancel
Save