From ca91db3c6f7e6a34e93e484a7422975c1108c888 Mon Sep 17 00:00:00 2001 From: nite07 Date: Mon, 21 Oct 2024 15:39:49 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20Remvoe=20default=20templates=20i?= =?UTF-8?q?n=20docker=20image\n=F0=9F=90=9B=20Fix=20version=20command=20er?= =?UTF-8?q?ror?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 ++----- api/static/index.html | 5 +++-- entrypoint.sh | 9 --------- templates/linux/log.json | 2 +- templates/windows/log.json | 2 +- 5 files changed, 7 insertions(+), 18 deletions(-) delete mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 40a685e..42d9b12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,14 +5,11 @@ WORKDIR /app COPY . . RUN go mod download ARG version -RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X sub2sing-box/constant.Version=${version}" -o sub2sing-box . +RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X github.com/nitezs/sub2sing-box/constant.Version=${version}" -o sub2sing-box . WORKDIR /app FROM alpine:latest COPY --from=builder /app/sub2sing-box /app/sub2sing-box -COPY --from=builder /app/templates /app/templates-origin -COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh -RUN chmod +x /app/entrypoint.sh VOLUME [ "/app/templates" ] EXPOSE 8080 -ENTRYPOINT ["/app/entrypoint.sh"] +CMD ["/app/sub2sing-box", "server"] diff --git a/api/static/index.html b/api/static/index.html index 7e1e04d..d996e15 100644 --- a/api/static/index.html +++ b/api/static/index.html @@ -56,8 +56,9 @@
-

模板

- +

模板

+
diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100644 index f8a85c8..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -if [ ! -d "/app/templates" ]; then - mkdir /app/templates -fi -if [ -z "$(ls -A /app/templates)" ]; then - cp -r /app/templates-origin/* /app/templates -fi -cd /app -/app/sub2sing-box server diff --git a/templates/linux/log.json b/templates/linux/log.json index 0f43ea2..4a6dacf 100644 --- a/templates/linux/log.json +++ b/templates/linux/log.json @@ -1,6 +1,6 @@ { "log": { - "level": "trace", + "level": "info", "timestamp": true } } diff --git a/templates/windows/log.json b/templates/windows/log.json index 0f43ea2..4a6dacf 100644 --- a/templates/windows/log.json +++ b/templates/windows/log.json @@ -1,6 +1,6 @@ { "log": { - "level": "trace", + "level": "info", "timestamp": true } }