Pārlūkot izejas kodu

0385: Roll Your Own Google Analytics Alternative with Umami in Docker

i12bretro 1 gadu atpakaļ
vecāks
revīzija
2a08a08fdf
1 mainītis faili ar 78 papildinājumiem un 0 dzēšanām
  1. 78 0
      0385.html

+ 78 - 0
0385.html

@@ -0,0 +1,78 @@
+    <!DOCTYPE html>
+    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>Roll Your Own Google Analytics Alternative with Umami in Docker</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <meta charset="UTF-8">
+        <meta name="keywords" content="Home Lab Ideas,Linux,MariaDB,MySQL,NodeJS,Open Source,Self-Hosted,Browser Based,Home Lab,Install Guide,Web Based,Web Based Tools,Alternative To Google Analytics,Analytics,FOSS,Google Analytics,Google Analytics Alternative,Self-hosted Web Analytics,Ubuntu,Umami,Umami Analytics,Web Analytics,Web Traffic,Website Statistics,How To,Tutorial,i12bretro">
+        <meta name="author" content="i12bretro">
+        <meta name="description" content="Roll Your Own Google Analytics Alternative with Umami in Docker">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="revised" content="03/08/2024 06:19:07 PM" />
+				          <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
+				  <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
+				        <script type="text/javascript" src="includes/js/steps.js"></script>
+        <link href="css/steps.css" rel="stylesheet" type="text/css" />
+      </head>
+      <body>
+        <div id="gridContainer">
+          <div class="topMargin"></div>
+          <div id="listName" class="topMargin">
+            <h1>Roll Your Own Google Analytics Alternative with Umami in Docker</h1>
+          </div>
+          <div></div>
+          <div id="content">
+          <h2>What is Umami?</h2>
+
+<blockquote><em>Umami is a simple, fast, privacy-focused alternative to Google Analytics. -<a href="https://github.com/umami-software/umami" target="_blank">https://github.com/umami-software/umami</a></em></blockquote>
+
+<h2>Installing Docker</h2>
+
+<ol>
+	<li>Log into the Linux based device</li>
+	<li>Run the following commands in the terminal
+	<div class="codeBlock"># install prerequisites<br />
+	sudo apt install apt-transport-https ca-certificates openssl curl software-properties-common gnupg-agent -y<br />
+	# add docker gpg key<br />
+	curl -fsSL https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release)/gpg | sudo apt-key add -<br />
+	# add docker software repository<br />
+	sudo add-apt-repository &quot;deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release) $(lsb_release -cs) stable&quot;<br />
+	# install docker<br />
+	sudo apt install docker-ce docker-compose containerd.io -y<br />
+	# enable and start docker service<br />
+	sudo systemctl enable docker &amp;&amp; sudo systemctl start docker<br />
+	# add the current user to the docker group<br />
+	sudo usermod -aG docker $USER<br />
+	# reauthenticate for the new group membership to take effect<br />
+	su - $USER</div>
+	</li>
+</ol>
+
+<h2>Running Umami</h2>
+
+<ol>
+	<li>Now that Docker is installed, run the following commands to setup the Umami Docker container and run it
+	<div class="codeBlock"># create working directories<br />
+	mkdir ~/docker/mariadb -p<br />
+	# set owner of working directories<br />
+	sudo chown &quot;$USER&quot;:&quot;$USER&quot; ~/docker -R<br />
+	# create containers network<br />
+	docker network create containers<br />
+	# generate a random string<br />
+	RANDOMSTRING=$(openssl rand -base64 30)<br />
+	# run the mariadb docker container<br />
+	docker run -d --name mariadb --network containers -e MYSQL_ROOT_PASSWORD=r00tp@ss -e MYSQL_USER=umami_rw -e MYSQL_PASSWORD=Um4m1 -e MYSQL_DATABASE=umami -v ~/docker/mariadb:/var/lib/mysql --restart=unless-stopped mariadb:latest<br />
+	# run the umami docker container<br />
+	docker run -d --name umami --network containers -p 8030:3000 -e DATABASE_URL=mysql://umami_rw:Um4m1@mariadb:3306/umami -e DATABASE_TYPE=mysql -e APP_SECRET=$RANDOMSTRING --restart=unless-stopped umamisoftware/umami:mysql-latest</div>
+	</li>
+	<li>Open a web browser and navigate to http://DNSorIP:8030</li>
+	<li>Login with the username admin and password umami</li>
+	<li>Navigate to Settings &gt; Profile and click the Change Password button</li>
+	<li>Enter the current password (umami) and enter and confirm the new password &gt; Click save</li>
+</ol>
+
+<p>Documentation: <a href="https://umami.is/docs" target="_blank">https://umami.is/docs</a></p>          </div>
+        </div>
+      </body>
+    </html>
+