Merge upstream commit

This commit is contained in:
Akkia 2022-05-17 22:15:27 +08:00
commit 5d356a30e2
No known key found for this signature in database
GPG Key ID: DABE9A4AB2DD7EF3
6 changed files with 15 additions and 10 deletions

View File

@ -7,15 +7,17 @@ RUN cd cmd/dashboard && go build -o app -ldflags="-s -w"
FROM alpine:latest FROM alpine:latest
ENV TZ="Asia/Shanghai" ENV TZ="Asia/Shanghai"
COPY ./script/entrypoint.sh /entrypoint.sh
RUN apk --no-cache --no-progress add \ RUN apk --no-cache --no-progress add \
ca-certificates \ ca-certificates \
tzdata && \ tzdata && \
cp "/usr/share/zoneinfo/$TZ" /etc/localtime && \ cp "/usr/share/zoneinfo/$TZ" /etc/localtime && \
echo "$TZ" > /etc/timezone echo "$TZ" > /etc/timezone && \
chmod +x /entrypoint.sh
WORKDIR /dashboard WORKDIR /dashboard
COPY ./resource ./resource COPY ./resource ./resource
COPY --from=binarybuilder /dashboard/cmd/dashboard/app ./app COPY --from=binarybuilder /dashboard/cmd/dashboard/app ./app
VOLUME ["/dashboard/data"] VOLUME ["/dashboard/data"]
EXPOSE 80 5555 EXPOSE 80 5555
CMD ["/dashboard/app"] ENTRYPOINT ["/entrypoint.sh"]

View File

@ -4,7 +4,7 @@
<br> <br>
<small><i>LOGO designed by <a href="https://xio.ng" target="_blank">熊大</a> .</i></small> <small><i>LOGO designed by <a href="https://xio.ng" target="_blank">熊大</a> .</i></small>
<br><br> <br><br>
<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.13.13&logo=github&style=for-the-badge">&nbsp;<img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github">&nbsp;<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge">&nbsp;<img src="https://img.shields.io/badge/Installer-v0.10.2-brightgreen?style=for-the-badge&logo=linux"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.13.14&logo=github&style=for-the-badge">&nbsp;<img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github">&nbsp;<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge">&nbsp;<img src="https://img.shields.io/badge/Installer-v0.10.2-brightgreen?style=for-the-badge&logo=linux">
<br> <br>
<br> <br>
<p>:trollface: <b>Nezha Monitoring</b> self-hosted lightweight monitoring and operation and maintenance system. Supports system status, HTTP (SSL certificate change, upcoming expiration, expiration), TCP, Ping <b>monitoring</b> and <b>alerting</b>, execute scheduled tasks and <b>web terminal</b>.</p> <p>:trollface: <b>Nezha Monitoring</b> self-hosted lightweight monitoring and operation and maintenance system. Supports system status, HTTP (SSL certificate change, upcoming expiration, expiration), TCP, Ping <b>monitoring</b> and <b>alerting</b>, execute scheduled tasks and <b>web terminal</b>.</p>

3
script/entrypoint.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
echo -e "nameserver 127.0.0.11\nnameserver 8.8.8.8\nnameserver 223.5.5.5\n" > /etc/resolv.conf
/dashboard/app

View File

@ -130,10 +130,10 @@ install_base() {
install_soft() { install_soft() {
# Arch官方库不包含selinux等组件 # Arch官方库不包含selinux等组件
(command -v yum >/dev/null 2>&1 && yum install $* selinux-policy -y) || (command -v yum >/dev/null 2>&1 && yum makecache && yum install $* selinux-policy -y) ||
(command -v apt >/dev/null 2>&1 && apt install $* selinux-utils -y) || (command -v apt >/dev/null 2>&1 && apt update && apt install $* selinux-utils -y) ||
(command -v pacman >/dev/null 2>&1 && pacman -Syu $*) || (command -v pacman >/dev/null 2>&1 && pacman -Syu $*) ||
(command -v apt-get >/dev/null 2>&1 && apt-get install $* selinux-utils -y) (command -v apt-get >/dev/null 2>&1 && apt-get update && apt-get install $* selinux-utils -y)
} }
install_dashboard() { install_dashboard() {

View File

@ -100,10 +100,10 @@ install_base() {
install_soft() { install_soft() {
# The official Arch library does not contain selinux components # The official Arch library does not contain selinux components
(command -v yum >/dev/null 2>&1 && yum install $* selinux-policy -y) || (command -v yum >/dev/null 2>&1 && yum makecache && yum install $* selinux-policy -y) ||
(command -v apt >/dev/null 2>&1 && apt install $* selinux-utils -y) || (command -v apt >/dev/null 2>&1 && apt update && apt install $* selinux-utils -y) ||
(command -v pacman >/dev/null 2>&1 && pacman -Syu $*) || (command -v pacman >/dev/null 2>&1 && pacman -Syu $*) ||
(command -v apt-get >/dev/null 2>&1 && apt-get install $* selinux-utils -y) (command -v apt-get >/dev/null 2>&1 && apt-get update && apt-get install $* selinux-utils -y)
} }
install_dashboard() { install_dashboard() {

View File

@ -12,7 +12,7 @@ import (
"github.com/naiba/nezha/pkg/utils" "github.com/naiba/nezha/pkg/utils"
) )
var Version = "v0.13.13" // !!记得修改 README 中的 badge 版本!! var Version = "v0.13.14" // !!记得修改 README 中的 badge 版本!!
var ( var (
Conf *model.Config Conf *model.Config