mirror of https://github.com/tteck/Proxmox.git
				
				
				
			Update umami.sh
Update umami-install.sh Update build.func Adjust resources and dependencies for Umami installation and build process
This commit is contained in:
		
							parent
							
								
									4bce8ff991
								
							
						
					
					
						commit
						fc09585b36
					
				| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
 | 
			
		||||
source <(curl -s https://raw.githubusercontent.com/BramSuurdje/Proxmox/main/misc/build.func)
 | 
			
		||||
# Copyright (c) 2021-2024 tteck
 | 
			
		||||
# Author: tteck (tteckster)
 | 
			
		||||
# License: MIT
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,6 @@ msg_ok "Set up Node.js Repository"
 | 
			
		|||
msg_info "Installing Node.js"
 | 
			
		||||
$STD apt-get update
 | 
			
		||||
$STD apt-get install -y nodejs
 | 
			
		||||
$STD npm install -g yarn
 | 
			
		||||
msg_ok "Installed Node.js"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up postgresql"
 | 
			
		||||
| 
						 | 
				
			
			@ -53,9 +52,9 @@ msg_ok "Set up postgresql"
 | 
			
		|||
msg_info "Installing Umami (Patience)"
 | 
			
		||||
git clone -q https://github.com/umami-software/umami.git /opt/umami
 | 
			
		||||
cd /opt/umami
 | 
			
		||||
$STD yarn install
 | 
			
		||||
$STD npm install
 | 
			
		||||
echo -e "DATABASE_URL=postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME" >>/opt/umami/.env
 | 
			
		||||
$STD yarn run build
 | 
			
		||||
$STD npm run build
 | 
			
		||||
msg_ok "Installed Umami"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
| 
						 | 
				
			
			@ -68,7 +67,7 @@ Type=simple
 | 
			
		|||
Restart=always
 | 
			
		||||
User=root
 | 
			
		||||
WorkingDirectory=/opt/umami
 | 
			
		||||
ExecStart=/usr/bin/yarn run start
 | 
			
		||||
ExecStart=/usr/bin/npm run start
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -531,9 +531,9 @@ build_container() {
 | 
			
		|||
  TEMP_DIR=$(mktemp -d)
 | 
			
		||||
  pushd $TEMP_DIR >/dev/null
 | 
			
		||||
  if [ "$var_os" == "alpine" ]; then
 | 
			
		||||
    export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/alpine-install.func)"
 | 
			
		||||
    export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/BramSuurdje/Proxmox/main/misc/alpine-install.func)"
 | 
			
		||||
  else
 | 
			
		||||
    export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/install.func)"
 | 
			
		||||
    export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/BramSuurdje/Proxmox/main/misc/install.func)"
 | 
			
		||||
  fi
 | 
			
		||||
  export CACHER="$APT_CACHER"
 | 
			
		||||
  export CACHER_IP="$APT_CACHER_IP"
 | 
			
		||||
| 
						 | 
				
			
			@ -563,7 +563,7 @@ build_container() {
 | 
			
		|||
    $PW
 | 
			
		||||
  "
 | 
			
		||||
  # This executes create_lxc.sh and creates the container and .conf file
 | 
			
		||||
  bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit
 | 
			
		||||
  bash -c "$(wget -qLO - https://raw.githubusercontent.com/BramSuurdje/Proxmox/main/ct/create_lxc.sh)" || exit
 | 
			
		||||
 | 
			
		||||
  LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
 | 
			
		||||
  if [ "$CT_TYPE" == "0" ]; then
 | 
			
		||||
| 
						 | 
				
			
			@ -625,14 +625,14 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
 | 
			
		|||
EOF'
 | 
			
		||||
    pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
 | 
			
		||||
  fi
 | 
			
		||||
  lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/install/$var_install.sh)" || exit
 | 
			
		||||
  lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/BramSuurdje/Proxmox/main/install/$var_install.sh)" || exit
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function sets the description of the container.
 | 
			
		||||
description() {
 | 
			
		||||
  IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
 | 
			
		||||
  pct set "$CTID" -description "<div align='center'><a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'><img src='https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/logo-81x112.png'/></a>
 | 
			
		||||
  pct set "$CTID" -description "<div align='center'><a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'><img src='https://raw.githubusercontent.com/BramSuurdje/Proxmox/main/misc/images/logo-81x112.png'/></a>
 | 
			
		||||
 | 
			
		||||
  # ${APP} LXC
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue