sync build tree from private myoffice
This commit is contained in:
+19
-7
@@ -1,7 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# MyOffice Proxmox LXC installer (community-scripts style).
|
||||
# One-liner (env optional — defaults match public repo):
|
||||
# bash -c "$(curl -fsSL https://mygit.ase.com.ua/alexandr/myoffice_public/raw/branch/master/proxmox/myoffice.sh)"
|
||||
#
|
||||
# One-liner (optional arg = IP for CT /etc/hosts → mygit hostname, when hairpin DNS fails):
|
||||
# bash -c "$(curl -fsSL https://mygit.ase.com.ua/alexandr/myoffice_public/raw/branch/master/proxmox/myoffice.sh)" 192.168.100.10
|
||||
# Or: curl -fsSL …/myoffice.sh | bash -s -- 192.168.100.10
|
||||
# Or: export GITEA_HOSTS_IP=192.168.100.10 then run without arg
|
||||
#
|
||||
# Creates one LXC with PostgreSQL + ASP.NET runtime + app from Gitea Release.
|
||||
# No Docker, no nginx, no git/SDK/Node in the CT (use your existing proxy LXC in front).
|
||||
@@ -15,12 +18,21 @@ GITEA_BRANCH="${GITEA_BRANCH:-master}"
|
||||
RELEASE_TAG="${RELEASE_TAG:-latest}"
|
||||
RELEASE_ASSET_URL="${RELEASE_ASSET_URL:-}"
|
||||
GITEA_TOKEN="${GITEA_TOKEN:-}"
|
||||
|
||||
# TEMPORARY: CT often resolves mygit to a public IP (hairpin fails). Map to nginx LAN.
|
||||
# Remove when CT DNS/routing reaches Gitea correctly. Override: GITEA_HOSTS_IP= (empty = skip)
|
||||
GITEA_HOSTS_IP="${GITEA_HOSTS_IP:-192.168.100.10}"
|
||||
GITEA_HOSTS_NAME="${GITEA_HOSTS_NAME:-mygit.ase.com.ua}"
|
||||
|
||||
# Optional CT hosts override: env, or positional IP.
|
||||
# bash -c "…" IP → IP is $0 ; bash -s -- IP → IP is $1
|
||||
is_ipv4() { [[ "${1:-}" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; }
|
||||
if [[ -z "${GITEA_HOSTS_IP:-}" ]]; then
|
||||
if is_ipv4 "${1:-}"; then
|
||||
GITEA_HOSTS_IP="$1"
|
||||
elif is_ipv4 "${0:-}"; then
|
||||
GITEA_HOSTS_IP="$0"
|
||||
else
|
||||
GITEA_HOSTS_IP=""
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "${REPO_RAW_BASE:-}" ]]; then
|
||||
REPO_RAW_BASE="${GITEA_URL%/}/${GITEA_OWNER}/${GITEA_REPO}/raw/branch/${GITEA_BRANCH}"
|
||||
fi
|
||||
@@ -427,7 +439,7 @@ wait_for_network() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# TEMPORARY hosts override inside CT (see GITEA_HOSTS_IP).
|
||||
# Optional CT /etc/hosts: GITEA_HOSTS_IP → GITEA_HOSTS_NAME (skip if empty).
|
||||
ensure_ct_gitea_hosts() {
|
||||
if [[ -z "${GITEA_HOSTS_IP}" ]]; then
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user