Compare commits

...

2 Commits

Author SHA1 Message Date
Niko Abeler c6ab7227d8 use full url as guid 2022-08-16 21:06:32 +02:00
Niko Abeler 807f909937 Release as docker image 2022-08-16 21:06:13 +02:00
3 changed files with 30 additions and 1 deletions

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
FROM golang:1.19-alpine as build
RUN apk add --no-cache git
WORKDIR /tmp/owl
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN go build -o ./out/owl-web ./cmd/owl-web
RUN go build -o ./out/owl-cli ./cmd/owl-cli
FROM alpine:3.9
RUN apk add ca-certificates
COPY --from=build /tmp/owl/out/ /bin/
# This container exposes port 8080 to the outside world
EXPOSE 8080
# Run the binary program produced by `go install`
CMD ["/bin/owl-web"]

2
release.sh Executable file
View File

@ -0,0 +1,2 @@
docker build . -t git.libove.org/h4kor/owl-blogs
docker push git.libove.org/h4kor/owl-blogs

2
rss.go
View File

@ -44,7 +44,7 @@ func RenderRSSFeed(user User) (string, error) {
post, _ := user.GetPost(postId)
_, meta := post.MarkdownData()
rss.Channel.Items = append(rss.Channel.Items, RSSItem{
Guid: postId,
Guid: post.FullUrl(),
Title: post.Title(),
Link: post.FullUrl(),
PubDate: meta.Date,