view conf/Init.luan @ 58:41d76bd6268a

add doc for ssl
author Vadim Filimonov <fffilimonov@yandex.ru>
date Tue, 30 Nov 2021 09:32:14 +0200
parents 6bd33547304f
children 3d7067a23eff
line wrap: on
line source

java()
local Luan = require "luan:Luan.luan"
local error = Luan.error
local Io = require "luan:Io.luan"
local uri = Io.uri or error()
local MailHome = require "java:fschmidt.util.mail.MailHome"
local System = require "java:java.lang.System"
local Logging = require "luan:logging/Logging.luan"
local logger = Logging.logger "Init_default"
local pairs = Luan.pairs or error()

local Init = {}

System.setProperty("mail.smtp.host", "mail.smtp2go.com")
System.setProperty("mail.mime.base64.ignoreerrors", "true")
System.setProperty("mail.mime.address.strict", "false")
System.setProperty("mail.mime.decodetext.strict", "false")

Init.dbUrl = "jdbc:postgresql://localhost:5432/nabble"
Init.dbUser = "administrator"
Init.dbPassword = ""

Init.poolSize = 130

Init.home_dir = uri( uri("classpath:nabble").to_string() ).parent().parent().to_string().."/"

-- for now
local smtp = MailHome.getSmtpServer("mail.smtp2go.com","dev@singlesushi.com","FB4dating")
smtp.setPort(2525)
MailHome.setDefaultSmtpServer(smtp)

Init.homeContextUrl = "http://me.nabble.com:8081"

Init.deleteInactiveSites = false
Init.nabbleHost = "me.nabble.com:8080"


Init.defaultHost = "me.nabble.com:8080"
Init.domain = Init.defaultHost
Init.nabbleHost = Init.defaultHost


--local HashSet = require "java:java.util.HashSet"
--Init.sysadmins = HashSet.new {}  -- list of emails

--Init.monitor_emails = {}  -- list of emails

--Init.ssl_dir = nil


-- for serve_nabble.luan

function Init.fix_serve(Serve)
	if Serve.is_www then
		Serve.is_forums = false
		local Server = require "java:global.Server"
		Server.add("local","jdbc:postgresql://localhost:5432/nabble","administrator","","me.nabble.com");
	else
		Serve.www_port = 8081
		Serve.is_www = true
	end
end


function Init.add_filters(context)
end


return Init