Mercurial Hosting > nabble
annotate conf/Init.luan @ 69:4bc1fc540265 default tip
update luan
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Sun, 05 Oct 2025 20:45:39 -0600 |
| parents | 3d7067a23eff |
| children |
| rev | line source |
|---|---|
| 69 | 1 require "java" |
| 0 | 2 local Luan = require "luan:Luan.luan" |
| 3 local error = Luan.error | |
|
2
abe0694e9849
replace local_dir with home_dir
Franklin Schmidt <fschmidt@gmail.com>
parents:
0
diff
changeset
|
4 local Io = require "luan:Io.luan" |
|
abe0694e9849
replace local_dir with home_dir
Franklin Schmidt <fschmidt@gmail.com>
parents:
0
diff
changeset
|
5 local uri = Io.uri or error() |
| 0 | 6 local MailHome = require "java:fschmidt.util.mail.MailHome" |
| 7 local System = require "java:java.lang.System" | |
| 8 local Logging = require "luan:logging/Logging.luan" | |
| 9 local logger = Logging.logger "Init_default" | |
|
42
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
10 local pairs = Luan.pairs or error() |
| 0 | 11 |
| 12 local Init = {} | |
| 13 | |
|
42
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
14 System.setProperty("mail.smtp.host", "mail.smtp2go.com") |
| 0 | 15 System.setProperty("mail.mime.base64.ignoreerrors", "true") |
| 16 System.setProperty("mail.mime.address.strict", "false") | |
| 17 System.setProperty("mail.mime.decodetext.strict", "false") | |
| 18 | |
| 19 Init.dbUrl = "jdbc:postgresql://localhost:5432/nabble" | |
| 20 Init.dbUser = "administrator" | |
| 21 Init.dbPassword = "" | |
| 22 | |
| 23 Init.poolSize = 130 | |
| 24 | |
|
2
abe0694e9849
replace local_dir with home_dir
Franklin Schmidt <fschmidt@gmail.com>
parents:
0
diff
changeset
|
25 Init.home_dir = uri( uri("classpath:nabble").to_string() ).parent().parent().to_string().."/" |
| 0 | 26 |
| 27 -- for now | |
| 65 | 28 local smtp = MailHome.getSmtpServer("mail.smtp2go.com","nabble","nabble") |
| 0 | 29 smtp.setPort(2525) |
| 30 MailHome.setDefaultSmtpServer(smtp) | |
| 31 | |
| 32 Init.homeContextUrl = "http://me.nabble.com:8081" | |
| 33 | |
| 34 Init.deleteInactiveSites = false | |
| 35 Init.nabbleHost = "me.nabble.com:8080" | |
| 36 | |
| 37 | |
| 38 Init.defaultHost = "me.nabble.com:8080" | |
| 39 Init.domain = Init.defaultHost | |
| 40 Init.nabbleHost = Init.defaultHost | |
| 41 | |
| 42 | |
| 43 --local HashSet = require "java:java.util.HashSet" | |
| 44 --Init.sysadmins = HashSet.new {} -- list of emails | |
| 45 | |
| 46 --Init.monitor_emails = {} -- list of emails | |
| 47 | |
| 6 | 48 --Init.ssl_dir = nil |
| 49 | |
| 0 | 50 |
| 51 -- for serve_nabble.luan | |
| 52 | |
| 53 function Init.fix_serve(Serve) | |
| 54 if Serve.is_www then | |
| 55 Serve.is_forums = false | |
| 54 | 56 local Server = require "java:global.Server" |
| 57 Server.add("local","jdbc:postgresql://localhost:5432/nabble","administrator","","me.nabble.com"); | |
| 0 | 58 else |
| 59 Serve.www_port = 8081 | |
| 60 Serve.is_www = true | |
| 61 end | |
| 62 end | |
| 63 | |
| 18 | 64 |
| 0 | 65 function Init.add_filters(context) |
| 66 end | |
| 67 | |
| 68 | |
| 69 return Init |
