mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Refactor (#6939)
This commit is contained in:
		@@ -32,11 +32,12 @@ function update_script() {
 | 
			
		||||
    systemctl stop umami
 | 
			
		||||
    msg_ok "Stopped $APP"
 | 
			
		||||
 | 
			
		||||
    fetch_and_deploy_gh_release "umami" "umami-software/umami" "tarball"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating ${APP}"
 | 
			
		||||
    cd /opt/umami
 | 
			
		||||
    git pull
 | 
			
		||||
    yarn install
 | 
			
		||||
    yarn build
 | 
			
		||||
    $STD yarn install
 | 
			
		||||
    $STD yarn run build
 | 
			
		||||
    msg_ok "Updated ${APP}"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting ${APP}"
 | 
			
		||||
@@ -54,4 +55,4 @@ description
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
			
		||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,40 +1,40 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "Umami",
 | 
			
		||||
    "slug": "umami",
 | 
			
		||||
    "categories": [
 | 
			
		||||
        9
 | 
			
		||||
    ],
 | 
			
		||||
    "date_created": "2024-05-09",
 | 
			
		||||
    "type": "ct",
 | 
			
		||||
    "updateable": false,
 | 
			
		||||
    "privileged": false,
 | 
			
		||||
    "interface_port": 3000,
 | 
			
		||||
    "documentation": null,
 | 
			
		||||
    "website": "https://umami.is/",
 | 
			
		||||
    "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/umami.webp",
 | 
			
		||||
    "config_path": "/opt/umami/.env",
 | 
			
		||||
    "description": "Umami makes it easy to collect, analyze, and understand your web data while maintaining visitor privacy and data ownership.",
 | 
			
		||||
    "install_methods": [
 | 
			
		||||
        {
 | 
			
		||||
            "type": "default",
 | 
			
		||||
            "script": "ct/umami.sh",
 | 
			
		||||
            "resources": {
 | 
			
		||||
                "cpu": 2,
 | 
			
		||||
                "ram": 2048,
 | 
			
		||||
                "hdd": 12,
 | 
			
		||||
                "os": "debian",
 | 
			
		||||
                "version": "12"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "default_credentials": {
 | 
			
		||||
        "username": "admin",
 | 
			
		||||
        "password": "umami"
 | 
			
		||||
    },
 | 
			
		||||
    "notes": [
 | 
			
		||||
        {
 | 
			
		||||
            "text": "To view the database credentials : `cat umami.creds`",
 | 
			
		||||
            "type": "info"
 | 
			
		||||
        }
 | 
			
		||||
    ]
 | 
			
		||||
  "name": "Umami",
 | 
			
		||||
  "slug": "umami",
 | 
			
		||||
  "categories": [
 | 
			
		||||
    9
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2024-05-09",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": 3000,
 | 
			
		||||
  "documentation": "https://umami.is/docs",
 | 
			
		||||
  "website": "https://umami.is/",
 | 
			
		||||
  "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/umami.webp",
 | 
			
		||||
  "config_path": "/opt/umami/.env",
 | 
			
		||||
  "description": "Umami makes it easy to collect, analyze, and understand your web data while maintaining visitor privacy and data ownership.",
 | 
			
		||||
  "install_methods": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "default",
 | 
			
		||||
      "script": "ct/umami.sh",
 | 
			
		||||
      "resources": {
 | 
			
		||||
        "cpu": 2,
 | 
			
		||||
        "ram": 2048,
 | 
			
		||||
        "hdd": 12,
 | 
			
		||||
        "os": "debian",
 | 
			
		||||
        "version": "12"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "default_credentials": {
 | 
			
		||||
    "username": "admin",
 | 
			
		||||
    "password": "umami"
 | 
			
		||||
  },
 | 
			
		||||
  "notes": [
 | 
			
		||||
    {
 | 
			
		||||
      "text": "To view the database credentials : `cat umami.creds`",
 | 
			
		||||
      "type": "info"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -13,12 +13,9 @@ setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y git
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
 | 
			
		||||
PG_VERSION="16" setup_postgresql
 | 
			
		||||
fetch_and_deploy_gh_release "umami" "umami-software/umami" "tarball"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up postgresql"
 | 
			
		||||
DB_NAME=umamidb
 | 
			
		||||
@@ -39,17 +36,16 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
 | 
			
		||||
} >>~/umami.creds
 | 
			
		||||
msg_ok "Set up postgresql"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Umami (Patience)"
 | 
			
		||||
git clone -q https://github.com/umami-software/umami.git /opt/umami
 | 
			
		||||
msg_info "Configuring Umami"
 | 
			
		||||
cd /opt/umami
 | 
			
		||||
$STD yarn install
 | 
			
		||||
echo -e "DATABASE_URL=postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME" >>/opt/umami/.env
 | 
			
		||||
$STD yarn run build
 | 
			
		||||
msg_ok "Installed Umami"
 | 
			
		||||
msg_ok "Configured Umami"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/umami.service
 | 
			
		||||
echo "[Unit]
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=umami
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user