@drumee/setup-infra 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/bin/init-acme +13 -5
  2. package/bin/init-private +40 -0
  3. package/bin/prosody +1 -1
  4. package/index.js +330 -163
  5. package/package.json +3 -4
  6. package/templates/etc/bind/named.conf.options +1 -1
  7. package/templates/etc/bind/named.conf.private +21 -0
  8. package/templates/etc/bind/{named.conf.local → named.conf.public} +2 -2
  9. package/templates/etc/dkimkeys/dkim.key +1 -1
  10. package/templates/etc/drumee/conf.d/myDrumee.json.tpl +2 -2
  11. package/templates/etc/drumee/dnsapi.sh.tpl +1 -1
  12. package/templates/etc/drumee/drumee.sh.tpl +24 -17
  13. package/templates/etc/drumee/env.json +1 -1
  14. package/templates/etc/drumee/infrastructure/routes/main.conf.tpl +23 -13
  15. package/templates/etc/drumee/ssl/{main.conf.tpl → private.conf.tpl} +2 -4
  16. package/templates/etc/drumee/ssl/public.conf.tpl +10 -0
  17. package/templates/etc/mysql/mariadb.conf.d/50-client.cnf +21 -0
  18. package/templates/etc/mysql/mariadb.conf.d/50-server.cnf +2 -1
  19. package/templates/etc/nginx/nginx.conf +2 -2
  20. package/templates/etc/nginx/sites-enabled/jitsi.conf.tpl +4 -4
  21. package/templates/etc/nginx/sites-enabled/{loopback.tpl → localhost.conf} +9 -10
  22. package/templates/etc/nginx/sites-enabled/pivate.jitsi.conf.tpl +28 -0
  23. package/templates/etc/nginx/sites-enabled/private.conf.tpl +40 -0
  24. package/templates/etc/nginx/sites-enabled/{drumee.conf.tpl → public.conf.tpl} +8 -8
  25. package/templates/etc/nginx/sites-enabled/public.jitsi.conf.tpl +28 -0
  26. package/templates/etc/postfix/main.cf +1 -1
  27. package/templates/etc/prosody/conf.d/private.cfg.lua.tpl +162 -0
  28. package/templates/etc/prosody/conf.d/public.cfg.lua.tpl +162 -0
  29. package/templates/index.js +19 -13
  30. package/templates/utils.js +240 -0
  31. package/templates/var/lib/bind/private-reverse.tpl +17 -0
  32. package/templates/var/lib/bind/prvate.tpl +70 -0
  33. package/thidima.sh +0 -44
  34. /package/templates/var/lib/bind/{reverse.tpl → public-reverse.tpl} +0 -0
  35. /package/templates/var/lib/bind/{domain.tpl → public.tpl} +0 -0
@@ -0,0 +1,70 @@
1
+ $TTL 3D
2
+ $ORIGIN <%= private_domain %>.
3
+ ;
4
+ @ IN SOA ns1.<%= private_domain %>. master.<%= private_domain %>. (
5
+ <%= serial %> ; serial, today date + today serial
6
+ 1H ; refresh, seconds
7
+ 2H ; retry, seconds
8
+ 4W ; expire, seconds
9
+ 1D ) ; minimum, seconds
10
+ ;
11
+ ;
12
+ @ 60 IN NS ns1.<%= private_domain %>.
13
+ @ 60 IN NS ns2.<%= private_domain %>.
14
+ ;
15
+ <% if (typeof(private_ip4) !== "undefined" && private_ip4 != "" ) { %>
16
+ ; A records
17
+ @ 60 IN A <%= private_ip4 %>
18
+ ns1 60 IN A <%= private_ip4 %>
19
+ ns2 60 IN A <%= private_ip4 %>
20
+ smtp 60 IN A <%= private_ip4 %>
21
+ jit 60 IN A <%= private_ip4 %>
22
+ * 60 IN A <%= private_ip4 %>
23
+ ;
24
+ <% } %>
25
+ <% if (typeof(private_ip6) !== "undefined" && private_ip6 != "" ) { %>
26
+ ; AAAA records
27
+ @ 60 IN AAAA <%= private_ip6 %>
28
+ ns1 60 IN AAAA <%= private_ip6 %>
29
+ ns2 60 IN AAAA <%= private_ip6 %>
30
+ smtp 60 IN AAAA <%= private_ip6 %>
31
+ jit 60 IN AAAA <%= private_ip6 %>
32
+ * 60 IN AAAA <%= private_ip6 %>
33
+ <% } %>
34
+ ;
35
+ ; CNAME
36
+ ;
37
+ www IN CNAME <%= private_domain %>.
38
+ ;
39
+ ; MX records
40
+ ;
41
+ @ 60 IN MX 10 smtp.<%= private_domain %>.
42
+
43
+ ; TXT records
44
+ _acme-challenge 60 IN TXT "acme-challenge"
45
+ @ 60 IN TXT "v=spf1 a ~all"
46
+ @ 60 IN TXT (<%= dkim_key %>)
47
+ ;
48
+ ;
49
+ ; DKIM
50
+ smtp._domainkey 60 IN TXT (<%= dkim_key %>)
51
+ dkim._domainkey 60 IN TXT (<%= dkim_key %>)
52
+ ;
53
+ ;
54
+ ; DMARC
55
+ _dmarc 60 IN TXT "v=DMARC1; p=quarantine; sp=quarantine; aspf=s"
56
+ ;
57
+ ;
58
+ ; Jitsi subdomain
59
+ $ORIGIN <%= jitsi_domain %>.
60
+ ;
61
+ <% if (typeof(private_ip4) !== "undefined" && private_ip4 != "" ) { %>
62
+ * 60 IN A <%= private_ip4 %>
63
+ <% } %>
64
+ <% if (typeof(private_ip6) !== "undefined" && private_ip6 != "" ) { %>
65
+ * 60 IN AAAA <%= private_ip6 %>
66
+ <% } %>
67
+ ;
68
+ ; TXT records
69
+ _acme-challenge 60 IN TXT "jit-acme-challenge"
70
+
package/thidima.sh DELETED
@@ -1,44 +0,0 @@
1
- # Change below values accordingly to you setup
2
-
3
- # This text will be shown on the login page
4
- export DRUMEE_DESCRIPTION="My Drumee Box"
5
-
6
- # This is the URL base to access your Drumee Instance
7
- # It's recommanded not to share the domain name
8
- # with any oher applications
9
- export DRUMEE_DOMAIN_NAME="thidima.org"
10
-
11
- # Fix IPV4 address bound to your doamain_name
12
- export PUBLIC_IP4="51.195.89.55"
13
-
14
- # IPV6 address bound to your doamain_name
15
- export PUBLIC_IP6="2001:41d0:700:4837::"
16
-
17
- # This email will be use as the admin account
18
- export ADMIN_EMAIL="somanos@drumee.com"
19
-
20
- # Dedicated to data base server. Do not share with any
21
- # other application. Default value is /srv/db.
22
- # At least 100GB should be allocated
23
- export DRUMEE_DB_DIR="/db"
24
-
25
- # Dedicated to Drumee Filesystem Management.
26
- # Do not share with any # other application.
27
- # Default value is /data
28
- # At least 100GB should be allocated
29
- export DRUMEE_DATA_DIR="/data" # defaulted to /data
30
-
31
- # Optional setting
32
- # Drumee use rsync to backup data (FMS, DB and configs)
33
- # If you plan to make a backup on a remote host, ensure
34
- # ssh keys are properly setup
35
- export STORAGE_BACKUP="/backup" # [user@host-or-ip:]/path/
36
-
37
- # If not set, will be defaulted to ADMIN_EMAIL.
38
- # SSL certificates are generated using zerossl.com ACME server
39
- # This requires an emal to be provided.
40
- export ACME_EMAIL_ACCOUNT=""
41
-
42
- mkdir -p $DRUMEE_DB_DIR
43
- mkdir -p $DRUMEE_DATA_DIR
44
- mkdir -p $STORAGE_BACKUP