Add pipeline (#65)

close #54

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/65
Reviewed-by: Andreas Shimokawa <ashimokawa@noreply.codeberg.org>
This commit is contained in:
6543 2022-03-30 21:36:26 +02:00
parent 5013753232
commit 5d2d701155
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
11 changed files with 56 additions and 34 deletions

View file

@ -2,6 +2,7 @@ package cmd
import (
"fmt"
"github.com/akrylysov/pogreb"
"github.com/urfave/cli/v2"
@ -12,12 +13,12 @@ var Certs = &cli.Command{
Name: "certs",
Usage: "manage certs manually",
Subcommands: []*cli.Command{
&cli.Command{
{
Name: "list",
Usage: "list all certificates in the database",
Action: listCerts,
},
&cli.Command{
{
Name: "remove",
Usage: "remove a certificate from the database",
Action: removeCert,

View file

@ -72,14 +72,14 @@ func Serve(ctx *cli.Context) error {
keyCache := cache.NewKeyValueCache()
challengeCache := cache.NewKeyValueCache()
// canonicalDomainCache stores canonical domains
var canonicalDomainCache = cache.NewKeyValueCache()
canonicalDomainCache := cache.NewKeyValueCache()
// dnsLookupCache stores DNS lookups for custom domains
var dnsLookupCache = cache.NewKeyValueCache()
dnsLookupCache := cache.NewKeyValueCache()
// branchTimestampCache stores branch timestamps for faster cache checking
var branchTimestampCache = cache.NewKeyValueCache()
branchTimestampCache := cache.NewKeyValueCache()
// fileResponseCache stores responses from the Gitea server
// TODO: make this an MRU cache with a size limit
var fileResponseCache = cache.NewKeyValueCache()
fileResponseCache := cache.NewKeyValueCache()
// Create handler based on settings
handler := server.Handler(mainDomainSuffix, []byte(rawDomain),