From 59c55b96beeb4154575ddbf26b064d218544dda2 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Sat, 18 May 2024 18:02:12 +0300 Subject: [PATCH 1/6] Specify the correct method in the Monitor widget documentation After 189b8895b03ec2ee407c8d951c07230bae3a9a07 we use `GET` instead of `HEAD` Signed-off-by: Yarden Shoham --- docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index e698fdd..7c04d04 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -697,7 +697,7 @@ Greenville, United States ``` ### Monitor -Display a list of sites and whether they are reachable (online) or not. This is determined by sending a HEAD request to the specified URL, if the response is 200 then the site is OK. The time it took to receive a response is also shown in milliseconds. +Display a list of sites and whether they are reachable (online) or not. This is determined by sending a GET request to the specified URL, if the response is 200 then the site is OK. The time it took to receive a response is also shown in milliseconds. Example: From 926de71274c815f8fc726f18a1a021c51328f7d9 Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Sat, 18 May 2024 19:49:15 +0100 Subject: [PATCH 2/6] Add PR template --- .github/PULL_REQUEST_TEMPLATE.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..22b3d05 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ + From 53a661861a56dad1fbd7e13c0d59c16d1af64271 Mon Sep 17 00:00:00 2001 From: Wyatt Gill Date: Sat, 18 May 2024 17:41:21 -0500 Subject: [PATCH 3/6] Build app in Dockerfile This change makes it simpler and more convenient to build the app. --- Dockerfile.single-platform | 9 ++++++++- README.md | 6 ------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile.single-platform b/Dockerfile.single-platform index 1930f99..5309059 100644 --- a/Dockerfile.single-platform +++ b/Dockerfile.single-platform @@ -1,7 +1,14 @@ +FROM golang:1.22.3-alpine3.19 AS builder + +WORKDIR /app +COPY . /app +RUN CGO_ENABLED=0 go build . + + FROM alpine:3.19 WORKDIR /app -COPY build/glance /app/glance +COPY --from=builder /app/glance . EXPOSE 8080/tcp ENTRYPOINT ["/app/glance"] diff --git a/README.md b/README.md index 715c8e5..11ffb42 100644 --- a/README.md +++ b/README.md @@ -92,12 +92,6 @@ go run . ### Building Docker image -Build Glance with CGO disabled: - -```bash -CGO_ENABLED=0 go build -o build/glance . -``` - Build the image: **Make sure to replace "owner" with your name or organization.** From e3ad646baee618e9b45624ce05b81939d863ac8b Mon Sep 17 00:00:00 2001 From: Wyatt Gill Date: Sat, 18 May 2024 17:42:02 -0500 Subject: [PATCH 4/6] Add .dockerignore to keep build context small --- .dockerignore | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..03da0ed --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +# https://docs.docker.com/build/building/context/#dockerignore-files +# Ignore all files by default +* + +# Only add necessary files to the Docker build context (Dockerfiles are always included implicitly) +!/internal/ +!/go.mod +!/go.sum +!main.go From 6de0f73ec1c8c02e97393714749d75d8823cb776 Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Sun, 19 May 2024 21:33:51 +0100 Subject: [PATCH 5/6] Fix build breaking because of missing build dir --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index 03da0ed..8708dce 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,6 +3,7 @@ * # Only add necessary files to the Docker build context (Dockerfiles are always included implicitly) +!/build/ !/internal/ !/go.mod !/go.sum From c270afb5e580b05709cb1c7299bbc46400bcec80 Mon Sep 17 00:00:00 2001 From: NoxesP <87928637+NoxesP@users.noreply.github.com> Date: Mon, 20 May 2024 04:47:57 +0300 Subject: [PATCH 6/6] docs: update configuration.md Won't admit how long it took for me to notice this in my glance.yml file after wondering why it wasn't working ahahah. Small fix :) --- docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 7c04d04..18e23b2 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -626,7 +626,7 @@ https://your.proxy/?url={REQUEST-URL} ##### `sort-by` Can be used to specify the order in which the posts should get returned. Possible values are `hot`, `new`, `top` and `rising`. -##### `top-perid` +##### `top-period` Available only when `sort-by` is set to `top`. Possible values are `hour`, `day`, `week`, `month`, `year` and `all`. ##### `search`