log_directory = "#{site_directory}/logs"
rails_directory = "#{site_directory}/rails"
cgimap_directory = "#{site_directory}/cgimap"
+ gpx_directory = "#{site_directory}/gpx"
if details[:repository]
site_aliases = details[:aliases] || []
mode 0o755
end
+ directory gpx_directory do
+ owner "apis"
+ group "apis"
+ mode 0o755
+ end
+
+ directory "#{gpx_directory}/traces" do
+ owner "apis"
+ group "apis"
+ mode 0o755
+ end
+
+ directory "#{gpx_directory}/images" do
+ owner "apis"
+ group "apis"
+ mode 0o755
+ end
+
rails_port site_name do
ruby ruby_version
directory rails_directory
database_port node[:postgresql][:clusters][:"9.5/main"][:port]
database_name database_name
database_username "apis"
+ gpx_dir gpx_directory
log_path "#{log_directory}/rails.log"
memcache_servers ["127.0.0.1"]
csp_enforce true
run_migrations true
+ trace_use_job_queue true
end
template "#{rails_directory}/config/initializers/setup.rb" do
property :csp_enforce, [TrueClass, FalseClass], :default => false
property :csp_report_url, String
property :piwik_configuration, Hash
+property :trace_use_job_queue, [TrueClass, FalseClass], :default => false
action :create do
package %W[
"thunderforest_key",
"totp_key",
"csp_enforce",
- "csp_report_url"
+ "csp_report_url",
+ "trace_use_job_queue"
).reject { |_k, v| v.nil? }.merge(
"server_protocol" => "https",
"server_url" => new_resource.site,
"support_email" => "support@openstreetmap.org",
"email_return_path" => "bounces@openstreetmap.org",
"geonames_username" => "openstreetmap",
- "geoip_database" => "/usr/share/GeoIP/GeoIPv6.dat",
- "trace_use_job_queue" => false
+ "geoip_database" => "/usr/share/GeoIP/GeoIPv6.dat"
)
if new_resource.memcache_servers