宝塔面板docker安装Medama:开源轻量级网站统计(分析)系统

这篇文章介绍下如何用宝塔面板来docker安装Medama,这是一个开源轻量级网站统计工具,以下是具体的英文介绍:

Medama Analytics is an open-source project dedicated to providing self-hostable, cookie-free website analytics. With a lightweight tracker of less than 1KB, it aims to offer useful analytics while prioritising user privacy.

Features

  • 📊 Real-Time Analytics: Monitor website performance and user interactions instantly.
  • 🔒 Privacy-Focused: Lightweight tracker (<1KB) without cookies, IP addresses, or additional identifiers, ensuring compliance with GDPR, PECR, and other regulations.
  • 🧪 Easy To Integrate: OpenAPI-based server for effortless integration into personal or professional dashboards.
  • 💼 Self-Hostable: Simple, single-binary setup with no external dependencies, capable of running on VMs with 256MB memory for most small websites.

1、官网

官网:https://oss.medama.io/introduction

演示:https://demo.medama.io/

2、准备

1)准备空闲VPS

2)安装宝塔:宝塔服务器面板,一键全能部署及管理 https://www.bt.cn/u/d2y84I

3)安装docker、nignx,可以用宝塔面板自带的docker可视化安装也可以用命令模式安装,如下:(这里用的系统是debian11)

apt -y update
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

3、安装

1)准备目录新建compose文件:

mkdir -p /opt/medama && cd /opt/medama && nano docker-compose.yml

2)写入如下配置:

services:
  medama:
    image: ghcr.io/medama-io/medama:latest
    restart: unless-stopped
    environment:
      - LOGGER=pretty
    ports:
      - "8080:8080"
    volumes:
      - medama-data:/app/data

volumes:
  medama-data:

3)启动:(现在就可以通过后面的链接来访问 Web 界面:http://你的服务器IP:8080

docker compose up -d

 

4、设置域名访问

1)宝塔新建站点,之后设置“翻袋”,如图:

2)之后就可以通过你解析的域名来访问啦!(默认的管理员账号:admin,密码:CHANGE_ME_ON_FIRST_LOGIN

 

5、简单设置

这里简单说下设置:

1)添加站点:

2)添加跟踪代码:

<script defer src="你的域名/script.js"></script>

3)效果


【AD】六六云(666clouds):双ISP/原生IP VPS,50元/月起,可选美国原生IP/英国原生IP双ISP/日本原生IP/韩国原生IP

【AD】美国洛杉矶CN2 VPS/香港CN2 VPS/日本CN2 VPS推荐,延迟低、稳定性高、免费备份_搬瓦工vps