diff options
Diffstat (limited to 'prosody/templates')
| -rw-r--r-- | prosody/templates/prosody.cfg.lua.j2 | 19 | ||||
| -rw-r--r-- | prosody/templates/setup_db.psql.j2 | 2 |
2 files changed, 17 insertions, 4 deletions
diff --git a/prosody/templates/prosody.cfg.lua.j2 b/prosody/templates/prosody.cfg.lua.j2 index 15a1b38..32bc1a6 100644 --- a/prosody/templates/prosody.cfg.lua.j2 +++ b/prosody/templates/prosody.cfg.lua.j2 @@ -1,8 +1,19 @@ VirtualHost "{{prosody_vhost}}" - ssl = { - key = "{{prosody_ssl_privkey}}"; - certificate = "{{prosody_ssl_cert}}"; - } + +ssl = { + key = "{{prosody_ssl_privkey}}"; + certificate = "{{prosody_ssl_cert}}"; +} + +storage = "sql" +sql = { + driver = "PostgreSQL"; + database = "{{prosody_db}}"; + host = "localhost"; + port = {{prosody_db_port}}; + username = "{{prosody_db}}"; + password = "{{prosody_db_pass}}"; +} ------ Components ------ -- You can specify components to add hosts that provide special services, diff --git a/prosody/templates/setup_db.psql.j2 b/prosody/templates/setup_db.psql.j2 new file mode 100644 index 0000000..25e9ec0 --- /dev/null +++ b/prosody/templates/setup_db.psql.j2 @@ -0,0 +1,2 @@ +CREATE USER {{prosody_db}} WITH ENCRYPTED PASSWORD '{{prosody_db_pass}}'; +CREATE DATABASE {{prosody_db}} ENCODING 'UTF8' LC_COLLATE='C.UTF-8' LC_CTYPE='C.UTF-8' template=template0 OWNER {{prosody_db}}; |
