【好玩的Docker项目】搭建一个小而美的网站流量监控——Umami

又抄咕咕的文章了,哈哈哈

https://blog.laoda.de/archives/umami

1.首先从github上克隆项目

git clone https://github.com/umami-software/umami.git
cd umami/
vim docker-compose.yml
---
version: '3'
services:
  umami:
    image: ghcr.io/umami-software/umami:postgresql-latest
    ports:
      - "3000:3000"
    environment:
      DATABASE_URL: postgresql://umami:umami@db:5432/umami # 这里的数据库和密码要和下方你修改的相同
      DATABASE_TYPE: postgresql
      HASH_SALT: replace-me-with-a-random-string
    depends_on:
      - db
    restart: always
  db:
    image: postgres:12-alpine
    environment:
      POSTGRES_DB: umami
      POSTGRES_USER: umami # 数据库用户
      POSTGRES_PASSWORD: umami  # 数据库密码
    volumes:
      - ./sql/schema.postgresql.sql:/docker-entrypoint-initdb.d/schema.postgresql.sql:ro
      - ./umami-db-data:/var/lib/postgresql/data
    restart: always
docker-compose up -d
访问http://ip:3000就可以访问了,打开的是英文界面,右上方可以切换语言,默认用户名为admin,密码为umami

迁移到另外一台服务器(2024年2月21日)

将安装目录的所有文件打包发送(打包发送速度会快很多,可以使用xftp两台服务器对拷)到新服务器,主要是上文docker-compose.yaml中的挂载的目录。

tar 压缩和解压命令

1.tar 命令压缩
tar -cvf test.tar 1.txt 2.txt 3.txt
将1.txt 2.txt 3.txt 压缩到test.tar文件内
2.tar 解压
tar -xvf test.tar
解压test.tar,将文件解压至当前目录
tar -xvf test.tar -C /home/itheima
解压test.tar,将文件解压至指定目录(/home/itheima)

docker 容器打包成镜像及在新服务器导入方法:

完成上述步骤后更改ymal文件中的镜像名为导入的镜像名然后就可以构建了。

评论

  1. TheSafeInternetSearch
    1 月前
    2025-2-22 2:07:58

    s3XaBdm3w9V

  2. TheSafeInternetSearch
    1 月前
    2025-2-22 2:02:11

    iiIBIgzYiY4

  3. TheSafeInternetSearch
    1 月前
    2025-2-22 1:56:28

    y2OnqDHuICS

  4. TheSafeInternetSearch
    1 月前
    2025-2-22 1:50:51

    a32VoY4ia90

  5. TheSafeInternetSearch
    1 月前
    2025-2-22 1:45:11

    Z0Jtx1JDGJt

  6. TheSafeInternetSearch
    1 月前
    2025-2-22 1:39:31

    AoEf5lklTsK

  7. TheSafeInternetSearch
    1 月前
    2025-2-22 1:33:51

    9zB4BPLxHKq

  8. TheSafeInternetSearch
    1 月前
    2025-2-22 1:28:09

    133Dlj3Vpow

  9. TheSafeInternetSearch
    1 月前
    2025-2-22 1:22:31

    QaDaUpJRosE

  10. TheSafeInternetSearch
    1 月前
    2025-2-22 1:16:48

    vhAamdaGB9t

  11. TheSafeInternetSearch
    1 月前
    2025-2-22 1:11:04

    GKzzrWatxik

  12. TheSafeInternetSearch
    1 月前
    2025-2-22 0:59:38

    2WPlmrWaB5z

  13. TheSafeInternetSearch
    1 月前
    2025-2-22 0:53:56

    CN0LqVMDzTz

  14. TheSafeInternetSearch
    1 月前
    2025-2-22 0:48:19

    YFHCWp0icqr

  15. TheSafeInternetSearch
    1 月前
    2025-2-22 0:42:40

    mlt7PgsBoaM

  16. TheSafeInternetSearch
    1 月前
    2025-2-22 0:36:59

    4tqZtmwDXji

  17. TheSafeInternetSearch
    1 月前
    2025-2-22 0:31:18

    NTCAIZCIDwe

  18. TheSafeInternetSearch
    1 月前
    2025-2-22 0:25:32

    ctsuL1HaTKJ

  19. 1 月前
    2025-2-22 0:19:54

    an7HrRS8a8Q

  20. TheSafeInternetSearch
    1 月前
    2025-2-22 0:14:08

    hMKkNY28ZsX

  21. TheSafeInternetSearch
    1 月前
    2025-2-22 0:08:25

    9VMD6xcv15T

  22. TheSafeInternetSearch
    1 月前
    2025-2-22 0:02:45

    8sVBjYHwOjl

  23. TheSafeInternetSearch
    1 月前
    2025-2-21 23:57:01

    Hs5ZmUcaJLf

  24. TheSafeInternetSearch
    1 月前
    2025-2-21 23:51:22

    Ih34TdKE12z

  25. TheSafeInternetSearch
    1 月前
    2025-2-21 23:45:41

    t9XBOsbF7tU

  26. TheSafeInternetSearch
    1 月前
    2025-2-21 23:39:59

    c970BZYM3pf

  27. 1 月前
    2025-2-21 23:34:18

    qXk9Pqo2AgR

  28. TheSafeInternetSearch
    1 月前
    2025-2-21 23:28:30

    WBZVn7qwIXM

  29. TheSafeInternetSearch
    1 月前
    2025-2-21 23:22:49

    50hYbZcEgey

  30. TheSafeInternetSearch
    1 月前
    2025-2-21 23:17:05

    qMRagG4gsCH

  31. TheSafeInternetSearch
    1 月前
    2025-2-21 23:11:24

    GYnloLgEOOI

  32. TheSafeInternetSearch
    1 月前
    2025-2-21 23:05:39

    zqTc632ogqw

  33. TheSafeInternetSearch
    1 月前
    2025-2-21 22:53:23

    u7HC1pgXrx9

  34. TheSafeInternetSearch
    1 月前
    2025-2-20 20:59:24

    i2gazw8pRh7

  35. 匿名
    Windows Chrome 104.0.0.0
    2 年前
    2023-9-11 1:08:16

    不错

发送评论 编辑评论


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇