openship 0.4.4 → 0.4.6
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-MFQA6OS4.js → bowser-O3AEA6AN.js} +5 -1
- package/dist/{chunk-KD7VO4LG.js → chunk-2ZLR7ULL.js} +255 -65
- package/dist/{chunk-YHXCHW7Q.js → chunk-3JQTL4R4.js} +236 -99
- package/dist/{chunk-E77LJWJK.js → chunk-4TJC4JZQ.js} +20 -9
- package/dist/{chunk-YL67EWYZ.js → chunk-4Z5QO7N6.js} +6 -2
- package/dist/{chunk-WJPCBU7Z.js → chunk-5FNIWBFI.js} +10 -6
- package/dist/{chunk-Y37KHU7L.js → chunk-5MZ624VX.js} +5 -0
- package/dist/{chunk-QKFRZNKN.js → chunk-6APIPIJY.js} +8 -4
- package/dist/{chunk-JZLNHGLW.js → chunk-6APULWSU.js} +153 -133
- package/dist/{chunk-F4DFVG6Q.js → chunk-6B5YCFFV.js} +8 -4
- package/dist/{chunk-XVSAUO2I.js → chunk-AVIB7CT7.js} +5 -1
- package/dist/{chunk-TEYJYSMT.js → chunk-C5OHTYEF.js} +12 -6
- package/dist/{chunk-7UOB5GGQ.js → chunk-DYPH4HCI.js} +5 -0
- package/dist/{chunk-XIFRMKYT.js → chunk-EI575GHN.js} +6 -2
- package/dist/{chunk-4CQWT2WL.js → chunk-FPRHYBY2.js} +5 -0
- package/dist/chunk-FQGJZ2HS.js +248 -0
- package/dist/{chunk-JR2OCMJA.js → chunk-FRNAR33O.js} +6 -2
- package/dist/{chunk-JUJBBF5U.js → chunk-FXTBHTWY.js} +362 -42
- package/dist/chunk-ILFETZOM.js +131 -0
- package/dist/{chunk-5ZCKQ2MI.js → chunk-IXCHURVK.js} +7 -3
- package/dist/{chunk-6ERIMTBC.js → chunk-JYGD5WSN.js} +5 -0
- package/dist/{chunk-4VNS5WPM.js → chunk-KI2EY3WB.js} +4 -0
- package/dist/{chunk-3U4SPZD5.js → chunk-L2VOGB2X.js} +7 -104
- package/dist/{chunk-NB2VEIWG.js → chunk-MZ2WEHHY.js} +7 -3
- package/dist/{chunk-BUBSSKO6.js → chunk-O6ZZF52V.js} +5 -1
- package/dist/{chunk-LBFH7THC.js → chunk-OWED2GRM.js} +5 -1
- package/dist/{chunk-4MG3BVHE.js → chunk-OXWDY22G.js} +6 -2
- package/dist/{chunk-4FABQGQP.js → chunk-Q2CIRAOK.js} +5 -0
- package/dist/{chunk-4LEL3H2Z.js → chunk-RPHRPFEH.js} +5 -0
- package/dist/{chunk-46YJFP4S.js → chunk-SQ77DZOI.js} +1728 -1484
- package/dist/{chunk-S6DSRLNE.js → chunk-TGIINPVM.js} +15 -2
- package/dist/{chunk-U2DPZSXA.js → chunk-TYVME3XD.js} +9 -1
- package/dist/{chunk-HFYDYK4D.js → chunk-V6AN6XLZ.js} +18 -6
- package/dist/{chunk-ZKJOFWBJ.js → chunk-VDMQJHPI.js} +38 -15
- package/dist/{chunk-E6W2JMMU.js → chunk-VFINNTUL.js} +22 -1
- package/dist/{chunk-OJE6YWPQ.js → chunk-VWPEKOH6.js} +6 -2
- package/dist/{chunk-5N7VUGL6.js → chunk-W73X43R7.js} +6 -2
- package/dist/cloud-7QYOGF7F.js +11 -0
- package/dist/cloud-ZSKOS4GY.js +30 -0
- package/dist/detect-SH4FHFBI.js +36 -0
- package/dist/{dist-L3MPOWCA.js → dist-IQJ6H6UZ.js} +6 -2
- package/dist/{dist-es-KE56MWYO.js → dist-es-5DY7K32L.js} +9 -5
- package/dist/dist-es-JSTDUS7Q.js +26 -0
- package/dist/{dist-es-GTAMF674.js → dist-es-OSNJBLXB.js} +8 -4
- package/dist/{dist-es-NRZIQY5B.js → dist-es-RYHIPOTN.js} +17 -13
- package/dist/{dist-es-XQCOTGC7.js → dist-es-VNKHQVIB.js} +7 -3
- package/dist/{dist-es-WZCR7DHQ.js → dist-es-WV4AMOII.js} +11 -7
- package/dist/{dist-es-ZW3HFQUM.js → dist-es-X3B5QYKB.js} +9 -5
- package/dist/docker-U7AF5PTA.js +16 -0
- package/dist/docker-edge-executor-VHW3JPJS.js +13 -0
- package/dist/edge-import-V5CBA47C.js +45 -0
- package/dist/ensure-container-edge-CMYROUSI.js +33 -0
- package/dist/{event-streams-7LGDL56D.js → event-streams-EHRAKL75.js} +7 -3
- package/dist/executor-YPT6RH6O.js +30 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +258 -245
- package/dist/{loadSso-N273C5I7.js → loadSso-46FQRIZS.js} +13 -9
- package/dist/local-executor-V7U5VOZW.js +12 -0
- package/dist/nginx-2GTRUIDE.js +24 -0
- package/dist/noop-FMMFG2EZ.js +11 -0
- package/dist/{openresty-lua-HAO4EUDY.js → openresty-lua-4WLGDSER.js} +13 -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 +55574 -53675
- 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-HQIZLUOJ.js +20 -0
- package/dist/{signin-DR462ERO.js → signin-ITOPKKUB.js} +13 -9
- package/dist/{sso-oidc-VBZLJUK5.js → sso-oidc-NON2PD7Y.js} +13 -9
- package/dist/{sts-EJLZ4Z77.js → sts-HHFFSAY2.js} +12 -8
- package/package.json +1 -1
- package/dist/bare-ITM45QBX.js +0 -18
- package/dist/cloud-JMPHO3CW.js +0 -7
- package/dist/cloud-W5G6YXAY.js +0 -24
- package/dist/dist-es-4C322O5D.js +0 -22
- package/dist/docker-3FVJMFC3.js +0 -12
- package/dist/docker-edge-executor-ZIWAZWPL.js +0 -9
- package/dist/edge-import-Y34YL6JK.js +0 -39
- package/dist/executor-J7BHW5HF.js +0 -26
- package/dist/nginx-YZWKYKQU.js +0 -16
- package/dist/noop-RRNCIUI5.js +0 -7
- package/dist/setup-5X3WEEHA.js +0 -14
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
":" //# ; exec "$(command -v bun || command -v node)" "$0" "$@"
|
|
3
|
+
import { createRequire as __ospCreateRequire } from "node:module";
|
|
4
|
+
const require = __ospCreateRequire(import.meta.url);
|
|
5
|
+
import {
|
|
6
|
+
ENV_KEY,
|
|
7
|
+
ENV_SECRET,
|
|
8
|
+
fromEnv
|
|
9
|
+
} from "./chunk-FRNAR33O.js";
|
|
1
10
|
import {
|
|
2
11
|
SignatureV4MultiRegion,
|
|
3
12
|
XmlNode,
|
|
4
13
|
XmlShapeDeserializer,
|
|
5
14
|
XmlText
|
|
6
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6APIPIJY.js";
|
|
7
16
|
import {
|
|
8
17
|
AwsSdkSigV4ASigner,
|
|
9
18
|
AwsSdkSigV4Signer,
|
|
@@ -19,27 +28,10 @@ import {
|
|
|
19
28
|
resolveAwsSdkSigV4AConfig,
|
|
20
29
|
resolveAwsSdkSigV4Config,
|
|
21
30
|
streamCollector
|
|
22
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-IXCHURVK.js";
|
|
23
32
|
import {
|
|
24
33
|
NodeHttpHandler
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import {
|
|
27
|
-
AwsCrc32,
|
|
28
|
-
__awaiter,
|
|
29
|
-
__generator,
|
|
30
|
-
__values,
|
|
31
|
-
convertToBuffer,
|
|
32
|
-
eventStreamSerdeProvider2 as eventStreamSerdeProvider,
|
|
33
|
-
isEmptyData,
|
|
34
|
-
numToUint8,
|
|
35
|
-
resolveEventStreamSerdeConfig,
|
|
36
|
-
uint32ArrayFrom
|
|
37
|
-
} from "./chunk-BUBSSKO6.js";
|
|
38
|
-
import {
|
|
39
|
-
ENV_KEY,
|
|
40
|
-
ENV_SECRET,
|
|
41
|
-
fromEnv
|
|
42
|
-
} from "./chunk-JR2OCMJA.js";
|
|
34
|
+
} from "./chunk-OWED2GRM.js";
|
|
43
35
|
import {
|
|
44
36
|
BinaryDecisionDiagram,
|
|
45
37
|
Client,
|
|
@@ -75,7 +67,7 @@ import {
|
|
|
75
67
|
resolveRetryConfig,
|
|
76
68
|
resolveUserAgentConfig,
|
|
77
69
|
setFeature
|
|
78
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-VWPEKOH6.js";
|
|
79
71
|
import {
|
|
80
72
|
CredentialsProviderError,
|
|
81
73
|
ENV_PROFILE,
|
|
@@ -106,7 +98,25 @@ import {
|
|
|
106
98
|
resolveHttpHandlerRuntimeConfig,
|
|
107
99
|
resolveRegionConfig,
|
|
108
100
|
toEndpointV1
|
|
109
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-W73X43R7.js";
|
|
102
|
+
import {
|
|
103
|
+
CloudRuntime
|
|
104
|
+
} from "./chunk-5FNIWBFI.js";
|
|
105
|
+
import {
|
|
106
|
+
systemCatalog
|
|
107
|
+
} from "./chunk-SQ77DZOI.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";
|
|
110
120
|
import {
|
|
111
121
|
Hash,
|
|
112
122
|
NumericValue,
|
|
@@ -124,24 +134,26 @@ import {
|
|
|
124
134
|
toBase64,
|
|
125
135
|
toUint8Array,
|
|
126
136
|
toUtf8
|
|
127
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-JYGD5WSN.js";
|
|
128
138
|
import {
|
|
129
139
|
DockerRuntime,
|
|
130
140
|
isHostPathSource,
|
|
131
141
|
scopedVolumeName
|
|
132
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-2ZLR7ULL.js";
|
|
133
143
|
import {
|
|
134
144
|
BareRuntime
|
|
135
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-VDMQJHPI.js";
|
|
136
146
|
import {
|
|
137
|
-
|
|
138
|
-
} from "./chunk-
|
|
147
|
+
invalidateEdgeContainer
|
|
148
|
+
} from "./chunk-FQGJZ2HS.js";
|
|
139
149
|
import {
|
|
140
|
-
|
|
141
|
-
|
|
150
|
+
EDGE_CONTAINER_MOUNTS,
|
|
151
|
+
EDGE_HOST_STATE_DIR
|
|
152
|
+
} from "./chunk-VFINNTUL.js";
|
|
142
153
|
import {
|
|
154
|
+
DEFAULT_IMAGE_REGISTRY,
|
|
143
155
|
safeErrorMessage
|
|
144
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-6APULWSU.js";
|
|
145
157
|
|
|
146
158
|
// src/lib/edge-import.ts
|
|
147
159
|
import chalk from "chalk";
|
|
@@ -150,8 +162,8 @@ import ora from "ora";
|
|
|
150
162
|
// src/lib/compose.ts
|
|
151
163
|
import { spawnSync as spawnSync3 } from "child_process";
|
|
152
164
|
import { randomBytes as randomBytes5 } from "crypto";
|
|
153
|
-
import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
154
|
-
import { homedir as homedir2 } from "os";
|
|
165
|
+
import { chmodSync, existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
166
|
+
import { homedir as homedir2, userInfo } from "os";
|
|
155
167
|
import { join as join6 } from "path";
|
|
156
168
|
|
|
157
169
|
// ../../packages/adapters/src/runtime/image-transfer.ts
|
|
@@ -10965,10 +10977,10 @@ var package_default = {
|
|
|
10965
10977
|
// ../../node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js
|
|
10966
10978
|
var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
|
|
10967
10979
|
var remoteProvider = async (init) => {
|
|
10968
|
-
const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import("./dist-es-
|
|
10980
|
+
const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import("./dist-es-VNKHQVIB.js");
|
|
10969
10981
|
if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
|
|
10970
10982
|
init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");
|
|
10971
|
-
const { fromHttp } = await import("./dist-es-
|
|
10983
|
+
const { fromHttp } = await import("./dist-es-5DY7K32L.js");
|
|
10972
10984
|
return chain(fromHttp(init), fromContainerMetadata(init));
|
|
10973
10985
|
}
|
|
10974
10986
|
if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
|
|
@@ -11080,22 +11092,22 @@ var defaultProvider = (init = {}) => memoizeChain([
|
|
|
11080
11092
|
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
|
|
11081
11093
|
throw new CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
|
|
11082
11094
|
}
|
|
11083
|
-
const { fromSSO } = await import("./dist-es-
|
|
11095
|
+
const { fromSSO } = await import("./dist-es-WV4AMOII.js");
|
|
11084
11096
|
return fromSSO(init)(awsIdentityProperties);
|
|
11085
11097
|
},
|
|
11086
11098
|
async (awsIdentityProperties) => {
|
|
11087
11099
|
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
|
|
11088
|
-
const { fromIni } = await import("./dist-es-
|
|
11100
|
+
const { fromIni } = await import("./dist-es-RYHIPOTN.js");
|
|
11089
11101
|
return fromIni(init)(awsIdentityProperties);
|
|
11090
11102
|
},
|
|
11091
11103
|
async (awsIdentityProperties) => {
|
|
11092
11104
|
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
|
|
11093
|
-
const { fromProcess } = await import("./dist-es-
|
|
11105
|
+
const { fromProcess } = await import("./dist-es-OSNJBLXB.js");
|
|
11094
11106
|
return fromProcess(init)(awsIdentityProperties);
|
|
11095
11107
|
},
|
|
11096
11108
|
async (awsIdentityProperties) => {
|
|
11097
11109
|
init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
|
|
11098
|
-
const { fromTokenFile } = await import("./dist-es-
|
|
11110
|
+
const { fromTokenFile } = await import("./dist-es-X3B5QYKB.js");
|
|
11099
11111
|
return fromTokenFile(init)(awsIdentityProperties);
|
|
11100
11112
|
},
|
|
11101
11113
|
async () => {
|
|
@@ -12816,6 +12828,11 @@ async function rebuildFromSource(info) {
|
|
|
12816
12828
|
}
|
|
12817
12829
|
|
|
12818
12830
|
// src/lib/compose.ts
|
|
12831
|
+
var EDGE_SITES_HOST_DIR = `${EDGE_HOST_STATE_DIR}/sites-enabled`;
|
|
12832
|
+
var EDGE_ACME_HOST_DIR = `${EDGE_HOST_STATE_DIR}/acme`;
|
|
12833
|
+
function edgeVolumeYaml(indent) {
|
|
12834
|
+
return EDGE_CONTAINER_MOUNTS.map((m2) => `${indent}- ${m2.host}:${m2.container}:z`).join("\n");
|
|
12835
|
+
}
|
|
12819
12836
|
var COMPOSE_DIR = join6(OS_DIR, "compose");
|
|
12820
12837
|
var INSTALL_METHOD_FILE = join6(OS_DIR, "install-method");
|
|
12821
12838
|
var COMPOSE_FILE = join6(COMPOSE_DIR, "docker-compose.yml");
|
|
@@ -12826,6 +12843,7 @@ var BUILT_SERVICES = [
|
|
|
12826
12843
|
{ service: "dashboard", dockerfile: "apps/dashboard/Dockerfile" },
|
|
12827
12844
|
{ service: "edge", dockerfile: "apps/edge/Dockerfile" }
|
|
12828
12845
|
];
|
|
12846
|
+
var ENV_CONSUMING_SERVICES = ["api", "dashboard", "edge"];
|
|
12829
12847
|
function readInstallMethod() {
|
|
12830
12848
|
try {
|
|
12831
12849
|
const v2 = readFileSync2(INSTALL_METHOD_FILE, "utf8").trim();
|
|
@@ -12905,11 +12923,12 @@ services:
|
|
|
12905
12923
|
ports: ["\${OPENSHIP_BIND_ADDR:-0.0.0.0}:\${API_PORT:-4000}:\${API_PORT:-4000}"]
|
|
12906
12924
|
volumes:
|
|
12907
12925
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
-
|
|
12911
|
-
#
|
|
12912
|
-
|
|
12926
|
+
# Routing state shared with the edge, as HOST BIND MOUNTS (generated from
|
|
12927
|
+
# EDGE_CONTAINER_MOUNTS): the vhost tree, /etc/letsencrypt, the ACME webroot
|
|
12928
|
+
# and the static doc-roots the API writes and the edge serves. Named volumes
|
|
12929
|
+
# hid all of it from every host-side reader (migrate's proxy scan, cert carry,
|
|
12930
|
+
# cert reuse, mail cert symlinks), each of which then silently saw "nothing".
|
|
12931
|
+
${edgeVolumeYaml(" ")}
|
|
12913
12932
|
# Host-op SSH key (createHostExecutor \u2192 host.docker.internal). /dev/null
|
|
12914
12933
|
# when the host channel isn't provisioned \u2192 OPENSHIP_HOST_SSH_HOST stays
|
|
12915
12934
|
# unset and the API falls back to LocalExecutor.
|
|
@@ -12958,18 +12977,11 @@ services:
|
|
|
12958
12977
|
restart: unless-stopped
|
|
12959
12978
|
network_mode: host
|
|
12960
12979
|
volumes:
|
|
12961
|
-
|
|
12962
|
-
- openship_certs:/etc/letsencrypt
|
|
12963
|
-
- openship_acme:/var/www/acme
|
|
12964
|
-
- openship_static:/opt/openship/static
|
|
12980
|
+
${edgeVolumeYaml(" ")}
|
|
12965
12981
|
|
|
12966
12982
|
volumes:
|
|
12967
12983
|
postgres_data:
|
|
12968
12984
|
redis_data:
|
|
12969
|
-
openship_sites:
|
|
12970
|
-
openship_certs:
|
|
12971
|
-
openship_acme:
|
|
12972
|
-
openship_static:
|
|
12973
12985
|
`;
|
|
12974
12986
|
function keepSecret(existing, key) {
|
|
12975
12987
|
return existing[key] || randomBytes5(32).toString("hex");
|
|
@@ -12985,6 +12997,15 @@ function readEnvFile() {
|
|
|
12985
12997
|
}
|
|
12986
12998
|
return out;
|
|
12987
12999
|
}
|
|
13000
|
+
var HOST_KEY_COMMENT = "openship-host-executor";
|
|
13001
|
+
var HOST_KEY_FROM = "172.16.0.0/12,192.168.0.0/16,10.0.0.0/8,127.0.0.1";
|
|
13002
|
+
function hostKeyAuthLine(pub) {
|
|
13003
|
+
return `from="${HOST_KEY_FROM}",restrict,pty ${pub}`;
|
|
13004
|
+
}
|
|
13005
|
+
function rewriteHostAuthorizedKeys(existing, pub) {
|
|
13006
|
+
const kept = existing.split("\n").filter((line) => line.trim() && !line.includes(HOST_KEY_COMMENT));
|
|
13007
|
+
return [...kept, hostKeyAuthLine(pub)].join("\n") + "\n";
|
|
13008
|
+
}
|
|
12988
13009
|
function provisionHostSshChannel() {
|
|
12989
13010
|
if (process.platform !== "linux") return null;
|
|
12990
13011
|
try {
|
|
@@ -12994,23 +13015,28 @@ function provisionHostSshChannel() {
|
|
|
12994
13015
|
if (!existsSync3(keyPath)) {
|
|
12995
13016
|
const g2 = spawnSync3(
|
|
12996
13017
|
"ssh-keygen",
|
|
12997
|
-
["-t", "ed25519", "-N", "", "-q", "-f", keyPath, "-C",
|
|
13018
|
+
["-t", "ed25519", "-N", "", "-q", "-f", keyPath, "-C", HOST_KEY_COMMENT],
|
|
12998
13019
|
{ stdio: "ignore" }
|
|
12999
13020
|
);
|
|
13000
13021
|
if (g2.status !== 0) return null;
|
|
13001
13022
|
}
|
|
13002
13023
|
const pub = readFileSync2(`${keyPath}.pub`, "utf8").trim();
|
|
13003
13024
|
if (!pub) return null;
|
|
13025
|
+
const user = (() => {
|
|
13026
|
+
try {
|
|
13027
|
+
return userInfo().username;
|
|
13028
|
+
} catch {
|
|
13029
|
+
return process.env.USER || process.env.LOGNAME || "root";
|
|
13030
|
+
}
|
|
13031
|
+
})();
|
|
13004
13032
|
const userSshDir = join6(homedir2(), ".ssh");
|
|
13005
13033
|
mkdirSync2(userSshDir, { recursive: true, mode: 448 });
|
|
13006
13034
|
const authKeys = join6(userSshDir, "authorized_keys");
|
|
13007
13035
|
const existing = existsSync3(authKeys) ? readFileSync2(authKeys, "utf8") : "";
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
}
|
|
13013
|
-
return { user: process.env.USER || process.env.LOGNAME || "root", keyPath };
|
|
13036
|
+
const next = rewriteHostAuthorizedKeys(existing, pub);
|
|
13037
|
+
if (next !== existing) writeFileSync(authKeys, next, { mode: 384 });
|
|
13038
|
+
chmodSync(authKeys, 384);
|
|
13039
|
+
return { user, keyPath };
|
|
13014
13040
|
} catch {
|
|
13015
13041
|
return null;
|
|
13016
13042
|
}
|
|
@@ -13042,7 +13068,7 @@ function orphanedStackContainers(project) {
|
|
|
13042
13068
|
function reconcileDbPassword(user, password) {
|
|
13043
13069
|
if (!password) return;
|
|
13044
13070
|
if (compose(["up", "-d", "--wait", "postgres"], { quiet: true }) !== 0) return;
|
|
13045
|
-
const
|
|
13071
|
+
const attempt = (asRole) => spawnSync3(
|
|
13046
13072
|
"docker",
|
|
13047
13073
|
[
|
|
13048
13074
|
"compose",
|
|
@@ -13053,7 +13079,7 @@ function reconcileDbPassword(user, password) {
|
|
|
13053
13079
|
"postgres",
|
|
13054
13080
|
"psql",
|
|
13055
13081
|
"-U",
|
|
13056
|
-
|
|
13082
|
+
asRole,
|
|
13057
13083
|
"-d",
|
|
13058
13084
|
"postgres",
|
|
13059
13085
|
"-v",
|
|
@@ -13069,15 +13095,31 @@ function reconcileDbPassword(user, password) {
|
|
|
13069
13095
|
{
|
|
13070
13096
|
cwd: COMPOSE_DIR,
|
|
13071
13097
|
encoding: "utf8",
|
|
13072
|
-
|
|
13098
|
+
// Create the role if the volume predates it, else just realign it. Both
|
|
13099
|
+
// branches leave exactly the credentials this `.env` will present.
|
|
13100
|
+
input: `DO $$ BEGIN
|
|
13101
|
+
IF EXISTS (SELECT 1 FROM pg_roles WHERE rolname = '${user}') THEN
|
|
13102
|
+
ALTER ROLE "${user}" WITH LOGIN PASSWORD '${password}';
|
|
13103
|
+
ELSE
|
|
13104
|
+
CREATE ROLE "${user}" WITH LOGIN SUPERUSER PASSWORD '${password}';
|
|
13105
|
+
END IF;
|
|
13106
|
+
END $$;
|
|
13073
13107
|
`
|
|
13074
13108
|
}
|
|
13075
13109
|
);
|
|
13110
|
+
let r2 = attempt(user);
|
|
13111
|
+
if (r2.status !== 0) r2 = attempt("postgres");
|
|
13076
13112
|
if (r2.status !== 0) {
|
|
13077
13113
|
console.log(
|
|
13078
|
-
`
|
|
13079
|
-
|
|
13080
|
-
|
|
13114
|
+
`
|
|
13115
|
+
! Could not realign the database password (${(r2.stderr ?? "").trim() || "psql failed"}).
|
|
13116
|
+
The api will fail with "password authentication failed for user "${user}"" because the
|
|
13117
|
+
existing data volume was initialized with a different password.
|
|
13118
|
+
|
|
13119
|
+
Fix it one of two ways:
|
|
13120
|
+
\u2022 restore the .env that created the volume, or
|
|
13121
|
+
\u2022 start fresh (DESTROYS DB DATA): openship uninstall then openship up
|
|
13122
|
+
`
|
|
13081
13123
|
);
|
|
13082
13124
|
}
|
|
13083
13125
|
}
|
|
@@ -13090,6 +13132,48 @@ function removeOrphanedStack(project) {
|
|
|
13090
13132
|
);
|
|
13091
13133
|
spawnSync3("docker", ["rm", "-f", ...orphans.map((o2) => o2.name)], { stdio: "ignore" });
|
|
13092
13134
|
}
|
|
13135
|
+
function migrateLegacyEdgeVolumes(project) {
|
|
13136
|
+
const pairs = [
|
|
13137
|
+
{ volume: `${project}_openship_sites`, host: EDGE_SITES_HOST_DIR },
|
|
13138
|
+
{ volume: `${project}_openship_certs`, host: "/etc/letsencrypt" },
|
|
13139
|
+
{ volume: `${project}_openship_acme`, host: EDGE_ACME_HOST_DIR },
|
|
13140
|
+
{ volume: `${project}_openship_static`, host: "/opt/openship/static" }
|
|
13141
|
+
];
|
|
13142
|
+
const ls = spawnSync3("docker", ["volume", "ls", "--format", "{{.Name}}"], { encoding: "utf8" });
|
|
13143
|
+
if (ls.status !== 0 || !ls.stdout) return;
|
|
13144
|
+
const existing = new Set(ls.stdout.split("\n").map((l2) => l2.trim()).filter(Boolean));
|
|
13145
|
+
for (const { volume, host } of pairs) {
|
|
13146
|
+
if (!existing.has(volume)) continue;
|
|
13147
|
+
mkdirSync2(host, { recursive: true });
|
|
13148
|
+
const alreadyThere = spawnSync3("sh", ["-c", `ls -A ${JSON.stringify(host)} 2>/dev/null | head -1`], {
|
|
13149
|
+
encoding: "utf8"
|
|
13150
|
+
});
|
|
13151
|
+
if (alreadyThere.stdout?.trim()) continue;
|
|
13152
|
+
console.log(` Moving edge state from volume ${volume} onto ${host}...`);
|
|
13153
|
+
const copy = spawnSync3(
|
|
13154
|
+
"docker",
|
|
13155
|
+
[
|
|
13156
|
+
"run",
|
|
13157
|
+
"--rm",
|
|
13158
|
+
"-v",
|
|
13159
|
+
`${volume}:/from:ro`,
|
|
13160
|
+
"-v",
|
|
13161
|
+
`${host}:/to`,
|
|
13162
|
+
"alpine:3",
|
|
13163
|
+
"sh",
|
|
13164
|
+
"-c",
|
|
13165
|
+
"cp -a /from/. /to/ 2>/dev/null || true"
|
|
13166
|
+
],
|
|
13167
|
+
{ stdio: "inherit" }
|
|
13168
|
+
);
|
|
13169
|
+
if (copy.status !== 0) {
|
|
13170
|
+
console.log(
|
|
13171
|
+
` Could not copy ${volume} \u2014 the stack will start with an empty ${host}.
|
|
13172
|
+
Recover manually with: docker run --rm -v ${volume}:/from -v ${host}:/to alpine cp -a /from/. /to/`
|
|
13173
|
+
);
|
|
13174
|
+
}
|
|
13175
|
+
}
|
|
13176
|
+
}
|
|
13093
13177
|
function warnOrphanedVolumes(project) {
|
|
13094
13178
|
const r2 = spawnSync3("docker", ["volume", "ls", "--format", "{{.Name}}"], { encoding: "utf8" });
|
|
13095
13179
|
if (r2.status !== 0 || !r2.stdout) return;
|
|
@@ -13099,11 +13183,40 @@ function warnOrphanedVolumes(project) {
|
|
|
13099
13183
|
if (others.size === 0) return;
|
|
13100
13184
|
console.log(
|
|
13101
13185
|
` Note: volumes from a previous install (project "${[...others].join(", ")}") are still on disk
|
|
13102
|
-
and are NOT mounted by this stack \u2014 its database
|
|
13186
|
+
and are NOT mounted by this stack \u2014 its database starts fresh. (Certificates and
|
|
13187
|
+
vhosts now live on the host, so those carry over.)
|
|
13103
13188
|
Remove them with \`docker volume ls | grep _openship_\` once you're sure they aren't needed.`
|
|
13104
13189
|
);
|
|
13105
13190
|
}
|
|
13106
|
-
function
|
|
13191
|
+
function keepConfig(prev, key, explicit) {
|
|
13192
|
+
const set = explicit?.trim();
|
|
13193
|
+
if (set) return set;
|
|
13194
|
+
const carried = prev[key]?.trim();
|
|
13195
|
+
return carried || void 0;
|
|
13196
|
+
}
|
|
13197
|
+
function resolveEnvConfig(prev, opts) {
|
|
13198
|
+
const publicUrl = keepConfig(prev, "OPENSHIP_PUBLIC_URL", opts.publicUrl);
|
|
13199
|
+
return {
|
|
13200
|
+
apiPort: keepConfig(prev, "API_PORT", opts.apiPort) ?? "4000",
|
|
13201
|
+
dashPort: keepConfig(prev, "DASHBOARD_PORT", opts.dashboardPort) ?? "3001",
|
|
13202
|
+
...publicUrl ? { publicUrl } : {},
|
|
13203
|
+
// A public URL always implies a proxy in front; otherwise keep whatever the
|
|
13204
|
+
// install was configured with.
|
|
13205
|
+
trustProxy: Boolean(opts.trustProxy) || Boolean(publicUrl) || prev.TRUST_PROXY === "true",
|
|
13206
|
+
...keepConfig(prev, "OPENSHIP_EXTRA_TRUSTED_ORIGINS", opts.extraTrustedOrigins) ? {
|
|
13207
|
+
extraTrustedOrigins: keepConfig(
|
|
13208
|
+
prev,
|
|
13209
|
+
"OPENSHIP_EXTRA_TRUSTED_ORIGINS",
|
|
13210
|
+
opts.extraTrustedOrigins
|
|
13211
|
+
)
|
|
13212
|
+
} : {},
|
|
13213
|
+
registry: keepConfig(prev, "OPENSHIP_IMAGE_REGISTRY", opts.registry) ?? DEFAULT_IMAGE_REGISTRY,
|
|
13214
|
+
// Tri-state: the flag is absent on a plain re-run, so fall back to what the
|
|
13215
|
+
// install chose rather than silently re-granting host control.
|
|
13216
|
+
hostControl: opts.noHostControl === void 0 ? prev.OPENSHIP_HOST_CONTROL !== "false" : !opts.noHostControl
|
|
13217
|
+
};
|
|
13218
|
+
}
|
|
13219
|
+
function renderEnv(opts, host, cfg) {
|
|
13107
13220
|
const prev = readEnvFile();
|
|
13108
13221
|
const lines = [
|
|
13109
13222
|
"# Managed by `openship up`. Secrets are generated once and preserved.",
|
|
@@ -13114,17 +13227,20 @@ function renderEnv(opts, host) {
|
|
|
13114
13227
|
"OPENSHIP_REQUIRE_AUTH=true",
|
|
13115
13228
|
// Read by createHostExecutor (throws when false) and by the servers list
|
|
13116
13229
|
// (hides the local row). Written explicitly so the policy is visible in .env.
|
|
13117
|
-
`OPENSHIP_HOST_CONTROL=${
|
|
13118
|
-
`OPENSHIP_IMAGE_REGISTRY=${
|
|
13119
|
-
`OPENSHIP_VERSION=${opts.version || (true ? "0.4.
|
|
13230
|
+
`OPENSHIP_HOST_CONTROL=${cfg.hostControl ? "true" : "false"}`,
|
|
13231
|
+
`OPENSHIP_IMAGE_REGISTRY=${cfg.registry}`,
|
|
13232
|
+
`OPENSHIP_VERSION=${opts.version || (true ? "0.4.6" : "latest")}`,
|
|
13120
13233
|
`POSTGRES_PASSWORD=${keepSecret(prev, "POSTGRES_PASSWORD")}`,
|
|
13121
13234
|
`BETTER_AUTH_SECRET=${keepSecret(prev, "BETTER_AUTH_SECRET")}`,
|
|
13122
|
-
`INTERNAL_TOKEN=${keepSecret(prev, "INTERNAL_TOKEN")}
|
|
13235
|
+
`INTERNAL_TOKEN=${keepSecret(prev, "INTERNAL_TOKEN")}`,
|
|
13236
|
+
`API_PORT=${cfg.apiPort}`,
|
|
13237
|
+
`DASHBOARD_PORT=${cfg.dashPort}`
|
|
13123
13238
|
];
|
|
13124
|
-
if (
|
|
13125
|
-
if (
|
|
13126
|
-
|
|
13127
|
-
|
|
13239
|
+
if (cfg.publicUrl) lines.push(`OPENSHIP_PUBLIC_URL=${cfg.publicUrl}`);
|
|
13240
|
+
if (cfg.extraTrustedOrigins) {
|
|
13241
|
+
lines.push(`OPENSHIP_EXTRA_TRUSTED_ORIGINS=${cfg.extraTrustedOrigins}`);
|
|
13242
|
+
}
|
|
13243
|
+
if (cfg.trustProxy) lines.push("TRUST_PROXY=true");
|
|
13128
13244
|
if (host) {
|
|
13129
13245
|
lines.push(
|
|
13130
13246
|
"OPENSHIP_HOST_SSH_HOST=host.docker.internal",
|
|
@@ -13156,13 +13272,20 @@ ${services}`;
|
|
|
13156
13272
|
}
|
|
13157
13273
|
function materialize(opts) {
|
|
13158
13274
|
mkdirSync2(COMPOSE_DIR, { recursive: true, mode: 448 });
|
|
13159
|
-
const
|
|
13160
|
-
const
|
|
13275
|
+
const prev = readEnvFile();
|
|
13276
|
+
const cfg = resolveEnvConfig(prev, opts);
|
|
13277
|
+
const host = cfg.hostControl ? provisionHostSshChannel() : null;
|
|
13278
|
+
let before = "";
|
|
13279
|
+
try {
|
|
13280
|
+
before = readFileSync2(ENV_FILE, "utf8");
|
|
13281
|
+
} catch {
|
|
13282
|
+
}
|
|
13283
|
+
const rendered = renderEnv(opts, host, cfg);
|
|
13161
13284
|
writeFileSync(COMPOSE_FILE, COMPOSE_YAML);
|
|
13162
|
-
writeFileSync(ENV_FILE,
|
|
13285
|
+
writeFileSync(ENV_FILE, rendered, { mode: 384 });
|
|
13163
13286
|
const buildDir = opts.build === false ? null : sourceBuildDir();
|
|
13164
13287
|
if (buildDir) writeFileSync(BUILD_FILE, renderBuildOverride(buildDir));
|
|
13165
|
-
return { buildDir,
|
|
13288
|
+
return { buildDir, cfg, envChanged: before !== "" && rendered !== before };
|
|
13166
13289
|
}
|
|
13167
13290
|
function dbVolumeExists(project) {
|
|
13168
13291
|
const r2 = spawnSync3("docker", ["volume", "inspect", `${project}_postgres_data`], {
|
|
@@ -13180,15 +13303,19 @@ function compose(args, opts) {
|
|
|
13180
13303
|
return r2.status ?? 1;
|
|
13181
13304
|
}
|
|
13182
13305
|
function composeUp(opts) {
|
|
13183
|
-
const { buildDir,
|
|
13184
|
-
const apiPort =
|
|
13185
|
-
const dashPort =
|
|
13306
|
+
const { buildDir, cfg, envChanged } = materialize(opts);
|
|
13307
|
+
const apiPort = cfg.apiPort;
|
|
13308
|
+
const dashPort = cfg.dashPort;
|
|
13309
|
+
const up = (extra = {}) => compose(
|
|
13310
|
+
envChanged ? ["up", "-d", "--force-recreate", ...ENV_CONSUMING_SERVICES] : ["up", "-d"],
|
|
13311
|
+
extra
|
|
13312
|
+
);
|
|
13186
13313
|
const env = readEnvFile();
|
|
13187
13314
|
const project = env.COMPOSE_PROJECT_NAME || "openship";
|
|
13188
13315
|
removeOrphanedStack(project);
|
|
13316
|
+
migrateLegacyEdgeVolumes(project);
|
|
13189
13317
|
warnOrphanedVolumes(project);
|
|
13190
|
-
if (
|
|
13191
|
-
console.log(" Existing database volume with regenerated credentials \u2014 realigning the password...");
|
|
13318
|
+
if (dbVolumeExists(project)) {
|
|
13192
13319
|
reconcileDbPassword(env.POSTGRES_USER || "openship", env.POSTGRES_PASSWORD ?? "");
|
|
13193
13320
|
}
|
|
13194
13321
|
if (buildDir) {
|
|
@@ -13198,17 +13325,22 @@ function composeUp(opts) {
|
|
|
13198
13325
|
if (compose(["build"], { withBuildOverride: true }) !== 0) {
|
|
13199
13326
|
return { ok: false, apiPort, dashPort };
|
|
13200
13327
|
}
|
|
13201
|
-
if (
|
|
13328
|
+
if (up({ withBuildOverride: true }) !== 0) {
|
|
13202
13329
|
return { ok: false, apiPort, dashPort };
|
|
13203
13330
|
}
|
|
13331
|
+
onEdgeContainerChanged();
|
|
13204
13332
|
writeInstallMethod("compose");
|
|
13205
13333
|
return { ok: true, apiPort, dashPort };
|
|
13206
13334
|
}
|
|
13207
13335
|
if (compose(["pull"]) !== 0) return { ok: false, apiPort, dashPort };
|
|
13208
|
-
if (
|
|
13336
|
+
if (up() !== 0) return { ok: false, apiPort, dashPort };
|
|
13337
|
+
onEdgeContainerChanged();
|
|
13209
13338
|
writeInstallMethod("compose");
|
|
13210
13339
|
return { ok: true, apiPort, dashPort };
|
|
13211
13340
|
}
|
|
13341
|
+
function onEdgeContainerChanged() {
|
|
13342
|
+
invalidateEdgeContainer();
|
|
13343
|
+
}
|
|
13212
13344
|
function composeDown() {
|
|
13213
13345
|
if (!existsSync3(COMPOSE_FILE)) return false;
|
|
13214
13346
|
return compose(["down"]) === 0;
|
|
@@ -13218,7 +13350,7 @@ function composeUninstall(opts = {}) {
|
|
|
13218
13350
|
const ok = existsSync3(COMPOSE_FILE) ? compose(["down", "-v", "--remove-orphans"]) === 0 : false;
|
|
13219
13351
|
if (opts.removeImages) {
|
|
13220
13352
|
const env = readEnvFile();
|
|
13221
|
-
const registry = env.OPENSHIP_IMAGE_REGISTRY ||
|
|
13353
|
+
const registry = env.OPENSHIP_IMAGE_REGISTRY || DEFAULT_IMAGE_REGISTRY;
|
|
13222
13354
|
const version = env.OPENSHIP_VERSION || "latest";
|
|
13223
13355
|
for (const { service } of BUILT_SERVICES) {
|
|
13224
13356
|
const ref = `${registry}/openship-${service}:${version}`;
|
|
@@ -13231,23 +13363,25 @@ function composeUninstall(opts = {}) {
|
|
|
13231
13363
|
}
|
|
13232
13364
|
function composeUpdate(version) {
|
|
13233
13365
|
if (!existsSync3(COMPOSE_FILE)) return false;
|
|
13234
|
-
|
|
13235
|
-
const env = readEnvFile();
|
|
13236
|
-
env.OPENSHIP_VERSION = version;
|
|
13237
|
-
writeFileSync(
|
|
13238
|
-
ENV_FILE,
|
|
13239
|
-
Object.entries(env).map(([k2, v2]) => `${k2}=${v2}`).join("\n") + "\n",
|
|
13240
|
-
{ mode: 384 }
|
|
13241
|
-
);
|
|
13242
|
-
}
|
|
13243
|
-
if (sourceBuildDir()) {
|
|
13244
|
-
return compose(["build"], { withBuildOverride: true }) === 0 && compose(["up", "-d"], { withBuildOverride: true }) === 0;
|
|
13245
|
-
}
|
|
13246
|
-
return compose(["pull"]) === 0 && compose(["up", "-d"]) === 0;
|
|
13366
|
+
return composeUp(version ? { version } : {}).ok;
|
|
13247
13367
|
}
|
|
13248
13368
|
function composePs() {
|
|
13249
13369
|
return compose(["ps"]);
|
|
13250
13370
|
}
|
|
13371
|
+
function composeRunning() {
|
|
13372
|
+
const r2 = spawnSync3(
|
|
13373
|
+
"docker",
|
|
13374
|
+
["compose", "-f", COMPOSE_FILE, "ps", "--status", "running", "-q"],
|
|
13375
|
+
{ cwd: COMPOSE_DIR, encoding: "utf8" }
|
|
13376
|
+
);
|
|
13377
|
+
return r2.status === 0 && r2.stdout.trim().length > 0;
|
|
13378
|
+
}
|
|
13379
|
+
function composeStart() {
|
|
13380
|
+
return compose(["up", "-d"], { quiet: true }) === 0;
|
|
13381
|
+
}
|
|
13382
|
+
function composeRestart() {
|
|
13383
|
+
return compose(["restart"], { quiet: true }) === 0;
|
|
13384
|
+
}
|
|
13251
13385
|
function composeInternalToken() {
|
|
13252
13386
|
return readEnvFile().INTERNAL_TOKEN ?? null;
|
|
13253
13387
|
}
|
|
@@ -13348,6 +13482,9 @@ export {
|
|
|
13348
13482
|
composeUninstall,
|
|
13349
13483
|
composeUpdate,
|
|
13350
13484
|
composePs,
|
|
13485
|
+
composeRunning,
|
|
13486
|
+
composeStart,
|
|
13487
|
+
composeRestart,
|
|
13351
13488
|
composeInternalToken,
|
|
13352
13489
|
waitForApiHealth,
|
|
13353
13490
|
importMigratedSites
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
} from "
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
":" //# ; exec "$(command -v bun || command -v node)" "$0" "$@"
|
|
3
|
+
import { createRequire as __ospCreateRequire } from "node:module";
|
|
4
|
+
const require = __ospCreateRequire(import.meta.url);
|
|
4
5
|
import {
|
|
5
6
|
connectSshClient,
|
|
6
7
|
getTarCreateEnv,
|
|
@@ -8,22 +9,25 @@ import {
|
|
|
8
9
|
openSshUnixSocket,
|
|
9
10
|
prepareSourceTarArgs,
|
|
10
11
|
reconcileKnownHosts
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OXWDY22G.js";
|
|
12
13
|
import {
|
|
13
14
|
SshDisconnectedError
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RPHRPFEH.js";
|
|
16
|
+
import {
|
|
17
|
+
LocalExecutor
|
|
18
|
+
} from "./chunk-TYVME3XD.js";
|
|
15
19
|
import {
|
|
16
20
|
emitBufferedLines,
|
|
17
21
|
flushBufferedLines,
|
|
18
22
|
hasLocalCommand,
|
|
19
23
|
logEntry,
|
|
20
24
|
sq
|
|
21
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-FPRHYBY2.js";
|
|
22
26
|
import {
|
|
23
27
|
TRANSFER_EXCLUDES,
|
|
24
28
|
formatBytes,
|
|
25
29
|
safeErrorMessage
|
|
26
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6APULWSU.js";
|
|
27
31
|
|
|
28
32
|
// ../../packages/adapters/src/system/executor.ts
|
|
29
33
|
import { readFileSync } from "fs";
|
|
@@ -490,6 +494,9 @@ var SshExecutor = class _SshExecutor {
|
|
|
490
494
|
});
|
|
491
495
|
});
|
|
492
496
|
}
|
|
497
|
+
async rename(from, to) {
|
|
498
|
+
await this.exec(`mv ${sq(from)} ${sq(to)}`);
|
|
499
|
+
}
|
|
493
500
|
async readFile(path) {
|
|
494
501
|
return this.withChannelRetry(async () => {
|
|
495
502
|
const sftp = await this.sftp();
|
|
@@ -1218,6 +1225,9 @@ var SystemSshExecutor = class _SystemSshExecutor {
|
|
|
1218
1225
|
throw new Error(res.stderr.trim() || `Failed to write ${path} (exit ${res.code})`);
|
|
1219
1226
|
}
|
|
1220
1227
|
}
|
|
1228
|
+
async rename(from, to) {
|
|
1229
|
+
await this.exec(`mv ${sq(from)} ${sq(to)}`);
|
|
1230
|
+
}
|
|
1221
1231
|
async readFile(path) {
|
|
1222
1232
|
const res = await this.runSsh(`cat ${sq(path)}`);
|
|
1223
1233
|
if (res.code !== 0) {
|
|
@@ -1487,12 +1497,13 @@ var SystemSshExecutor = class _SystemSshExecutor {
|
|
|
1487
1497
|
};
|
|
1488
1498
|
|
|
1489
1499
|
// ../../packages/adapters/src/system/executor.ts
|
|
1500
|
+
var localExecutor = new LocalExecutor();
|
|
1490
1501
|
function createExecutor(ssh) {
|
|
1491
1502
|
if (ssh) {
|
|
1492
1503
|
if (ssh.useSystemSsh) return new SystemSshExecutor(ssh);
|
|
1493
1504
|
return new SshExecutor(ssh);
|
|
1494
1505
|
}
|
|
1495
|
-
return
|
|
1506
|
+
return localExecutor;
|
|
1496
1507
|
}
|
|
1497
1508
|
function hostControlDisabled() {
|
|
1498
1509
|
return process.env.OPENSHIP_HOST_CONTROL?.trim().toLowerCase() === "false";
|
|
@@ -1504,7 +1515,7 @@ function createHostExecutor() {
|
|
|
1504
1515
|
);
|
|
1505
1516
|
}
|
|
1506
1517
|
const host = process.env.OPENSHIP_HOST_SSH_HOST?.trim();
|
|
1507
|
-
if (!host) return
|
|
1518
|
+
if (!host) return localExecutor;
|
|
1508
1519
|
const keyPath = process.env.OPENSHIP_HOST_SSH_KEY?.trim();
|
|
1509
1520
|
const portRaw = Number(process.env.OPENSHIP_HOST_SSH_PORT || "22");
|
|
1510
1521
|
const port = Number.isInteger(portRaw) && portRaw > 0 && portRaw < 65536 ? portRaw : 22;
|