From d1c8716c3e1eebde7e028ff675120854320a714a Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Wed, 10 Nov 2021 16:14:34 -0400 Subject: index is visible --- Dockerfile | 10 +++++++--- README.md | 3 ++- main.go | 2 +- views/partials/posts.html | 10 +++++----- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 050cd0b..ae8930e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,16 @@ FROM golang:1.16-alpine AS builder WORKDIR /build COPY . . -RUN go build . +RUN apk --no-cache add make git + +# Use the 'build' make target when fiber branch is stable +RUN make debug FROM alpine:3.14 RUN apk --no-cache add imagemagick exiv2 ttf-opensans WORKDIR /app -COPY --from=builder /build/Server /app +COPY --from=builder /build/fchan /app COPY static/ /app/static/ +COPY views/ /app/views/ COPY databaseschema.psql /app -CMD ["/app/Server"] +CMD ["/app/fchan"] diff --git a/README.md b/README.md index 23d02fc..c573a30 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ This currently helps enforce the Go style guide, but may be expanded upon in the future. Before you make a pull request, ensure everything you changed works as expected, -and to fix errors reported by `go vet`. +and to fix errors reported by `go vet` and make your code better with +`staticcheck`. ## Server Installation and Configuration diff --git a/main.go b/main.go index 5025832..02beaf4 100644 --- a/main.go +++ b/main.go @@ -77,7 +77,7 @@ func main() { //name, prefname, summary, auth requirements, restricted if config.InstanceName != "" { if _, err = db.CreateNewBoardDB(*CreateNewActor("", config.InstanceName, config.InstanceSummary, authReq, false)); err != nil { - panic(err) + //panic(err) } if config.PublicIndexing == "true" { diff --git a/views/partials/posts.html b/views/partials/posts.html index f82d2d5..a248650 100644 --- a/views/partials/posts.html +++ b/views/partials/posts.html @@ -7,7 +7,7 @@
{{ parseContent $board.Actor $opId .Content $thread }}
{{ if .Replies }} {{ $replies := .Replies }} {{ if gt $replies.TotalItems 5 }} {{ if gt $len 1 }} - {{ $replies.TotalItems }} replies{{ if gt $replies.TotalImgs 0}} and {{ $replies.TotalImgs }} images{{ end }}, Click here to view all. + {{ $replies.TotalItems }} replies{{ if gt $replies.TotalImgs 0}} and {{ $replies.TotalImgs }} images{{ end }}, Click here to view all. {{ end }} {{ end }} {{ range $replies.OrderedItems }} -