fix: финализация fix6 для production runtime и reconfigure

This commit is contained in:
2026-04-28 17:29:23 +05:00
parent 607689df9b
commit 087d9f616a
11 changed files with 34 additions and 85 deletions
+3 -4
View File
@@ -1,7 +1,7 @@
# HY2XS canonical production runtime config (packaged baseline)
HY2XS_IPV6_ENABLED=false
HY2XS_DOMAIN=replace-with-your-domain.example
HY2XS_PUBLIC_HOST=replace-with-your-domain.example
HY2XS_DOMAIN=uk.api.withen.pro
HY2XS_PUBLIC_HOST=uk.api.withen.pro
HY2XS_PUBLIC_PORT=443
HY2XS_SSH_PORT=22
HY2XS_FIREWALL_ENABLED=true
@@ -15,13 +15,12 @@ HY2XS_FORCE_PASSWORD_CHANGE=false
HY2XS_ALLOW_SELF_SIGNED_DEV=false
HY2XS_TLS_MODE=acme
HY2XS_ACME_TYPE=http
HY2XS_ACME_EMAIL=replace-with-your-email@example.com
HY2XS_ACME_EMAIL=admin@withen.pro
HY2XS_TLS_CERT_PATH=/etc/hysteria/server.crt
HY2XS_TLS_KEY_PATH=/etc/hysteria/server.key
HY2XS_HYSTERIA_BIND_HOST=0.0.0.0
HY2XS_HYSTERIA_PORT=443
HY2XS_HYSTERIA_AUTH_MODE=http
HY2XS_HYSTERIA_AUTH_URL=http://127.0.0.1:8080/hui/hysteria2/auth
HY2XS_HYSTERIA_TRAFFIC_STATS_HOST=127.0.0.1
HY2XS_HYSTERIA_TRAFFIC_STATS_PORT=36712
HY2XS_HYSTERIA_TRAFFIC_STATS_SECRET=__GENERATE__
+7 -1
View File
@@ -13,7 +13,13 @@
Запускать от root:
```sh
./install.sh --non-interactive --domain example.com
./install.sh --non-interactive
```
С внешним source-config:
```sh
./install.sh --config /root/custom-hy2xs.env --non-interactive
```
В baseline нет target-side JavaScript, TypeScript, frontend или Go build step.
+11 -1
View File
@@ -5,6 +5,7 @@ PACKAGE_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
ORCHESTRATOR="$PACKAGE_DIR/orchestrator/hy2xs-orchestrator"
ORCHESTRATOR_INSTALL_PATH="/usr/local/lib/hy2xs/hy2xs-orchestrator"
ORCHESTRATOR_SYMLINK="/usr/local/bin/hy2xs-orchestrator"
RUNTIME_PACKAGE_DIR="/usr/local/lib/hy2xs/package"
log() {
printf '[hy2xs-install] %s\n' "$*"
@@ -27,6 +28,15 @@ install -d -m 0755 /usr/local/lib/hy2xs
install -m 0755 "$ORCHESTRATOR" "$ORCHESTRATOR_INSTALL_PATH"
ln -sf "$ORCHESTRATOR_INSTALL_PATH" "$ORCHESTRATOR_SYMLINK"
log "installing runtime package assets to: $RUNTIME_PACKAGE_DIR"
rm -rf "$RUNTIME_PACKAGE_DIR"
install -d -m 0755 "$RUNTIME_PACKAGE_DIR"
cp -a "$PACKAGE_DIR/config" "$RUNTIME_PACKAGE_DIR/"
cp -a "$PACKAGE_DIR/docs" "$RUNTIME_PACKAGE_DIR/"
cp -a "$PACKAGE_DIR/systemd" "$RUNTIME_PACKAGE_DIR/"
cp -a "$PACKAGE_DIR/templates" "$RUNTIME_PACKAGE_DIR/"
cp -a "$PACKAGE_DIR/metadata" "$RUNTIME_PACKAGE_DIR/"
log "package directory: $PACKAGE_DIR"
log "starting install-only orchestrator"
exec "$ORCHESTRATOR_INSTALL_PATH" install --package-dir "$PACKAGE_DIR" "$@"
exec "$ORCHESTRATOR_INSTALL_PATH" install --package-dir "$RUNTIME_PACKAGE_DIR" "$@"