add mastodon
This commit is contained in:
parent
b923f6310b
commit
53135a82fe
@ -1,4 +1,11 @@
|
|||||||
|
FROM golang:1.15 as builder
|
||||||
|
COPY vapid.go /vapid.go
|
||||||
|
RUN go get -u github.com/SherClockHolmes/webpush-go
|
||||||
|
RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o /vapid /vapid.go
|
||||||
|
|
||||||
FROM alpine:3.12
|
FROM alpine:3.12
|
||||||
|
|
||||||
RUN apk add --no-cache openldap-passwd-pbkdf2 apache2-utils pwgen opendkim-utils coreutils
|
RUN apk add --no-cache openldap-passwd-pbkdf2 apache2-utils pwgen opendkim-utils coreutils
|
||||||
COPY dkim-key.sh /dkim-key.sh
|
COPY dkim-key.sh /dkim-key.sh
|
||||||
|
COPY --from=builder /vapid /vapid
|
||||||
|
RUN chmod +x /vapid
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
VERSION=latest
|
VERSION=latest
|
||||||
IMAGE=pwgen
|
IMAGE=pwgen
|
||||||
REGISTRY=registry.0xace.cc
|
REGISTRY=registry.0xace.cc/ghp
|
||||||
|
|
||||||
.PHONY: build push all
|
.PHONY: build push all
|
||||||
|
|
||||||
|
14
pwgen/vapid.go
Normal file
14
pwgen/vapid.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
webpush "github.com/SherClockHolmes/webpush-go"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
privateKey, publicKey, err := webpush.GenerateVAPIDKeys()
|
||||||
|
print("vapidPrivateKey: ", privateKey, "\n")
|
||||||
|
print("vapidPublicKey: ", publicKey, "\n")
|
||||||
|
if err != nil {
|
||||||
|
// TODO: Handle error
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user