Skip to content

Commit 8a5cae6

Browse files
authored
Merge branch 'dev' into proper-checkins
2 parents e84c8a0 + ad39c65 commit 8a5cae6

44 files changed

Lines changed: 929 additions & 1704 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/2_unstable.yml

Lines changed: 0 additions & 501 deletions
This file was deleted.

.github/workflows/3_stable.yml

Lines changed: 0 additions & 557 deletions
This file was deleted.
Lines changed: 177 additions & 106 deletions
Large diffs are not rendered by default.

.github/workflows/pr.yml

Lines changed: 0 additions & 173 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
2+
.vscode
23
snap
34
prime
45
stage

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "source/statping-ng.wiki"]
2+
path = source/statping-ng.wiki
3+
# TODO should this be a relative path? (would require wiki fork for statping forks)
4+
url = https://github.com/statping-ng/statping-ng.wiki.git

Dockerfile

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ RUN yarn build && yarn cache clean
1010

1111
# Statping Golang BACKEND building from source
1212
# Creates "/go/bin/statping" and "/usr/local/bin/sass" for copying
13-
FROM golang:1.17-alpine AS backend
13+
FROM golang:1.20.0-alpine AS backend
1414
LABEL maintainer="Statping-NG (https://github.com/statping-ng)"
1515
ARG VERSION
1616
ARG COMMIT
1717
ARG BUILDPLATFORM
1818
ARG TARGETARCH
19-
RUN apk add --update --no-cache libstdc++ gcc g++ make git autoconf \
19+
RUN apk add --no-cache libstdc++ gcc g++ make git autoconf \
2020
libtool ca-certificates linux-headers wget curl jq && \
2121
update-ca-certificates
2222

2323
WORKDIR /root
24-
RUN git clone https://github.com/sass/sassc.git
24+
RUN git clone --depth 1 --branch 3.6.2 https://github.com/sass/sassc.git
2525
RUN . sassc/script/bootstrap && make -C sassc -j4
2626
# sassc binary: /root/sassc/bin/sassc
2727

@@ -30,15 +30,17 @@ ADD go.mod go.sum ./
3030
RUN go mod download
3131
ENV GO111MODULE on
3232
ENV CGO_ENABLED 1
33-
RUN go get github.com/stretchr/testify/assert && \
34-
go get github.com/stretchr/testify/require && \
35-
go get github.com/GeertJohan/go.rice/rice && \
36-
go get github.com/cortesi/modd/cmd/modd && \
37-
go get github.com/crazy-max/xgo
38-
COPY . .
33+
COPY cmd ./cmd
34+
COPY database ./database
35+
COPY handlers ./handlers
36+
COPY notifiers ./notifiers
37+
COPY source ./source
38+
COPY types ./types
39+
COPY utils ./utils
3940
COPY --from=frontend /statping/dist/ ./source/dist/
40-
RUN make clean generate embed
41-
RUN go build -a -ldflags "-s -w -extldflags -static -X main.VERSION=${VERSION} -X main.COMMIT=${COMMIT}" -o statping --tags "netgo linux" ./cmd
41+
RUN go install github.com/GeertJohan/go.rice/rice@latest
42+
RUN cd source && rice embed-go
43+
RUN go build -a -ldflags "-s -w -extldflags -static -X main.VERSION=$VERSION -X main.COMMIT=$COMMIT" -o statping --tags "netgo linux" ./cmd
4244
RUN chmod a+x statping && mv statping /go/bin/statping
4345
# /go/bin/statping - statping binary
4446
# /root/sassc/bin/sassc - sass binary
@@ -64,6 +66,6 @@ ENV BASE_PATH=""
6466

6567
EXPOSE $PORT
6668

67-
HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD if [ -z "$BASE_PATH" ]; then HEALTHPATH="/health"; else HEALTHPATH="/$BASE_PATH/health" ; fi && curl -s "http://localhost:80$HEALTHPATH" | jq -r -e ".online==true"
69+
HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD if [ -z "$BASE_PATH" ]; then HEALTHPATH="/health"; else HEALTHPATH="/$BASE_PATH/health" ; fi && curl -s "http://localhost:${PORT}$HEALTHPATH" | jq -r -e ".online==true"
6870

6971
CMD statping --port $PORT

Dockerfile.base

Lines changed: 0 additions & 45 deletions
This file was deleted.

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ up:
4040
docker compose -f docker-compose.yml -f dev/docker-compose.full.yml up -d --remove-orphans
4141
make print_details
4242

43+
local: clean frontend-build build
44+
export STATPING_DIR=./docker/statping/sqlite && ./statping --port 8080
45+
4346
down:
4447
docker compose -f docker-compose.yml -f dev/docker-compose.full.yml down --volumes --remove-orphans
4548

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Statping-ng aims to be an updated drop-in replacement of statping after developm
2424
<a href="https://github.com/statping-ng/statping-ng/blob/stable/LICENSE"><img alt="License" src="https://img.shields.io/github/license/statping-ng/statping-ng?color=success&style=for-the-badge&logo" /></a>
2525
</p><p align="center" style="text-align:center">
2626
<img alt="Last Commit" src="https://img.shields.io/github/last-commit/statping-ng/statping-ng?style=for-the-badge&logo=github" />
27-
<img alt="Dev Build Status" src="https://img.shields.io/github/workflow/status/statping-ng/statping-ng/1.%20Development%20Build%20and%20Testing?label=Dev&style=for-the-badge&logo=github" />
28-
<img alt="Unstable Build Status" src="https://img.shields.io/github/workflow/status/statping-ng/statping-ng/2.%20Unstable%20Build,%20Test%20and%20Deploy?label=Unstable&style=for-the-badge&logo=github" />
29-
<img alt="Stable Build Status" src="https://img.shields.io/github/workflow/status/statping-ng/statping-ng/3.%20Stable%20Build,%20Test%20and%20Deploy?label=Stable&style=for-the-badge&logo=github" />
27+
<img alt="Dev Build Status" src="https://img.shields.io/github/actions/workflow/status/statping-ng/statping-ng/build.yml?branch=dev&label=Dev&style=for-the-badge&logo=github" />
28+
<img alt="Unstable Build Status" src="https://img.shields.io/github/actions/workflow/status/statping-ng/statping-ng/build.yml?branch=unstable&label=Unstable&style=for-the-badge&logo=github" />
29+
<img alt="Stable Build Status" src="https://img.shields.io/github/actions/workflow/status/statping-ng/statping-ng/build.yml?branch=stable&label=Stable&style=for-the-badge&logo=github" />
3030
</p><p align="center" style="text-align:center">
3131
<a href="https://hub.docker.com/r/adamboutcher/statping-ng"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/adamboutcher/statping-ng?style=for-the-badge&logo=docker&logoColor=white" /></a>
3232
<a href="https://hub.docker.com/r/adamboutcher/statping-ng"><img alt="Docker Image Size" src="https://img.shields.io/docker/image-size/adamboutcher/statping-ng/latest?style=for-the-badge&logo=docker&logoColor=white" /></a>

0 commit comments

Comments
 (0)