云服务器能用来干啥?
记录下运行在自己云服务器中的好玩的应用,以及相应的搭建教程
云服务器厂商:UCloud
配置(24-01-20):
Docker-compose
一键运行所有容器
1
2
| sudo chmod -R 777 /var/run/docker.sock
docker-compose -f ~/dockers/docker-compose.yml up -d
|
配置文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
| services:
rsshub:
image: diygod/rsshub
ports:
- "1200:1200"
restart: unless-stopped
portainer:
image: portainer/portainer:latest
container_name: portainer
ports:
- "8000:8000"
- "9000:9000" # http port
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/dockers/data/portainer:/data
freshrss:
image: freshrss/freshrss
container_name: freshrss
restart: unless-stopped
ports:
- "1645:80"
environment:
- TZ=Asia/Shanghai
- CRON_MIN=1,31
volumes:
- ~/dockers/data/freshrss_data:/var/www/FreshRSS/data
- ~/dockers/data/freshrss_extensions:/var/www/FreshRSS/extensions
memos:
image: neosmemo/memos:latest
container_name: memos
restart: unless-stopped
ports:
- "5230:5230"
volumes:
- ~/dockers/data/memos/:/var/opt/memos
splayer:
image: imsyy/splayer:latest
container_name: SPlayer
restart: unless-stopped
ports:
- "7899:7899"
siyuan:
image: b3log/siyuan:latest
container_name: siyuan
restart: unless-stopped
volumes:
- ~/dockers/data/siyuan/workspace:/siyuan/workspace
user: "1000:1000"
ports:
- "6806:6806"
|
所有 volume 都放在 ~/dockers/data
中
UCloud 内存监控代理
详见 https://docs.ucloud.cn/umon/agent
安装
1
2
3
| cd ~/download
wget http://umon.api.service.ucloud.cn/static/umatest/uma-py3_1.2.4-1_amd64.deb
dpkg -i uma-py3_1.2.4-1_amd64.deb
|
操作
1
2
3
| service uma start # 启动
service uma stop # 停止
dpkg -P uma-py3 # 卸载
|
nginx
用 1
命令获取 docker ip
ward
简单好看的性能监控工具
https://github.com/Rudolf-Barbu/Ward
Portainer
一款 docker 可视化界面
1
2
| docker volume create portainer_data
docker run -d -p 8000:8000 -p 9000:9000 --name portainer --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v ~/dockers/data/portainer:/data portainer/portainer:latest
|
不用 portainer/portainer-ce:latest,因为它加载起来很慢,不知道为啥
自建的 RSS 嗅探工具,获取 RSS 内容更加稳定,配合 FreshRSS 使用
1
2
| docker pull diygod/rsshub
docker run -d --name rsshub -p 1200:1200 diygod/rsshub
|
RSS 聚合应用
1
2
3
4
5
6
7
8
| docker run -d --restart unless-stopped --log-opt max-size=10m \
-p 1645:80 \
-e TZ=Asia/Shanghai \
-e 'CRON_MIN=1,31' \
-v ~/dockers/data/freshrss_data:/var/www/FreshRSS/data \
-v ~/dockers/data/freshrss_extensions:/var/www/FreshRSS/extensions \
--name freshrss \
freshrss/freshrss
|
ChatGPT 客户端
chatgpt-next-web
1
| docker run -d -p 4399:3000 -e OPENAI_API_KEY="XXX" -e CODE="" yidadaa/chatgpt-next-web
|
memos
flomo 的自建平替
1
| docker run -d --name memos -p 5230:5230 -v ~/dockers/data/memos/:/var/opt/memos neosmemo/memos:latest
|
SPlayer
https://github.com/imsyy/SPlayer?tab=readme-ov-file
一款第三方播放器
1
| docker pull imsyy/splayer:latest
|
1
| docker run -d --name SPlayer -p 7899:7899 imsyy/splayer:latest
|
思源笔记
1
2
3
4
5
6
7
| docker run -d \
--name siyuan \
-v ~/dockers/data/siyuan/workspace:/siyuan/workspace \
-u 1000:1000 \
-p 6806:6806 \
--restart=always \
b3log/siyuan:latest
|
Wallabag
稍后阅读工具
在 docker 启动后,输入命令:
1
2
3
4
| docker exec -t <NAME_OR_ID_OF_YOUR_WALLABAG_CONTAINER> /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction
docker exec -it -w /var/www/wallabag wallabag bin/console -e prod doctrine:migrations:sync-metadata-storage
docker exec -it -w /var/www/wallabag wallabag bin/console -e prod doctrine:migrations:migrate
|