openship 0.4.5 → 0.4.7
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.
- package/README.md +2 -24
- package/dist/bare-2HYDXQEH.js +23 -0
- package/dist/{bowser-L6PVH37V.js → bowser-O3AEA6AN.js} +3 -1
- package/dist/{chunk-YFLQGDN2.js → chunk-4TJC4JZQ.js} +18 -9
- package/dist/{chunk-JXQCFTDV.js → chunk-4Z5QO7N6.js} +4 -2
- package/dist/{chunk-JJVSOE4I.js → chunk-5MZ624VX.js} +2 -0
- package/dist/{chunk-TDFK6ISF.js → chunk-6APIPIJY.js} +6 -4
- package/dist/{chunk-3LCRNQ2C.js → chunk-6APULWSU.js} +151 -133
- package/dist/{chunk-FTBXJ2VA.js → chunk-6B5YCFFV.js} +6 -4
- package/dist/{chunk-MDFYN2QH.js → chunk-AVIB7CT7.js} +3 -1
- package/dist/{chunk-W7KGHYLV.js → chunk-DYPH4HCI.js} +2 -0
- package/dist/{chunk-5WI7ZXOC.js → chunk-EI575GHN.js} +4 -2
- package/dist/{chunk-Z6EKX6CX.js → chunk-FPRHYBY2.js} +2 -0
- package/dist/{chunk-FZJX6XP7.js → chunk-FRNAR33O.js} +4 -2
- package/dist/{chunk-XRWV5ZNR.js → chunk-FXTBHTWY.js} +360 -42
- package/dist/chunk-ILFETZOM.js +131 -0
- package/dist/{chunk-E3ZPCNPU.js → chunk-IMBD5PZ5.js} +251 -105
- package/dist/{chunk-VJTXRCTT.js → chunk-IPYPMI3S.js} +10 -6
- package/dist/{chunk-PARRPUXN.js → chunk-IXCHURVK.js} +5 -3
- package/dist/{chunk-YJAS5RQX.js → chunk-JYGD5WSN.js} +2 -0
- package/dist/{chunk-JWBXYO24.js → chunk-KI2EY3WB.js} +2 -0
- package/dist/{chunk-YVXF6GGR.js → chunk-L2VOGB2X.js} +5 -104
- package/dist/{chunk-K5OH5U7N.js → chunk-MZ2WEHHY.js} +5 -3
- package/dist/{chunk-SJBR527P.js → chunk-O6ZZF52V.js} +3 -1
- package/dist/{chunk-VLPJLXXB.js → chunk-OWED2GRM.js} +3 -1
- package/dist/{chunk-C4FOQJ63.js → chunk-OXWDY22G.js} +4 -2
- package/dist/{chunk-NPVJYR7M.js → chunk-Q2CIRAOK.js} +2 -0
- package/dist/chunk-R5BHFFAV.js +282 -0
- package/dist/{chunk-JYAGTMSJ.js → chunk-RPHRPFEH.js} +2 -0
- package/dist/{chunk-R74UB4X4.js → chunk-SJIFLLX4.js} +397 -85
- package/dist/{chunk-HYL4QYZM.js → chunk-TGIINPVM.js} +13 -2
- package/dist/{chunk-SYCZE6FQ.js → chunk-TYVME3XD.js} +7 -1
- package/dist/{chunk-UMYQALBH.js → chunk-UXWAVM4C.js} +1788 -1484
- package/dist/{chunk-HDV4NSA3.js → chunk-V6AN6XLZ.js} +16 -6
- package/dist/{chunk-3YCMJRDZ.js → chunk-VDMQJHPI.js} +36 -15
- package/dist/{chunk-RZPDJC2J.js → chunk-VFINNTUL.js} +20 -1
- package/dist/{chunk-65KKUJBR.js → chunk-VWPEKOH6.js} +4 -2
- package/dist/{chunk-GHXGCANU.js → chunk-W73X43R7.js} +4 -2
- package/dist/{chunk-7EYFCKZX.js → chunk-XFCDYZUQ.js} +8 -6
- package/dist/cloud-2KXREXMO.js +30 -0
- package/dist/{cloud-7IGG45CF.js → cloud-7QYOGF7F.js} +4 -2
- package/dist/detect-2XSCFFTF.js +44 -0
- package/dist/{dist-NQB6QGX3.js → dist-IQJ6H6UZ.js} +4 -2
- package/dist/{dist-es-DCR6UJMP.js → dist-es-5DY7K32L.js} +7 -5
- package/dist/{dist-es-TYYZ5KEF.js → dist-es-JSTDUS7Q.js} +7 -5
- package/dist/{dist-es-7EZIM4JU.js → dist-es-OSNJBLXB.js} +6 -4
- package/dist/{dist-es-6RSPR56Q.js → dist-es-RYHIPOTN.js} +15 -13
- package/dist/{dist-es-33Z3Y6VE.js → dist-es-VNKHQVIB.js} +5 -3
- package/dist/{dist-es-D6QQVWRZ.js → dist-es-WV4AMOII.js} +9 -7
- package/dist/{dist-es-GMEQINIE.js → dist-es-X3B5QYKB.js} +7 -5
- package/dist/docker-LODK5Y2S.js +16 -0
- package/dist/docker-edge-executor-VHW3JPJS.js +13 -0
- package/dist/edge-import-ZQ4Y5HEA.js +45 -0
- package/dist/ensure-container-edge-ED25XL3Z.js +31 -0
- package/dist/{event-streams-G7F6Q7QY.js → event-streams-EHRAKL75.js} +5 -3
- package/dist/{executor-O5NR7LMP.js → executor-YPT6RH6O.js} +9 -7
- package/dist/index.d.ts +2 -1
- package/dist/index.js +279 -245
- package/dist/{loadSso-LH753OSJ.js → loadSso-46FQRIZS.js} +11 -9
- package/dist/local-executor-V7U5VOZW.js +12 -0
- package/dist/nginx-XWJAOGS4.js +24 -0
- package/dist/{noop-6KC6HRDB.js → noop-FMMFG2EZ.js} +4 -2
- package/dist/{openresty-lua-KFCOJAG4.js → openresty-lua-4WLGDSER.js} +11 -3
- package/dist/server/engine/ChangeLog +2289 -0
- package/dist/server/engine/Documentations +5 -0
- package/dist/server/engine/LICENSE +674 -0
- package/dist/server/engine/README.md +34 -0
- package/dist/server/engine/conf/amavisd +150 -0
- package/dist/server/engine/conf/clamav +71 -0
- package/dist/server/engine/conf/core +632 -0
- package/dist/server/engine/conf/dovecot +151 -0
- package/dist/server/engine/conf/fail2ban +72 -0
- package/dist/server/engine/conf/global +698 -0
- package/dist/server/engine/conf/iredapd +52 -0
- package/dist/server/engine/conf/logwatch +28 -0
- package/dist/server/engine/conf/postfix +97 -0
- package/dist/server/engine/conf/postgresql +93 -0
- package/dist/server/engine/conf/spamassassin +39 -0
- package/dist/server/engine/dialog/config_via_dialog.sh +258 -0
- package/dist/server/engine/dialog/optional_components.sh +122 -0
- package/dist/server/engine/dialog/pgsql_config.sh +52 -0
- package/dist/server/engine/dialog/virtual_domain_config.sh +94 -0
- package/dist/server/engine/functions/amavisd.sh +267 -0
- package/dist/server/engine/functions/backend.sh +85 -0
- package/dist/server/engine/functions/clamav.sh +100 -0
- package/dist/server/engine/functions/cleanup.sh +393 -0
- package/dist/server/engine/functions/dovecot.sh +583 -0
- package/dist/server/engine/functions/fail2ban.sh +209 -0
- package/dist/server/engine/functions/iredapd.sh +356 -0
- package/dist/server/engine/functions/optional_components.sh +24 -0
- package/dist/server/engine/functions/packages.sh +522 -0
- package/dist/server/engine/functions/packages_freebsd.sh +179 -0
- package/dist/server/engine/functions/postfix.sh +457 -0
- package/dist/server/engine/functions/postgresql.sh +239 -0
- package/dist/server/engine/functions/spamassassin.sh +49 -0
- package/dist/server/engine/functions/system_accounts.sh +128 -0
- package/dist/server/engine/iRedMail.sh +144 -0
- package/dist/server/engine/pkgs/get_all.sh +338 -0
- package/dist/server/engine/pkgs/pkgs.freebsd.sha256 +3 -0
- package/dist/server/engine/pkgs/pkgs.openbsd.sha256 +6 -0
- package/dist/server/engine/pkgs/pkgs.sha256 +1 -0
- package/dist/server/engine/samples/amavisd/amavisd.conf +677 -0
- package/dist/server/engine/samples/amavisd/amavisd.mysql +278 -0
- package/dist/server/engine/samples/amavisd/amavisd.pgsql +253 -0
- package/dist/server/engine/samples/amavisd/amavisd.schema +942 -0
- package/dist/server/engine/samples/amavisd/default_spam_policy.sql +46 -0
- package/dist/server/engine/samples/dovecot/dovecot-2.4-mariadb.conf +758 -0
- package/dist/server/engine/samples/dovecot/dovecot-2.4-openldap.conf +767 -0
- package/dist/server/engine/samples/dovecot/dovecot-2.4-pgsql.conf +762 -0
- package/dist/server/engine/samples/dovecot/dovecot-last-login.conf +50 -0
- package/dist/server/engine/samples/dovecot/dovecot-ldap.conf +21 -0
- package/dist/server/engine/samples/dovecot/dovecot-share-folder.conf +22 -0
- package/dist/server/engine/samples/dovecot/dovecot-sql.conf +28 -0
- package/dist/server/engine/samples/dovecot/dovecot-used-quota.conf +13 -0
- package/dist/server/engine/samples/dovecot/dovecot.conf +484 -0
- package/dist/server/engine/samples/dovecot/dovecot.sieve +7 -0
- package/dist/server/engine/samples/dovecot/dovecot2-quota-warning.sh +38 -0
- package/dist/server/engine/samples/dovecot/sql/imap_share_folder.mysql +16 -0
- package/dist/server/engine/samples/dovecot/sql/last_login.mysql +12 -0
- package/dist/server/engine/samples/dovecot/sql/used_quota.mysql +26 -0
- package/dist/server/engine/samples/dovecot/systemd/override.conf +3 -0
- package/dist/server/engine/samples/fail2ban/action.d/banned_db.conf +9 -0
- package/dist/server/engine/samples/fail2ban/bin/fail2ban_banned_db +268 -0
- package/dist/server/engine/samples/fail2ban/fail2ban.local +17 -0
- package/dist/server/engine/samples/fail2ban/filter.d/dovecot.iredmail.conf +5 -0
- package/dist/server/engine/samples/fail2ban/filter.d/postfix-pregreet.iredmail.conf +16 -0
- package/dist/server/engine/samples/fail2ban/filter.d/postfix.iredmail.conf +18 -0
- package/dist/server/engine/samples/fail2ban/filter.d/roundcube.iredmail.conf +9 -0
- package/dist/server/engine/samples/fail2ban/jail.d/dovecot.local +8 -0
- package/dist/server/engine/samples/fail2ban/jail.d/nginx-http-auth.local +8 -0
- package/dist/server/engine/samples/fail2ban/jail.d/postfix-pregreet.local +9 -0
- package/dist/server/engine/samples/fail2ban/jail.d/postfix.local +8 -0
- package/dist/server/engine/samples/fail2ban/jail.d/roundcube.local +9 -0
- package/dist/server/engine/samples/fail2ban/jail.d/sogo.local +8 -0
- package/dist/server/engine/samples/fail2ban/jail.d/sshd.local +8 -0
- package/dist/server/engine/samples/fail2ban/jail.local +6 -0
- package/dist/server/engine/samples/fail2ban/openbsd/rc +27 -0
- package/dist/server/engine/samples/fail2ban/sql/fail2ban.mysql +49 -0
- package/dist/server/engine/samples/fail2ban/sql/fail2ban.pgsql +48 -0
- package/dist/server/engine/samples/firewall/firewalld/services/ssh.xml +6 -0
- package/dist/server/engine/samples/firewall/firewalld/zones/iredmail.xml +15 -0
- package/dist/server/engine/samples/firewall/iptables/ip6tables.init.debian +362 -0
- package/dist/server/engine/samples/firewall/iptables/ip6tables.rules +53 -0
- package/dist/server/engine/samples/firewall/iptables/iptables.init.debian +363 -0
- package/dist/server/engine/samples/firewall/iptables/iptables.rules +54 -0
- package/dist/server/engine/samples/firewall/nftables.conf +58 -0
- package/dist/server/engine/samples/freebsd/newsyslog.conf.d/dovecot.conf +3 -0
- package/dist/server/engine/samples/freebsd/newsyslog.conf.d/iredapd.conf +1 -0
- package/dist/server/engine/samples/freebsd/newsyslog.conf.d/mlmmjadmin.conf +1 -0
- package/dist/server/engine/samples/freebsd/newsyslog.conf.d/php-fpm.conf +2 -0
- package/dist/server/engine/samples/freebsd/newsyslog.conf.d/slapd.conf +1 -0
- package/dist/server/engine/samples/freebsd/syslog.d/dovecot.conf +2 -0
- package/dist/server/engine/samples/freebsd/syslog.d/fail2ban.conf +2 -0
- package/dist/server/engine/samples/freebsd/syslog.d/iredapd.conf +2 -0
- package/dist/server/engine/samples/freebsd/syslog.d/mlmmjadmin.conf +2 -0
- package/dist/server/engine/samples/freebsd/syslog.d/php-fpm.conf +2 -0
- package/dist/server/engine/samples/freebsd/syslog.d/slapd.conf +2 -0
- package/dist/server/engine/samples/iredmail/iredmail.mysql +491 -0
- package/dist/server/engine/samples/iredmail/iredmail.pgsql +465 -0
- package/dist/server/engine/samples/iredmail/iredmail.schema +456 -0
- package/dist/server/engine/samples/iredmail/used_quota_triggers_dovecot_2.3.pgsql +40 -0
- package/dist/server/engine/samples/iredmail/used_quota_triggers_dovecot_2.4.pgsql +18 -0
- package/dist/server/engine/samples/logrotate/dovecot +13 -0
- package/dist/server/engine/samples/logrotate/iredapd +13 -0
- package/dist/server/engine/samples/logrotate/mlmmjadmin +13 -0
- package/dist/server/engine/samples/logrotate/openldap +19 -0
- package/dist/server/engine/samples/logrotate/php-fpm +13 -0
- package/dist/server/engine/samples/openbsd/ldapd.conf +58 -0
- package/dist/server/engine/samples/openbsd/pf.conf +28 -0
- package/dist/server/engine/samples/postfix/command_filter.pcre +3 -0
- package/dist/server/engine/samples/postfix/freebsd/mailer.conf +9 -0
- package/dist/server/engine/samples/postfix/helo_access.pcre +180 -0
- package/dist/server/engine/samples/postfix/ldap/catchall_maps.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/recipient_bcc_maps_domain.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/recipient_bcc_maps_user.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/relay_domains.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/sender_bcc_maps_domain.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/sender_bcc_maps_user.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/sender_dependent_relayhost_maps_domain.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/sender_dependent_relayhost_maps_user.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/sender_login_maps.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/transport_maps_domain.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/transport_maps_user.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/virtual_alias_maps.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/virtual_group_maps.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/virtual_group_members_maps.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/virtual_mailbox_domains.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/virtual_mailbox_maps.cf +12 -0
- package/dist/server/engine/samples/postfix/main.cf +282 -0
- package/dist/server/engine/samples/postfix/main.cf.amavisd +7 -0
- package/dist/server/engine/samples/postfix/main.cf.dovecot +8 -0
- package/dist/server/engine/samples/postfix/main.cf.ldap +39 -0
- package/dist/server/engine/samples/postfix/main.cf.mlmmj +5 -0
- package/dist/server/engine/samples/postfix/main.cf.mysql +39 -0
- package/dist/server/engine/samples/postfix/main.cf.pgsql +39 -0
- package/dist/server/engine/samples/postfix/main.cf.postscreen +30 -0
- package/dist/server/engine/samples/postfix/master.cf +87 -0
- package/dist/server/engine/samples/postfix/mysql/catchall_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/domain_alias_catchall_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/domain_alias_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/recipient_bcc_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/recipient_bcc_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/relay_domains.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/sender_bcc_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/sender_bcc_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/sender_dependent_relayhost_maps.cf +6 -0
- package/dist/server/engine/samples/postfix/mysql/sender_login_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/transport_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/transport_maps_maillist.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/transport_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/virtual_alias_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/virtual_mailbox_domains.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/virtual_mailbox_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/catchall_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/domain_alias_catchall_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/domain_alias_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/recipient_bcc_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/recipient_bcc_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/relay_domains.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/sender_bcc_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/sender_bcc_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/sender_dependent_relayhost_maps.cf +6 -0
- package/dist/server/engine/samples/postfix/pgsql/sender_login_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/transport_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/transport_maps_maillist.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/transport_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/virtual_alias_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/virtual_mailbox_domains.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/virtual_mailbox_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/postscreen_access.cidr +6 -0
- package/dist/server/engine/samples/postgresql/sql/add_first_domain_and_user.sql +34 -0
- package/dist/server/engine/samples/postgresql/sql/grant_permissions.sql +14 -0
- package/dist/server/engine/samples/postgresql/sql/init_vmail_db.sql +15 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-dovecot.conf +23 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-fail2ban.conf +2 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-iredapd.conf +12 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-mlmmjadmin.conf +12 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-openldap.conf +2 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-phpfpm.conf +3 -0
- package/dist/server/engine/samples/spamassassin/local.cf +186 -0
- package/dist/server/engine/samples/spamassassin/razor.conf +1 -0
- package/dist/server/engine/samples/systemd/clamd.service.d/override.conf +2 -0
- package/dist/server/engine/samples/systemd/mariadb.service.d/override.conf +3 -0
- package/dist/server/engine/samples/systemd/slapd.service.d/override.conf +6 -0
- package/dist/server/engine/samples/yum/CentOS-Linux-AppStream.repo +6 -0
- package/dist/server/engine/samples/yum/CentOS-Linux-PowerTools.repo +6 -0
- package/dist/server/engine/samples/yum/CentOS-Stream-AppStream.repo +7 -0
- package/dist/server/engine/samples/yum/CentOS-Stream-PowerTools.repo +7 -0
- package/dist/server/engine/samples/yum/symas-openldap.repo +6 -0
- package/dist/server/engine/tools/add_enabled_service.py +60 -0
- package/dist/server/engine/tools/backup_mysql.sh +238 -0
- package/dist/server/engine/tools/backup_openldap.sh +230 -0
- package/dist/server/engine/tools/backup_pgsql.sh +217 -0
- package/dist/server/engine/tools/backup_sogo.sh +156 -0
- package/dist/server/engine/tools/create_mail_user_OpenLDAP.py +335 -0
- package/dist/server/engine/tools/create_mail_user_OpenLDAP.sh +287 -0
- package/dist/server/engine/tools/create_mail_user_SQL.sh +127 -0
- package/dist/server/engine/tools/enable_postscreen.sh +144 -0
- package/dist/server/engine/tools/fail2ban_unban_ip.sh +39 -0
- package/dist/server/engine/tools/find_sasl_login_ip.sh +20 -0
- package/dist/server/engine/tools/find_top_sasl_usernames.sh +28 -0
- package/dist/server/engine/tools/generate_ssl_keys.sh +85 -0
- package/dist/server/engine/tools/kill_high_cpu_sogo_process.sh +32 -0
- package/dist/server/engine/tools/ldap_assign_user_to_groups.py +151 -0
- package/dist/server/engine/tools/ldap_move_members_to_another_group.py +129 -0
- package/dist/server/engine/tools/migrate_sql_alias_table.py +177 -0
- package/dist/server/engine/update/0.9.8/amavisd.mysql +29 -0
- package/dist/server/engine/update/0.9.8/amavisd.pgsql +39 -0
- package/dist/server/engine/update/0.9.8/iredmail.mysql +53 -0
- package/dist/server/engine/update/0.9.8/iredmail.pgsql +61 -0
- package/dist/server/engine/update/0.9.9/iredmail.mysql +2 -0
- package/dist/server/engine/update/0.9.9/iredmail.pgsql +2 -0
- package/dist/server/engine/update/1.0/iredmail.mysql +2 -0
- package/dist/server/engine/update/1.0/iredmail.pgsql +2 -0
- package/dist/server/engine/update/1.2/last_login.mysql +16 -0
- package/dist/server/engine/update/1.4.0/iredmail.mysql +22 -0
- package/dist/server/engine/update/1.4.0/iredmail.pgsql +20 -0
- package/dist/server/engine/update/1.4.1/iredmail.mysql +3 -0
- package/dist/server/engine/update/1.4.1/iredmail.pgsql +3 -0
- package/dist/server/engine/update/1.4.1/sogo.mysql +11 -0
- package/dist/server/engine/update/1.4.1/sogo.pgsql +30 -0
- package/dist/server/engine/update/1.4.1/update-ldap.py +66 -0
- package/dist/server/engine/update/1.4.2/iredmail.mysql +9 -0
- package/dist/server/engine/update/1.4.2/iredmail.pgsql +9 -0
- package/dist/server/engine/update/1.4.2/sogo.pgsql +30 -0
- package/dist/server/engine/update/1.6.0/sogo_view.pgsql +27 -0
- package/dist/server/engine/update/1.6.3/iredmail.mysql +1 -0
- package/dist/server/engine/update/1.7.0/fail2ban.mysql +11 -0
- package/dist/server/engine/update/1.7.0/fail2ban.pgsql +12 -0
- package/dist/server/engine/update/1.7.1/amavisd.mysql +1 -0
- package/dist/server/engine/update/1.7.2/vmail.mysql +30 -0
- package/dist/server/engine/update/1.7.3/deleted_mailboxes.mysql +43 -0
- package/dist/server/engine/update/1.7.3/iredadmin.mysql +26 -0
- package/dist/server/engine/update/1.7.3/vmail.mysql +79 -0
- package/dist/server/engine/update/1.7.3/vmail.pgsql +9 -0
- package/dist/server/engine/update/README.md +1 -0
- package/dist/server/engine/update/ldap/README.md +40 -0
- package/dist/server/engine/update/ldap/update-ldap-dovecot-2.3.py +69 -0
- package/dist/server/index.js +55793 -53701
- package/dist/server/migrations/0071_gh_device_token.sql +3 -0
- package/dist/server/migrations/0072_gh_device_token_method.sql +1 -0
- package/dist/server/migrations/meta/_journal.json +14 -0
- package/dist/setup-2DMFIA74.js +20 -0
- package/dist/{signin-PVC7MBZJ.js → signin-ITOPKKUB.js} +11 -9
- package/dist/{sso-oidc-ZXY77BSL.js → sso-oidc-NON2PD7Y.js} +11 -9
- package/dist/{sts-LX5L4UU3.js → sts-HHFFSAY2.js} +10 -8
- package/package.json +1 -1
- package/dist/bare-CNSFDNSZ.js +0 -20
- package/dist/cloud-655YYCEW.js +0 -26
- package/dist/docker-UWQPDEGW.js +0 -14
- package/dist/docker-edge-executor-ZLAYE5FE.js +0 -11
- package/dist/edge-import-AFID2EN3.js +0 -41
- package/dist/nginx-M36GDYL7.js +0 -18
- package/dist/setup-ZXXB5S22.js +0 -16
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
":" //# ; exec "$(command -v bun || command -v node)" "$0" "$@"
|
|
1
3
|
import { createRequire as __ospCreateRequire } from "node:module";
|
|
2
4
|
const require = __ospCreateRequire(import.meta.url);
|
|
5
|
+
import {
|
|
6
|
+
ENV_KEY,
|
|
7
|
+
ENV_SECRET,
|
|
8
|
+
fromEnv
|
|
9
|
+
} from "./chunk-FRNAR33O.js";
|
|
3
10
|
import {
|
|
4
11
|
SignatureV4MultiRegion,
|
|
5
12
|
XmlNode,
|
|
6
13
|
XmlShapeDeserializer,
|
|
7
14
|
XmlText
|
|
8
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6APIPIJY.js";
|
|
9
16
|
import {
|
|
10
17
|
AwsSdkSigV4ASigner,
|
|
11
18
|
AwsSdkSigV4Signer,
|
|
@@ -21,27 +28,10 @@ import {
|
|
|
21
28
|
resolveAwsSdkSigV4AConfig,
|
|
22
29
|
resolveAwsSdkSigV4Config,
|
|
23
30
|
streamCollector
|
|
24
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-IXCHURVK.js";
|
|
25
32
|
import {
|
|
26
33
|
NodeHttpHandler
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import {
|
|
29
|
-
AwsCrc32,
|
|
30
|
-
__awaiter,
|
|
31
|
-
__generator,
|
|
32
|
-
__values,
|
|
33
|
-
convertToBuffer,
|
|
34
|
-
eventStreamSerdeProvider2 as eventStreamSerdeProvider,
|
|
35
|
-
isEmptyData,
|
|
36
|
-
numToUint8,
|
|
37
|
-
resolveEventStreamSerdeConfig,
|
|
38
|
-
uint32ArrayFrom
|
|
39
|
-
} from "./chunk-SJBR527P.js";
|
|
40
|
-
import {
|
|
41
|
-
ENV_KEY,
|
|
42
|
-
ENV_SECRET,
|
|
43
|
-
fromEnv
|
|
44
|
-
} from "./chunk-FZJX6XP7.js";
|
|
34
|
+
} from "./chunk-OWED2GRM.js";
|
|
45
35
|
import {
|
|
46
36
|
BinaryDecisionDiagram,
|
|
47
37
|
Client,
|
|
@@ -77,7 +67,7 @@ import {
|
|
|
77
67
|
resolveRetryConfig,
|
|
78
68
|
resolveUserAgentConfig,
|
|
79
69
|
setFeature
|
|
80
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-VWPEKOH6.js";
|
|
81
71
|
import {
|
|
82
72
|
CredentialsProviderError,
|
|
83
73
|
ENV_PROFILE,
|
|
@@ -108,7 +98,25 @@ import {
|
|
|
108
98
|
resolveHttpHandlerRuntimeConfig,
|
|
109
99
|
resolveRegionConfig,
|
|
110
100
|
toEndpointV1
|
|
111
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-W73X43R7.js";
|
|
102
|
+
import {
|
|
103
|
+
CloudRuntime
|
|
104
|
+
} from "./chunk-XFCDYZUQ.js";
|
|
105
|
+
import {
|
|
106
|
+
systemCatalog
|
|
107
|
+
} from "./chunk-UXWAVM4C.js";
|
|
108
|
+
import {
|
|
109
|
+
AwsCrc32,
|
|
110
|
+
__awaiter,
|
|
111
|
+
__generator,
|
|
112
|
+
__values,
|
|
113
|
+
convertToBuffer,
|
|
114
|
+
eventStreamSerdeProvider2 as eventStreamSerdeProvider,
|
|
115
|
+
isEmptyData,
|
|
116
|
+
numToUint8,
|
|
117
|
+
resolveEventStreamSerdeConfig,
|
|
118
|
+
uint32ArrayFrom
|
|
119
|
+
} from "./chunk-O6ZZF52V.js";
|
|
112
120
|
import {
|
|
113
121
|
Hash,
|
|
114
122
|
NumericValue,
|
|
@@ -126,36 +134,36 @@ import {
|
|
|
126
134
|
toBase64,
|
|
127
135
|
toUint8Array,
|
|
128
136
|
toUtf8
|
|
129
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-JYGD5WSN.js";
|
|
130
138
|
import {
|
|
131
139
|
DockerRuntime,
|
|
132
140
|
isHostPathSource,
|
|
133
141
|
scopedVolumeName
|
|
134
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-SJIFLLX4.js";
|
|
135
143
|
import {
|
|
136
144
|
BareRuntime
|
|
137
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-VDMQJHPI.js";
|
|
138
146
|
import {
|
|
139
|
-
|
|
140
|
-
} from "./chunk-
|
|
147
|
+
LocalExecutor
|
|
148
|
+
} from "./chunk-TYVME3XD.js";
|
|
141
149
|
import {
|
|
142
|
-
|
|
143
|
-
|
|
150
|
+
EDGE_CONTAINER_NAME,
|
|
151
|
+
edgeCrashReason,
|
|
152
|
+
invalidateEdgeContainer
|
|
153
|
+
} from "./chunk-R5BHFFAV.js";
|
|
154
|
+
import {
|
|
155
|
+
EDGE_CONTAINER_MOUNTS,
|
|
156
|
+
EDGE_HOST_STATE_DIR
|
|
157
|
+
} from "./chunk-VFINNTUL.js";
|
|
144
158
|
import {
|
|
159
|
+
DEFAULT_IMAGE_REGISTRY,
|
|
145
160
|
safeErrorMessage
|
|
146
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-6APULWSU.js";
|
|
147
162
|
|
|
148
163
|
// src/lib/edge-import.ts
|
|
149
164
|
import chalk from "chalk";
|
|
150
165
|
import ora from "ora";
|
|
151
166
|
|
|
152
|
-
// src/lib/compose.ts
|
|
153
|
-
import { spawnSync as spawnSync3 } from "child_process";
|
|
154
|
-
import { randomBytes as randomBytes5 } from "crypto";
|
|
155
|
-
import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
156
|
-
import { homedir as homedir2 } from "os";
|
|
157
|
-
import { join as join6 } from "path";
|
|
158
|
-
|
|
159
167
|
// ../../packages/adapters/src/runtime/image-transfer.ts
|
|
160
168
|
import { Transform } from "stream";
|
|
161
169
|
|
|
@@ -10967,10 +10975,10 @@ var package_default = {
|
|
|
10967
10975
|
// ../../node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js
|
|
10968
10976
|
var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
|
|
10969
10977
|
var remoteProvider = async (init) => {
|
|
10970
|
-
const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import("./dist-es-
|
|
10978
|
+
const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import("./dist-es-VNKHQVIB.js");
|
|
10971
10979
|
if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
|
|
10972
10980
|
init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");
|
|
10973
|
-
const { fromHttp } = await import("./dist-es-
|
|
10981
|
+
const { fromHttp } = await import("./dist-es-5DY7K32L.js");
|
|
10974
10982
|
return chain(fromHttp(init), fromContainerMetadata(init));
|
|
10975
10983
|
}
|
|
10976
10984
|
if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
|
|
@@ -11082,22 +11090,22 @@ var defaultProvider = (init = {}) => memoizeChain([
|
|
|
11082
11090
|
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
11083
11091
|
throw new CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
|
|
11084
11092
|
}
|
|
11085
|
-
const { fromSSO } = await import("./dist-es-
|
|
11093
|
+
const { fromSSO } = await import("./dist-es-WV4AMOII.js");
|
|
11086
11094
|
return fromSSO(init)(awsIdentityProperties);
|
|
11087
11095
|
},
|
|
11088
11096
|
async (awsIdentityProperties) => {
|
|
11089
11097
|
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
|
|
11090
|
-
const { fromIni } = await import("./dist-es-
|
|
11098
|
+
const { fromIni } = await import("./dist-es-RYHIPOTN.js");
|
|
11091
11099
|
return fromIni(init)(awsIdentityProperties);
|
|
11092
11100
|
},
|
|
11093
11101
|
async (awsIdentityProperties) => {
|
|
11094
11102
|
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
|
|
11095
|
-
const { fromProcess } = await import("./dist-es-
|
|
11103
|
+
const { fromProcess } = await import("./dist-es-OSNJBLXB.js");
|
|
11096
11104
|
return fromProcess(init)(awsIdentityProperties);
|
|
11097
11105
|
},
|
|
11098
11106
|
async (awsIdentityProperties) => {
|
|
11099
11107
|
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
|
|
11100
|
-
const { fromTokenFile } = await import("./dist-es-
|
|
11108
|
+
const { fromTokenFile } = await import("./dist-es-X3B5QYKB.js");
|
|
11101
11109
|
return fromTokenFile(init)(awsIdentityProperties);
|
|
11102
11110
|
},
|
|
11103
11111
|
async () => {
|
|
@@ -12658,6 +12666,13 @@ var SftpDestinationImpl = class {
|
|
|
12658
12666
|
registerDestination("sftp", (row) => new SftpDestinationImpl(row));
|
|
12659
12667
|
registerDestination("openship_server", (row) => new SftpDestinationImpl(row));
|
|
12660
12668
|
|
|
12669
|
+
// src/lib/compose.ts
|
|
12670
|
+
import { spawnSync as spawnSync3 } from "child_process";
|
|
12671
|
+
import { randomBytes as randomBytes5 } from "crypto";
|
|
12672
|
+
import { chmodSync, existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
12673
|
+
import { homedir as homedir2, userInfo } from "os";
|
|
12674
|
+
import { join as join6 } from "path";
|
|
12675
|
+
|
|
12661
12676
|
// src/lib/paths.ts
|
|
12662
12677
|
import { homedir } from "os";
|
|
12663
12678
|
import { join as join3, resolve as resolve2 } from "path";
|
|
@@ -12818,6 +12833,11 @@ async function rebuildFromSource(info) {
|
|
|
12818
12833
|
}
|
|
12819
12834
|
|
|
12820
12835
|
// src/lib/compose.ts
|
|
12836
|
+
var EDGE_SITES_HOST_DIR = `${EDGE_HOST_STATE_DIR}/sites-enabled`;
|
|
12837
|
+
var EDGE_ACME_HOST_DIR = `${EDGE_HOST_STATE_DIR}/acme`;
|
|
12838
|
+
function edgeVolumeYaml(indent) {
|
|
12839
|
+
return EDGE_CONTAINER_MOUNTS.map((m2) => `${indent}- ${m2.host}:${m2.container}:z`).join("\n");
|
|
12840
|
+
}
|
|
12821
12841
|
var COMPOSE_DIR = join6(OS_DIR, "compose");
|
|
12822
12842
|
var INSTALL_METHOD_FILE = join6(OS_DIR, "install-method");
|
|
12823
12843
|
var COMPOSE_FILE = join6(COMPOSE_DIR, "docker-compose.yml");
|
|
@@ -12828,6 +12848,7 @@ var BUILT_SERVICES = [
|
|
|
12828
12848
|
{ service: "dashboard", dockerfile: "apps/dashboard/Dockerfile" },
|
|
12829
12849
|
{ service: "edge", dockerfile: "apps/edge/Dockerfile" }
|
|
12830
12850
|
];
|
|
12851
|
+
var ENV_CONSUMING_SERVICES = ["api", "dashboard", "edge"];
|
|
12831
12852
|
function readInstallMethod() {
|
|
12832
12853
|
try {
|
|
12833
12854
|
const v2 = readFileSync2(INSTALL_METHOD_FILE, "utf8").trim();
|
|
@@ -12907,11 +12928,12 @@ services:
|
|
|
12907
12928
|
ports: ["\${OPENSHIP_BIND_ADDR:-0.0.0.0}:\${API_PORT:-4000}:\${API_PORT:-4000}"]
|
|
12908
12929
|
volumes:
|
|
12909
12930
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
-
|
|
12913
|
-
#
|
|
12914
|
-
|
|
12931
|
+
# Routing state shared with the edge, as HOST BIND MOUNTS (generated from
|
|
12932
|
+
# EDGE_CONTAINER_MOUNTS): the vhost tree, /etc/letsencrypt, the ACME webroot
|
|
12933
|
+
# and the static doc-roots the API writes and the edge serves. Named volumes
|
|
12934
|
+
# hid all of it from every host-side reader (migrate's proxy scan, cert carry,
|
|
12935
|
+
# cert reuse, mail cert symlinks), each of which then silently saw "nothing".
|
|
12936
|
+
${edgeVolumeYaml(" ")}
|
|
12915
12937
|
# Host-op SSH key (createHostExecutor \u2192 host.docker.internal). /dev/null
|
|
12916
12938
|
# when the host channel isn't provisioned \u2192 OPENSHIP_HOST_SSH_HOST stays
|
|
12917
12939
|
# unset and the API falls back to LocalExecutor.
|
|
@@ -12960,18 +12982,11 @@ services:
|
|
|
12960
12982
|
restart: unless-stopped
|
|
12961
12983
|
network_mode: host
|
|
12962
12984
|
volumes:
|
|
12963
|
-
|
|
12964
|
-
- openship_certs:/etc/letsencrypt
|
|
12965
|
-
- openship_acme:/var/www/acme
|
|
12966
|
-
- openship_static:/opt/openship/static
|
|
12985
|
+
${edgeVolumeYaml(" ")}
|
|
12967
12986
|
|
|
12968
12987
|
volumes:
|
|
12969
12988
|
postgres_data:
|
|
12970
12989
|
redis_data:
|
|
12971
|
-
openship_sites:
|
|
12972
|
-
openship_certs:
|
|
12973
|
-
openship_acme:
|
|
12974
|
-
openship_static:
|
|
12975
12990
|
`;
|
|
12976
12991
|
function keepSecret(existing, key) {
|
|
12977
12992
|
return existing[key] || randomBytes5(32).toString("hex");
|
|
@@ -12987,6 +13002,15 @@ function readEnvFile() {
|
|
|
12987
13002
|
}
|
|
12988
13003
|
return out;
|
|
12989
13004
|
}
|
|
13005
|
+
var HOST_KEY_COMMENT = "openship-host-executor";
|
|
13006
|
+
var HOST_KEY_FROM = "172.16.0.0/12,192.168.0.0/16,10.0.0.0/8,127.0.0.1";
|
|
13007
|
+
function hostKeyAuthLine(pub) {
|
|
13008
|
+
return `from="${HOST_KEY_FROM}",restrict,pty ${pub}`;
|
|
13009
|
+
}
|
|
13010
|
+
function rewriteHostAuthorizedKeys(existing, pub) {
|
|
13011
|
+
const kept = existing.split("\n").filter((line) => line.trim() && !line.includes(HOST_KEY_COMMENT));
|
|
13012
|
+
return [...kept, hostKeyAuthLine(pub)].join("\n") + "\n";
|
|
13013
|
+
}
|
|
12990
13014
|
function provisionHostSshChannel() {
|
|
12991
13015
|
if (process.platform !== "linux") return null;
|
|
12992
13016
|
try {
|
|
@@ -12996,23 +13020,28 @@ function provisionHostSshChannel() {
|
|
|
12996
13020
|
if (!existsSync3(keyPath)) {
|
|
12997
13021
|
const g2 = spawnSync3(
|
|
12998
13022
|
"ssh-keygen",
|
|
12999
|
-
["-t", "ed25519", "-N", "", "-q", "-f", keyPath, "-C",
|
|
13023
|
+
["-t", "ed25519", "-N", "", "-q", "-f", keyPath, "-C", HOST_KEY_COMMENT],
|
|
13000
13024
|
{ stdio: "ignore" }
|
|
13001
13025
|
);
|
|
13002
13026
|
if (g2.status !== 0) return null;
|
|
13003
13027
|
}
|
|
13004
13028
|
const pub = readFileSync2(`${keyPath}.pub`, "utf8").trim();
|
|
13005
13029
|
if (!pub) return null;
|
|
13030
|
+
const user = (() => {
|
|
13031
|
+
try {
|
|
13032
|
+
return userInfo().username;
|
|
13033
|
+
} catch {
|
|
13034
|
+
return process.env.USER || process.env.LOGNAME || "root";
|
|
13035
|
+
}
|
|
13036
|
+
})();
|
|
13006
13037
|
const userSshDir = join6(homedir2(), ".ssh");
|
|
13007
13038
|
mkdirSync2(userSshDir, { recursive: true, mode: 448 });
|
|
13008
13039
|
const authKeys = join6(userSshDir, "authorized_keys");
|
|
13009
13040
|
const existing = existsSync3(authKeys) ? readFileSync2(authKeys, "utf8") : "";
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
}
|
|
13015
|
-
return { user: process.env.USER || process.env.LOGNAME || "root", keyPath };
|
|
13041
|
+
const next = rewriteHostAuthorizedKeys(existing, pub);
|
|
13042
|
+
if (next !== existing) writeFileSync(authKeys, next, { mode: 384 });
|
|
13043
|
+
chmodSync(authKeys, 384);
|
|
13044
|
+
return { user, keyPath };
|
|
13016
13045
|
} catch {
|
|
13017
13046
|
return null;
|
|
13018
13047
|
}
|
|
@@ -13044,7 +13073,7 @@ function orphanedStackContainers(project) {
|
|
|
13044
13073
|
function reconcileDbPassword(user, password) {
|
|
13045
13074
|
if (!password) return;
|
|
13046
13075
|
if (compose(["up", "-d", "--wait", "postgres"], { quiet: true }) !== 0) return;
|
|
13047
|
-
const
|
|
13076
|
+
const attempt = (asRole) => spawnSync3(
|
|
13048
13077
|
"docker",
|
|
13049
13078
|
[
|
|
13050
13079
|
"compose",
|
|
@@ -13055,7 +13084,7 @@ function reconcileDbPassword(user, password) {
|
|
|
13055
13084
|
"postgres",
|
|
13056
13085
|
"psql",
|
|
13057
13086
|
"-U",
|
|
13058
|
-
|
|
13087
|
+
asRole,
|
|
13059
13088
|
"-d",
|
|
13060
13089
|
"postgres",
|
|
13061
13090
|
"-v",
|
|
@@ -13071,15 +13100,31 @@ function reconcileDbPassword(user, password) {
|
|
|
13071
13100
|
{
|
|
13072
13101
|
cwd: COMPOSE_DIR,
|
|
13073
13102
|
encoding: "utf8",
|
|
13074
|
-
|
|
13103
|
+
// Create the role if the volume predates it, else just realign it. Both
|
|
13104
|
+
// branches leave exactly the credentials this `.env` will present.
|
|
13105
|
+
input: `DO $$ BEGIN
|
|
13106
|
+
IF EXISTS (SELECT 1 FROM pg_roles WHERE rolname = '${user}') THEN
|
|
13107
|
+
ALTER ROLE "${user}" WITH LOGIN PASSWORD '${password}';
|
|
13108
|
+
ELSE
|
|
13109
|
+
CREATE ROLE "${user}" WITH LOGIN SUPERUSER PASSWORD '${password}';
|
|
13110
|
+
END IF;
|
|
13111
|
+
END $$;
|
|
13075
13112
|
`
|
|
13076
13113
|
}
|
|
13077
13114
|
);
|
|
13115
|
+
let r2 = attempt(user);
|
|
13116
|
+
if (r2.status !== 0) r2 = attempt("postgres");
|
|
13078
13117
|
if (r2.status !== 0) {
|
|
13079
13118
|
console.log(
|
|
13080
|
-
`
|
|
13081
|
-
|
|
13082
|
-
|
|
13119
|
+
`
|
|
13120
|
+
! Could not realign the database password (${(r2.stderr ?? "").trim() || "psql failed"}).
|
|
13121
|
+
The api will fail with "password authentication failed for user "${user}"" because the
|
|
13122
|
+
existing data volume was initialized with a different password.
|
|
13123
|
+
|
|
13124
|
+
Fix it one of two ways:
|
|
13125
|
+
\u2022 restore the .env that created the volume, or
|
|
13126
|
+
\u2022 start fresh (DESTROYS DB DATA): openship uninstall then openship up
|
|
13127
|
+
`
|
|
13083
13128
|
);
|
|
13084
13129
|
}
|
|
13085
13130
|
}
|
|
@@ -13092,6 +13137,48 @@ function removeOrphanedStack(project) {
|
|
|
13092
13137
|
);
|
|
13093
13138
|
spawnSync3("docker", ["rm", "-f", ...orphans.map((o2) => o2.name)], { stdio: "ignore" });
|
|
13094
13139
|
}
|
|
13140
|
+
function migrateLegacyEdgeVolumes(project) {
|
|
13141
|
+
const pairs = [
|
|
13142
|
+
{ volume: `${project}_openship_sites`, host: EDGE_SITES_HOST_DIR },
|
|
13143
|
+
{ volume: `${project}_openship_certs`, host: "/etc/letsencrypt" },
|
|
13144
|
+
{ volume: `${project}_openship_acme`, host: EDGE_ACME_HOST_DIR },
|
|
13145
|
+
{ volume: `${project}_openship_static`, host: "/opt/openship/static" }
|
|
13146
|
+
];
|
|
13147
|
+
const ls = spawnSync3("docker", ["volume", "ls", "--format", "{{.Name}}"], { encoding: "utf8" });
|
|
13148
|
+
if (ls.status !== 0 || !ls.stdout) return;
|
|
13149
|
+
const existing = new Set(ls.stdout.split("\n").map((l2) => l2.trim()).filter(Boolean));
|
|
13150
|
+
for (const { volume, host } of pairs) {
|
|
13151
|
+
if (!existing.has(volume)) continue;
|
|
13152
|
+
mkdirSync2(host, { recursive: true });
|
|
13153
|
+
const alreadyThere = spawnSync3("sh", ["-c", `ls -A ${JSON.stringify(host)} 2>/dev/null | head -1`], {
|
|
13154
|
+
encoding: "utf8"
|
|
13155
|
+
});
|
|
13156
|
+
if (alreadyThere.stdout?.trim()) continue;
|
|
13157
|
+
console.log(` Moving edge state from volume ${volume} onto ${host}...`);
|
|
13158
|
+
const copy = spawnSync3(
|
|
13159
|
+
"docker",
|
|
13160
|
+
[
|
|
13161
|
+
"run",
|
|
13162
|
+
"--rm",
|
|
13163
|
+
"-v",
|
|
13164
|
+
`${volume}:/from:ro`,
|
|
13165
|
+
"-v",
|
|
13166
|
+
`${host}:/to`,
|
|
13167
|
+
"alpine:3",
|
|
13168
|
+
"sh",
|
|
13169
|
+
"-c",
|
|
13170
|
+
"cp -a /from/. /to/ 2>/dev/null || true"
|
|
13171
|
+
],
|
|
13172
|
+
{ stdio: "inherit" }
|
|
13173
|
+
);
|
|
13174
|
+
if (copy.status !== 0) {
|
|
13175
|
+
console.log(
|
|
13176
|
+
` Could not copy ${volume} \u2014 the stack will start with an empty ${host}.
|
|
13177
|
+
Recover manually with: docker run --rm -v ${volume}:/from -v ${host}:/to alpine cp -a /from/. /to/`
|
|
13178
|
+
);
|
|
13179
|
+
}
|
|
13180
|
+
}
|
|
13181
|
+
}
|
|
13095
13182
|
function warnOrphanedVolumes(project) {
|
|
13096
13183
|
const r2 = spawnSync3("docker", ["volume", "ls", "--format", "{{.Name}}"], { encoding: "utf8" });
|
|
13097
13184
|
if (r2.status !== 0 || !r2.stdout) return;
|
|
@@ -13101,11 +13188,40 @@ function warnOrphanedVolumes(project) {
|
|
|
13101
13188
|
if (others.size === 0) return;
|
|
13102
13189
|
console.log(
|
|
13103
13190
|
` Note: volumes from a previous install (project "${[...others].join(", ")}") are still on disk
|
|
13104
|
-
and are NOT mounted by this stack \u2014 its database
|
|
13191
|
+
and are NOT mounted by this stack \u2014 its database starts fresh. (Certificates and
|
|
13192
|
+
vhosts now live on the host, so those carry over.)
|
|
13105
13193
|
Remove them with \`docker volume ls | grep _openship_\` once you're sure they aren't needed.`
|
|
13106
13194
|
);
|
|
13107
13195
|
}
|
|
13108
|
-
function
|
|
13196
|
+
function keepConfig(prev, key, explicit) {
|
|
13197
|
+
const set = explicit?.trim();
|
|
13198
|
+
if (set) return set;
|
|
13199
|
+
const carried = prev[key]?.trim();
|
|
13200
|
+
return carried || void 0;
|
|
13201
|
+
}
|
|
13202
|
+
function resolveEnvConfig(prev, opts) {
|
|
13203
|
+
const publicUrl = keepConfig(prev, "OPENSHIP_PUBLIC_URL", opts.publicUrl);
|
|
13204
|
+
return {
|
|
13205
|
+
apiPort: keepConfig(prev, "API_PORT", opts.apiPort) ?? "4000",
|
|
13206
|
+
dashPort: keepConfig(prev, "DASHBOARD_PORT", opts.dashboardPort) ?? "3001",
|
|
13207
|
+
...publicUrl ? { publicUrl } : {},
|
|
13208
|
+
// A public URL always implies a proxy in front; otherwise keep whatever the
|
|
13209
|
+
// install was configured with.
|
|
13210
|
+
trustProxy: Boolean(opts.trustProxy) || Boolean(publicUrl) || prev.TRUST_PROXY === "true",
|
|
13211
|
+
...keepConfig(prev, "OPENSHIP_EXTRA_TRUSTED_ORIGINS", opts.extraTrustedOrigins) ? {
|
|
13212
|
+
extraTrustedOrigins: keepConfig(
|
|
13213
|
+
prev,
|
|
13214
|
+
"OPENSHIP_EXTRA_TRUSTED_ORIGINS",
|
|
13215
|
+
opts.extraTrustedOrigins
|
|
13216
|
+
)
|
|
13217
|
+
} : {},
|
|
13218
|
+
registry: keepConfig(prev, "OPENSHIP_IMAGE_REGISTRY", opts.registry) ?? DEFAULT_IMAGE_REGISTRY,
|
|
13219
|
+
// Tri-state: the flag is absent on a plain re-run, so fall back to what the
|
|
13220
|
+
// install chose rather than silently re-granting host control.
|
|
13221
|
+
hostControl: opts.noHostControl === void 0 ? prev.OPENSHIP_HOST_CONTROL !== "false" : !opts.noHostControl
|
|
13222
|
+
};
|
|
13223
|
+
}
|
|
13224
|
+
function renderEnv(opts, host, cfg) {
|
|
13109
13225
|
const prev = readEnvFile();
|
|
13110
13226
|
const lines = [
|
|
13111
13227
|
"# Managed by `openship up`. Secrets are generated once and preserved.",
|
|
@@ -13116,17 +13232,20 @@ function renderEnv(opts, host) {
|
|
|
13116
13232
|
"OPENSHIP_REQUIRE_AUTH=true",
|
|
13117
13233
|
// Read by createHostExecutor (throws when false) and by the servers list
|
|
13118
13234
|
// (hides the local row). Written explicitly so the policy is visible in .env.
|
|
13119
|
-
`OPENSHIP_HOST_CONTROL=${
|
|
13120
|
-
`OPENSHIP_IMAGE_REGISTRY=${
|
|
13121
|
-
`OPENSHIP_VERSION=${opts.version || (true ? "0.4.
|
|
13235
|
+
`OPENSHIP_HOST_CONTROL=${cfg.hostControl ? "true" : "false"}`,
|
|
13236
|
+
`OPENSHIP_IMAGE_REGISTRY=${cfg.registry}`,
|
|
13237
|
+
`OPENSHIP_VERSION=${opts.version || (true ? "0.4.7" : "latest")}`,
|
|
13122
13238
|
`POSTGRES_PASSWORD=${keepSecret(prev, "POSTGRES_PASSWORD")}`,
|
|
13123
13239
|
`BETTER_AUTH_SECRET=${keepSecret(prev, "BETTER_AUTH_SECRET")}`,
|
|
13124
|
-
`INTERNAL_TOKEN=${keepSecret(prev, "INTERNAL_TOKEN")}
|
|
13240
|
+
`INTERNAL_TOKEN=${keepSecret(prev, "INTERNAL_TOKEN")}`,
|
|
13241
|
+
`API_PORT=${cfg.apiPort}`,
|
|
13242
|
+
`DASHBOARD_PORT=${cfg.dashPort}`
|
|
13125
13243
|
];
|
|
13126
|
-
if (
|
|
13127
|
-
if (
|
|
13128
|
-
|
|
13129
|
-
|
|
13244
|
+
if (cfg.publicUrl) lines.push(`OPENSHIP_PUBLIC_URL=${cfg.publicUrl}`);
|
|
13245
|
+
if (cfg.extraTrustedOrigins) {
|
|
13246
|
+
lines.push(`OPENSHIP_EXTRA_TRUSTED_ORIGINS=${cfg.extraTrustedOrigins}`);
|
|
13247
|
+
}
|
|
13248
|
+
if (cfg.trustProxy) lines.push("TRUST_PROXY=true");
|
|
13130
13249
|
if (host) {
|
|
13131
13250
|
lines.push(
|
|
13132
13251
|
"OPENSHIP_HOST_SSH_HOST=host.docker.internal",
|
|
@@ -13158,13 +13277,20 @@ ${services}`;
|
|
|
13158
13277
|
}
|
|
13159
13278
|
function materialize(opts) {
|
|
13160
13279
|
mkdirSync2(COMPOSE_DIR, { recursive: true, mode: 448 });
|
|
13161
|
-
const
|
|
13162
|
-
const
|
|
13280
|
+
const prev = readEnvFile();
|
|
13281
|
+
const cfg = resolveEnvConfig(prev, opts);
|
|
13282
|
+
const host = cfg.hostControl ? provisionHostSshChannel() : null;
|
|
13283
|
+
let before = "";
|
|
13284
|
+
try {
|
|
13285
|
+
before = readFileSync2(ENV_FILE, "utf8");
|
|
13286
|
+
} catch {
|
|
13287
|
+
}
|
|
13288
|
+
const rendered = renderEnv(opts, host, cfg);
|
|
13163
13289
|
writeFileSync(COMPOSE_FILE, COMPOSE_YAML);
|
|
13164
|
-
writeFileSync(ENV_FILE,
|
|
13290
|
+
writeFileSync(ENV_FILE, rendered, { mode: 384 });
|
|
13165
13291
|
const buildDir = opts.build === false ? null : sourceBuildDir();
|
|
13166
13292
|
if (buildDir) writeFileSync(BUILD_FILE, renderBuildOverride(buildDir));
|
|
13167
|
-
return { buildDir,
|
|
13293
|
+
return { buildDir, cfg, envChanged: before !== "" && rendered !== before };
|
|
13168
13294
|
}
|
|
13169
13295
|
function dbVolumeExists(project) {
|
|
13170
13296
|
const r2 = spawnSync3("docker", ["volume", "inspect", `${project}_postgres_data`], {
|
|
@@ -13182,15 +13308,19 @@ function compose(args, opts) {
|
|
|
13182
13308
|
return r2.status ?? 1;
|
|
13183
13309
|
}
|
|
13184
13310
|
function composeUp(opts) {
|
|
13185
|
-
const { buildDir,
|
|
13186
|
-
const apiPort =
|
|
13187
|
-
const dashPort =
|
|
13311
|
+
const { buildDir, cfg, envChanged } = materialize(opts);
|
|
13312
|
+
const apiPort = cfg.apiPort;
|
|
13313
|
+
const dashPort = cfg.dashPort;
|
|
13314
|
+
const up = (extra = {}) => compose(
|
|
13315
|
+
envChanged ? ["up", "-d", "--force-recreate", ...ENV_CONSUMING_SERVICES] : ["up", "-d"],
|
|
13316
|
+
extra
|
|
13317
|
+
);
|
|
13188
13318
|
const env = readEnvFile();
|
|
13189
13319
|
const project = env.COMPOSE_PROJECT_NAME || "openship";
|
|
13190
13320
|
removeOrphanedStack(project);
|
|
13321
|
+
migrateLegacyEdgeVolumes(project);
|
|
13191
13322
|
warnOrphanedVolumes(project);
|
|
13192
|
-
if (
|
|
13193
|
-
console.log(" Existing database volume with regenerated credentials \u2014 realigning the password...");
|
|
13323
|
+
if (dbVolumeExists(project)) {
|
|
13194
13324
|
reconcileDbPassword(env.POSTGRES_USER || "openship", env.POSTGRES_PASSWORD ?? "");
|
|
13195
13325
|
}
|
|
13196
13326
|
if (buildDir) {
|
|
@@ -13200,17 +13330,22 @@ function composeUp(opts) {
|
|
|
13200
13330
|
if (compose(["build"], { withBuildOverride: true }) !== 0) {
|
|
13201
13331
|
return { ok: false, apiPort, dashPort };
|
|
13202
13332
|
}
|
|
13203
|
-
if (
|
|
13333
|
+
if (up({ withBuildOverride: true }) !== 0) {
|
|
13204
13334
|
return { ok: false, apiPort, dashPort };
|
|
13205
13335
|
}
|
|
13336
|
+
onEdgeContainerChanged();
|
|
13206
13337
|
writeInstallMethod("compose");
|
|
13207
13338
|
return { ok: true, apiPort, dashPort };
|
|
13208
13339
|
}
|
|
13209
13340
|
if (compose(["pull"]) !== 0) return { ok: false, apiPort, dashPort };
|
|
13210
|
-
if (
|
|
13341
|
+
if (up() !== 0) return { ok: false, apiPort, dashPort };
|
|
13342
|
+
onEdgeContainerChanged();
|
|
13211
13343
|
writeInstallMethod("compose");
|
|
13212
13344
|
return { ok: true, apiPort, dashPort };
|
|
13213
13345
|
}
|
|
13346
|
+
function onEdgeContainerChanged() {
|
|
13347
|
+
invalidateEdgeContainer();
|
|
13348
|
+
}
|
|
13214
13349
|
function composeDown() {
|
|
13215
13350
|
if (!existsSync3(COMPOSE_FILE)) return false;
|
|
13216
13351
|
return compose(["down"]) === 0;
|
|
@@ -13220,7 +13355,7 @@ function composeUninstall(opts = {}) {
|
|
|
13220
13355
|
const ok = existsSync3(COMPOSE_FILE) ? compose(["down", "-v", "--remove-orphans"]) === 0 : false;
|
|
13221
13356
|
if (opts.removeImages) {
|
|
13222
13357
|
const env = readEnvFile();
|
|
13223
|
-
const registry = env.OPENSHIP_IMAGE_REGISTRY ||
|
|
13358
|
+
const registry = env.OPENSHIP_IMAGE_REGISTRY || DEFAULT_IMAGE_REGISTRY;
|
|
13224
13359
|
const version = env.OPENSHIP_VERSION || "latest";
|
|
13225
13360
|
for (const { service } of BUILT_SERVICES) {
|
|
13226
13361
|
const ref = `${registry}/openship-${service}:${version}`;
|
|
@@ -13233,23 +13368,25 @@ function composeUninstall(opts = {}) {
|
|
|
13233
13368
|
}
|
|
13234
13369
|
function composeUpdate(version) {
|
|
13235
13370
|
if (!existsSync3(COMPOSE_FILE)) return false;
|
|
13236
|
-
|
|
13237
|
-
const env = readEnvFile();
|
|
13238
|
-
env.OPENSHIP_VERSION = version;
|
|
13239
|
-
writeFileSync(
|
|
13240
|
-
ENV_FILE,
|
|
13241
|
-
Object.entries(env).map(([k2, v2]) => `${k2}=${v2}`).join("\n") + "\n",
|
|
13242
|
-
{ mode: 384 }
|
|
13243
|
-
);
|
|
13244
|
-
}
|
|
13245
|
-
if (sourceBuildDir()) {
|
|
13246
|
-
return compose(["build"], { withBuildOverride: true }) === 0 && compose(["up", "-d"], { withBuildOverride: true }) === 0;
|
|
13247
|
-
}
|
|
13248
|
-
return compose(["pull"]) === 0 && compose(["up", "-d"]) === 0;
|
|
13371
|
+
return composeUp(version ? { version } : {}).ok;
|
|
13249
13372
|
}
|
|
13250
13373
|
function composePs() {
|
|
13251
13374
|
return compose(["ps"]);
|
|
13252
13375
|
}
|
|
13376
|
+
function composeRunning() {
|
|
13377
|
+
const r2 = spawnSync3(
|
|
13378
|
+
"docker",
|
|
13379
|
+
["compose", "-f", COMPOSE_FILE, "ps", "--status", "running", "-q"],
|
|
13380
|
+
{ cwd: COMPOSE_DIR, encoding: "utf8" }
|
|
13381
|
+
);
|
|
13382
|
+
return r2.status === 0 && r2.stdout.trim().length > 0;
|
|
13383
|
+
}
|
|
13384
|
+
function composeStart() {
|
|
13385
|
+
return compose(["up", "-d"], { quiet: true }) === 0;
|
|
13386
|
+
}
|
|
13387
|
+
function composeRestart() {
|
|
13388
|
+
return compose(["restart"], { quiet: true }) === 0;
|
|
13389
|
+
}
|
|
13253
13390
|
function composeInternalToken() {
|
|
13254
13391
|
return readEnvFile().INTERNAL_TOKEN ?? null;
|
|
13255
13392
|
}
|
|
@@ -13303,11 +13440,17 @@ async function importMigratedSites(apiPort, sites, certPems) {
|
|
|
13303
13440
|
`Migrated NONE of the ${sites.length} site${sites.length === 1 ? "" : "s"} \u2014 Openship holds :80/:443 and ${sites.length === 1 ? "that hostname is" : "those hostnames are"} NOT being served.`
|
|
13304
13441
|
);
|
|
13305
13442
|
for (const w2 of warnings.slice(0, 8)) console.log(chalk.red(` \u2022 ${w2}`));
|
|
13443
|
+
const edgeLog = await edgeCrashReason(new LocalExecutor());
|
|
13444
|
+
if (edgeLog) {
|
|
13445
|
+
console.log(chalk.red(`
|
|
13446
|
+
The edge container is not running. Its log says:`));
|
|
13447
|
+
console.log(chalk.red(` ${edgeLog}`));
|
|
13448
|
+
}
|
|
13306
13449
|
console.log(
|
|
13307
13450
|
chalk.yellow(
|
|
13308
13451
|
`
|
|
13309
13452
|
Retry the import with \`openship up\` once the cause above is fixed, or put your
|
|
13310
|
-
previous proxy back: docker stop
|
|
13453
|
+
previous proxy back: docker stop ${EDGE_CONTAINER_NAME} && sudo systemctl enable --now nginx
|
|
13311
13454
|
`
|
|
13312
13455
|
)
|
|
13313
13456
|
);
|
|
@@ -13350,6 +13493,9 @@ export {
|
|
|
13350
13493
|
composeUninstall,
|
|
13351
13494
|
composeUpdate,
|
|
13352
13495
|
composePs,
|
|
13496
|
+
composeRunning,
|
|
13497
|
+
composeStart,
|
|
13498
|
+
composeRestart,
|
|
13353
13499
|
composeInternalToken,
|
|
13354
13500
|
waitForApiHealth,
|
|
13355
13501
|
importMigratedSites
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
":" //# ; exec "$(command -v bun || command -v node)" "$0" "$@"
|
|
1
3
|
import { createRequire as __ospCreateRequire } from "node:module";
|
|
2
4
|
const require = __ospCreateRequire(import.meta.url);
|
|
3
5
|
import {
|
|
4
6
|
COMPONENT_INSTALLERS,
|
|
5
7
|
checkAll,
|
|
6
8
|
checkComponents
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UXWAVM4C.js";
|
|
8
10
|
|
|
9
11
|
// ../../packages/adapters/src/system/state.ts
|
|
10
12
|
var DEFAULT_STATE_PATH = "/etc/openship/setup-state.json";
|
|
@@ -41,18 +43,20 @@ function resolveRules(mode) {
|
|
|
41
43
|
return [
|
|
42
44
|
{ feature: "build", requires: ["git", "docker"], message: "Build requires Git and Docker" },
|
|
43
45
|
{ feature: "deploy", requires: ["docker"], message: "Deploy requires Docker" },
|
|
44
|
-
{ feature: "routing", requires: ["
|
|
45
|
-
{ feature: "ssl", requires: ["
|
|
46
|
+
{ feature: "routing", requires: ["edge"], message: "Routing requires the edge" },
|
|
47
|
+
{ feature: "ssl", requires: ["edge"], message: "SSL requires the edge" }
|
|
46
48
|
];
|
|
47
49
|
}
|
|
48
50
|
return [
|
|
49
51
|
{ feature: "build", requires: ["git"], message: "Build requires Git" },
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
// Even in bare RUNTIME mode (apps run as host processes) the edge itself is a
|
|
53
|
+
// container — its installer needs Docker and says so.
|
|
54
|
+
{ feature: "routing", requires: ["edge"], message: "Routing requires the edge" },
|
|
55
|
+
{ feature: "ssl", requires: ["edge"], message: "SSL requires the edge" }
|
|
52
56
|
];
|
|
53
57
|
}
|
|
54
58
|
function resolveRequired(mode) {
|
|
55
|
-
return mode === "docker" ? ["docker", "git", "
|
|
59
|
+
return mode === "docker" ? ["docker", "git", "edge"] : ["git", "edge"];
|
|
56
60
|
}
|
|
57
61
|
var SystemManager = class {
|
|
58
62
|
mode;
|