Configure remaining options for akkounts
And refactor attributes/variables to use the various service cookbook's own attributes.
This commit is contained in:
parent
bcbee255f1
commit
01977e088a
@ -2,14 +2,17 @@
|
||||
"name": "production",
|
||||
"override_attributes": {
|
||||
"akkounts": {
|
||||
"discourse": {
|
||||
"public_url": "https://community.kosmos.org"
|
||||
"ejabberd": {
|
||||
"admin_url": "https://xmpp.kosmos.org:5443/admin"
|
||||
},
|
||||
"lndhub": {
|
||||
"public_url": "https://lndhub.kosmos.org",
|
||||
"public_key": "024cd3be18617f39cf645851e3ba63f51fc13f0bb09e3bb25e6fd4de556486d946"
|
||||
}
|
||||
},
|
||||
"discourse": {
|
||||
"domain": "community.kosmos.org"
|
||||
},
|
||||
"garage": {
|
||||
"replication_mode": "2",
|
||||
"s3_api_root_domain": ".s3.garage.kosmos.org",
|
||||
@ -20,6 +23,7 @@
|
||||
]
|
||||
},
|
||||
"gitea": {
|
||||
"domain": "gitea.kosmos.org",
|
||||
"postgresql_host": "pg.kosmos.local:5432",
|
||||
"config": {
|
||||
"storage": {
|
||||
@ -31,6 +35,7 @@
|
||||
}
|
||||
},
|
||||
"kosmos-mastodon": {
|
||||
"domain": "kosmos.social",
|
||||
"s3_endpoint": "http://localhost:3900",
|
||||
"s3_region": "garage",
|
||||
"s3_bucket": "kosmos-social",
|
||||
@ -40,6 +45,9 @@
|
||||
"mastodon.w7nooprauv6yrnhzh2ajpcnj3doinked2aaztlwfyt6u6pva2qdxqhid.onion"
|
||||
]
|
||||
},
|
||||
"mediawiki": {
|
||||
"url": "https://wiki.kosmos.org"
|
||||
},
|
||||
"sentry": {
|
||||
"allowed_ips": "10.1.1.0/24"
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ node.default['akkounts']['smtp']['domain'] = 'kosmos.org'
|
||||
node.default['akkounts']['smtp']['auth_method'] = 'plain'
|
||||
node.default['akkounts']['smtp']['enable_starttls'] = 'auto'
|
||||
|
||||
node.default['akkounts']['discourse']['public_url'] = nil
|
||||
node.default['akkounts']['ejabberd']['admin_url'] = nil
|
||||
|
||||
node.default['akkounts']['lndhub']['api_url'] = nil
|
||||
node.default['akkounts']['lndhub']['public_url'] = nil
|
||||
|
@ -66,24 +66,9 @@ if btcpay_host
|
||||
env[:btcpay_api_url] = "http://#{btcpay_host}:23001/api/v1"
|
||||
end
|
||||
|
||||
env[:discourse_public_url] = node['akkounts']['discourse']['public_url']
|
||||
env[:discourse_public_url] = "https://#{node['discourse']['domain']}"
|
||||
env[:discourse_connect_secret] = credentials['discourse_connect_secret']
|
||||
|
||||
if lndhub_host
|
||||
node.override["akkounts"]["lndhub"]["api_url"] = "http://#{lndhub_host}:3026"
|
||||
env[:lndhub_legacy_api_url] = node["akkounts"]["lndhub"]["api_url"]
|
||||
env[:lndhub_api_url] = node["akkounts"]["lndhub"]["api_url"]
|
||||
env[:lndhub_public_url] = node["akkounts"]["lndhub"]["public_url"]
|
||||
env[:lndhub_public_key] = node["akkounts"]["lndhub"]["public_key"]
|
||||
if postgres_readonly_host
|
||||
env[:lndhub_admin_ui] = true
|
||||
env[:lndhub_pg_host] = postgres_readonly_host
|
||||
env[:lndhub_pg_database] = node['akkounts']['lndhub']['postgres_db']
|
||||
env[:lndhub_pg_username] = credentials['postgresql_username']
|
||||
env[:lndhub_pg_password] = credentials['postgresql_password']
|
||||
end
|
||||
end
|
||||
|
||||
ejabberd_private_ip_addresses = []
|
||||
search(:node, "role:ejabberd").each do |node|
|
||||
ejabberd_private_ip_addresses << node["knife_zero"]["host"]
|
||||
@ -102,8 +87,29 @@ end
|
||||
|
||||
if ejabberd_private_ip_addresses.size > 0
|
||||
env[:ejabberd_api_url] = "http://xmpp.kosmos.local/api"
|
||||
env[:ejabberd_admin_url] = node['akkounts']['ejabberd']['admin_url']
|
||||
end
|
||||
|
||||
env[:gitea_public_url] = "https://#{node['gitea']['domain']}"
|
||||
|
||||
if lndhub_host
|
||||
node.override["akkounts"]["lndhub"]["api_url"] = "http://#{lndhub_host}:3026"
|
||||
env[:lndhub_legacy_api_url] = node["akkounts"]["lndhub"]["api_url"]
|
||||
env[:lndhub_api_url] = node["akkounts"]["lndhub"]["api_url"]
|
||||
env[:lndhub_public_url] = node["akkounts"]["lndhub"]["public_url"]
|
||||
env[:lndhub_public_key] = node["akkounts"]["lndhub"]["public_key"]
|
||||
if postgres_readonly_host
|
||||
env[:lndhub_admin_ui] = true
|
||||
env[:lndhub_pg_host] = postgres_readonly_host
|
||||
env[:lndhub_pg_database] = node['akkounts']['lndhub']['postgres_db']
|
||||
env[:lndhub_pg_username] = credentials['postgresql_username']
|
||||
env[:lndhub_pg_password] = credentials['postgresql_password']
|
||||
end
|
||||
end
|
||||
|
||||
env[:mastodon_public_url] = "https://#{node['kosmos-mastodon']['domain']}"
|
||||
env[:mediawiki_public_url] = node['mediawiki']['url']
|
||||
|
||||
systemd_unit "akkounts.service" do
|
||||
content({
|
||||
Unit: {
|
||||
|
@ -4,7 +4,7 @@ node.default["kosmos-mastodon"]["directory"] = "/opt/mastodon"
|
||||
node.default["kosmos-mastodon"]["bind_ip"] = "127.0.0.1"
|
||||
node.default["kosmos-mastodon"]["app_port"] = 3000
|
||||
node.default["kosmos-mastodon"]["streaming_port"] = 4000
|
||||
node.default["kosmos-mastodon"]["server_name"] = "kosmos.social"
|
||||
node.default["kosmos-mastodon"]["domain"] = "kosmos.social"
|
||||
node.default["kosmos-mastodon"]["alternate_domains"] = []
|
||||
node.default["kosmos-mastodon"]["redis_url"] = "redis://localhost:6379/0"
|
||||
node.default["kosmos-mastodon"]["sidekiq_threads"] = 25
|
||||
|
@ -158,14 +158,14 @@ application mastodon_path do
|
||||
owner mastodon_user
|
||||
group mastodon_user
|
||||
variables redis_url: node["kosmos-mastodon"]["redis_url"],
|
||||
domain: node["kosmos-mastodon"]["server_name"],
|
||||
domain: node["kosmos-mastodon"]["domain"],
|
||||
alternate_domains: node["kosmos-mastodon"]["alternate_domains"],
|
||||
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@#{node['kosmos-mastodon']['server_name']}",
|
||||
smtp_from_address: "mail@#{node['kosmos-mastodon']['domain']}",
|
||||
s3_endpoint: node["kosmos-mastodon"]["s3_endpoint"],
|
||||
s3_region: node["kosmos-mastodon"]["s3_region"],
|
||||
s3_bucket: node["kosmos-mastodon"]["s3_bucket"],
|
||||
|
@ -6,7 +6,7 @@
|
||||
include_recipe "kosmos-nginx"
|
||||
|
||||
app_dir = node["kosmos-mastodon"]["directory"]
|
||||
server_name = node["kosmos-mastodon"]["server_name"]
|
||||
server_name = node["kosmos-mastodon"]["domain"]
|
||||
is_proxy = node.roles.include?('nginx_proxy') rescue nil
|
||||
upstream_hosts = []
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user