File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,20 @@ FROM ubuntu:latest
3
3
4
4
LABEL MAINTAINER https://github.com/Nriver/trilium-translation
5
5
6
+ # 添加curl jq命令给health check使用
7
+ # 合并RUN减少镜像层数
8
+ # 减少镜像大小 purge清理包列表
9
+ RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list \
10
+ && apt-get clean \
11
+ && apt-get update \
12
+ && apt-get install -y curl jq \
13
+ && apt-get purge -y --auto-remove \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
6
16
ADD trilium-linux-x64-server /app/
7
17
WORKDIR /app
8
18
9
19
EXPOSE 8080
10
20
11
- CMD ["./trilium.sh" ]
21
+ CMD ["./trilium.sh" ]
22
+
Original file line number Diff line number Diff line change @@ -11,3 +11,9 @@ services:
11
11
environment :
12
12
# 环境变量表示容器内笔记数据的存储路径
13
13
- TRILIUM_DATA_DIR=/root/trilium-data
14
+ # 可选功能: 健康检查。需要启用的话,把下面的注释去掉
15
+ # healthcheck:
16
+ # test: ["CMD-SHELL", "curl --fail http://localhost:8080/api/health-check | jq -e '.status == "ok"' || exit 1"]
17
+ # interval: 30s
18
+ # timeout: 10s
19
+ # retries: 3
You can’t perform that action at this time.
0 commit comments