sync build tree from private myoffice

This commit is contained in:
myoffice-sync
2026-08-05 13:45:24 +00:00
parent 76c3da36cd
commit 73b7dd8f51
2 changed files with 37 additions and 0 deletions
+16
View File
@@ -27,6 +27,17 @@ unset LANGUAGE LC_TIME LC_MESSAGES 2>/dev/null || true
msg() { echo -e " ==> $*"; }
# TEMPORARY: map Gitea hostname → nginx LAN (override with GITEA_HOSTS_IP= to disable)
ensure_gitea_hosts() {
if [[ -z "${GITEA_HOSTS_IP:-}" ]]; then
return 0
fi
local hn="${GITEA_HOSTS_NAME:-mygit.ase.com.ua}"
sed -i "/[[:space:]]${hn}\$/d" /etc/hosts
echo "${GITEA_HOSTS_IP} ${hn}" >> /etc/hosts
msg "hosts: ${GITEA_HOSTS_IP} ${hn}"
}
as_postgres() {
# Script runs as root in CT; sudo is not installed.
# cd away from /root — postgres cannot access it (harmless but noisy otherwise).
@@ -176,8 +187,12 @@ GITEA_OWNER=${GITEA_OWNER:-}
GITEA_REPO=${GITEA_REPO:-myoffice_public}
RELEASE_TAG=${RELEASE_TAG:-latest}
RELEASE_ASSET_URL=${RELEASE_ASSET_URL:-}
GITEA_HOSTS_IP=${GITEA_HOSTS_IP:-}
GITEA_HOSTS_NAME=${GITEA_HOSTS_NAME:-mygit.ase.com.ua}
EOF
# TEMPORARY hosts also persisted above in env; already applied at start via ensure_gitea_hosts
systemctl daemon-reload
systemctl enable myoffice-api
if [[ -f "${API_DIR}/MyOffice.Web.dll" ]]; then
@@ -202,6 +217,7 @@ print_done() {
}
detect_public_url
ensure_gitea_hosts
install_base
install_aspnet_runtime
setup_postgres