Browse Source

Renamed project and package to yarns (plural of yarn)

pull/3/head
James Mills 3 months ago
parent
commit
2ff9be4898
Signed by: prologic GPG Key ID: AC4C014F1440EBD6
  1. 4
      .dockerignore
  2. 2
      .envrc
  3. 4
      .gitignore
  4. 8
      Dockerfile
  5. 33
      Makefile
  6. 10
      README.md
  7. 8
      cmd/yarns/main.go
  8. 6
      doc.go
  9. 5
      docker-compose.yml
  10. 101
      go.mod
  11. 563
      go.sum
  12. 2
      internal/auth/manager.go
  13. 2
      internal/bitcask_store.go
  14. 8
      internal/context.go
  15. 9
      internal/links.go
  16. 4
      internal/options.go
  17. 2
      internal/pages/about.md
  18. 363
      internal/rice-box.go
  19. 4
      internal/scraper.go
  20. 16
      internal/server.go
  21. 2
      internal/session_store.go
  22. 2
      internal/static/css/yarns.min.css
  23. 1
      internal/static/js/yarns.min.js
  24. 2
      internal/store.go
  25. 2
      internal/support_handlers.go
  26. 10
      internal/templates/base.html
  27. 7
      internal/templates/page.html
  28. 7
      internal/utils.go
  29. 2
      version.go
  30. 15
      yarns.yml

4
.dockerignore

@ -8,9 +8,9 @@ Dockerfile
/dist
/twtse
/yarns
/cmd/twtse/twtse
/cmd/yarns/yarns
/data/cache

2
.envrc

@ -1,2 +0,0 @@
GOPRIVATE=git.mills.io/prologic/twtse
export GOPRIVATE

4
.gitignore

@ -7,5 +7,5 @@
/data
/twtse
/cmd/twtse/twtse
/yarns
/cmd/yarns/yarns

8
Dockerfile

@ -1,7 +1,7 @@
# Build
FROM golang:alpine AS build
RUN apk add --no-cache -U build-base git make ffmpeg-dev
RUN apk add --no-cache -U build-base git make
RUN mkdir -p /src
@ -35,7 +35,7 @@ COPY ./internal/*.go ./internal/
COPY ./internal/auth/*.go ./internal/auth/
COPY ./internal/session/*.go ./internal/session/
COPY ./internal/passwords/*.go ./internal/passwords/
COPY ./cmd/twtse/*.go ./cmd/twtse/
COPY ./cmd/yarns/*.go ./cmd/yarns/
# Version/Commit (there there is no .git in Docker build context)
# NOTE: This is fairly low down in the Dockerfile instructions so
@ -59,7 +59,7 @@ VOLUME /data
# force cgo resolver
ENV GODEBUG=netdns=cgo
COPY --from=build /src/twtse /twtse
COPY --from=build /src/yarns /yarns
ENTRYPOINT ["/twtse"]
ENTRYPOINT ["/yarns"]
CMD [""]

33
Makefile

@ -1,25 +1,26 @@
.PHONY: deps dev build install image test clean
CGO_ENABLED=0
VERSION=$(shell git describe --abbrev=0 --tags 2>/dev/null || echo "$VERSION")
COMMIT=$(shell git rev-parse --short HEAD || echo "$COMMIT")
VERSION=$(shell git describe --abbrev=0 --tags 2>/dev/null)
COMMIT=$(shell git rev-parse --short HEAD)
GOCMD=go
all: build
deps:
@go get -u github.com/GeertJohan/go.rice/rice
@go get -u github.com/tdewolff/minify/v2/cmd/...
@$(GOCMD) install github.com/tdewolff/minify/v2/cmd/minify@latest
@$(GOCMD) install github.com/nicksnyder/go-i18n/v2/goi18n@latest
dev : DEBUG=1
dev : build
@./twtse -D
@./yarns -D
server: generate
@go build -tags "netgo static_build" -installsuffix netgo \
@$(GOCMD) build -tags "netgo static_build" -installsuffix netgo \
-ldflags "-w \
-X $(shell go list).Version=$(VERSION) \
-X $(shell go list).Commit=$(COMMIT)" \
./cmd/twtse/...
-X $(shell go list).Version=$(or ${VERSION},${VERSION},master) \
-X $(shell go list).Commit=$(or ${COMMIT},${COMMIT},HEAD)" \
./cmd/yarns/...
build: server
@ -28,26 +29,26 @@ generate:
echo 'Running in debug mode...'; \
rm -f -v ./internal/rice-box.go; \
else \
minify -b -o ./internal/static/css/twtse.min.css ./internal/static/css/[0-9]*-*.css; \
minify -b -o ./internal/static/js/twtse.min.js ./internal/static/js/[0-9]*-*.js; \
minify -b -o ./internal/static/css/yarns.min.css ./internal/static/css/[0-9]*-*.css; \
minify -b -o ./internal/static/js/yarns.min.js ./internal/static/js/[0-9]*-*.js; \
rm -f ./internal/rice-box.go; \
rice -i ./internal embed-go; \
fi
install: build
@go install ./cmd/twtse/...
@$(GOCMD) install ./cmd/yarns/...
ifeq ($(PUBLISH), 1)
image:
@docker build --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" -t r.mills.io/prologic/twtse .
@docker push r.mills.io/prologic/twtse
@docker build --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" -t r.mills.io/yarnsocial/yarns .
@docker push r.mills.io/yarnsocial/yarns
else
image:
@docker build --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" -t r.mills.io/prologic/twtse .
@docker build --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" -t r.mills.io/yarnsocial/yarns .
endif
test:
@go test -v -cover -race ./...
@$(GOCMD) test -v -cover -race ./...
clean:
@git clean -f -d -X

10
README.md

@ -1,3 +1,9 @@
# twtse
# yarns
A Search Engine for Twtxt.
🔍 yarns is a Search Engine for Twtxt.
See: https://search.twtxt.net/
## License
yarns is covered by the [MIT license](/LICENSE)

8
cmd/twtse/main.go → cmd/yarns/main.go

@ -14,8 +14,8 @@ import (
flag "github.com/spf13/pflag"
profiler "github.com/wblakecaldwell/profiler"
"git.mills.io/prologic/twtse"
"git.mills.io/prologic/twtse/internal"
"git.mills.io/yarnsocial/yarns"
"git.mills.io/yarnsocial/yarns/internal"
)
var (
@ -157,7 +157,7 @@ func main() {
parseArgs()
if version {
fmt.Printf("twtse v%s", twtse.FullVersion())
fmt.Printf("yarns v%s", yarns.FullVersion())
os.Exit(0)
}
@ -233,7 +233,7 @@ func main() {
}()
}
log.Infof("%s v%s listening on http://%s", path.Base(os.Args[0]), twtse.FullVersion(), bind)
log.Infof("%s %s listening on http://%s", path.Base(os.Args[0]), yarns.FullVersion(), bind)
if err := svr.Run(); err != nil {
log.WithError(err).Fatal("error running or shutting down server")
}

6
doc.go

@ -1,10 +1,10 @@
package twtse
package yarns
/* 🔍 twtse is a Search Engine for Twtxt.
/* 🔍 yarns is a Search Engine for Twtxt.
Copyright (C) 2021 James Mills
twtse is covered by the MIT license:
yarns is covered by the MIT license:
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

5
docker-compose.yml

@ -2,10 +2,9 @@
version: "3.8"
services:
twtse:
yarns:
build: .
image: r.mills.io/prologic/twtse:latest
command: -d /data -s bitcask:///data/twtse.db -u http://127.0.0.1:8000
command: -d /data -s bitcask:///data/yarns.db -u http://127.0.0.1:8000
ports:
- "8000:8000/tcp"
volumes:

101
go.mod

@ -1,42 +1,111 @@
module git.mills.io/prologic/twtse
module git.mills.io/yarnsocial/yarns
go 1.14
go 1.17
require (
git.mills.io/prologic/bitcask v1.0.0
git.mills.io/prologic/observe v0.0.0-20210712230028-fc31c7aa2bd1
git.mills.io/yarnsocial/yarn v0.0.0-20210907161233-11a3c9b00df2
github.com/GeertJohan/go.rice v1.0.2
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/NYTimes/gziphandler v1.1.1
github.com/PuerkitoBio/goquery v1.6.1 // indirect
github.com/andreadipersio/securecookie v0.0.0-20131119095127-e3c3b33544ec
github.com/antchfx/xmlquery v1.3.3 // indirect
github.com/apex/log v1.9.0
github.com/blevesearch/bleve/v2 v2.0.1
github.com/creasty/defaults v1.5.1
github.com/blevesearch/bleve/v2 v2.1.0
github.com/creasty/defaults v1.5.2
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/dustin/go-humanize v1.0.0
github.com/gabstv/merger v1.0.1
github.com/go-mail/mail v2.3.1+incompatible
github.com/goccy/go-yaml v1.8.6
github.com/goccy/go-yaml v1.9.3
github.com/gocolly/colly/v2 v2.1.0
github.com/gomarkdown/markdown v0.0.0-20201113031856-722100d81a8e
github.com/google/uuid v1.2.0 // indirect
github.com/gomarkdown/markdown v0.0.0-20210820032736-385812cbea76
github.com/goware/urlx v0.3.1
github.com/james4k/fmatter v0.0.0-20150827042251-377c8ea6259d
github.com/jointwt/twtxt v0.0.0-20210206113220-605dc6440c1b
github.com/julienschmidt/httprouter v1.3.0
github.com/justinas/nosurf v1.1.1
github.com/patrickmn/go-cache v2.1.0+incompatible
git.mills.io/prologic/bitcask v0.3.10
git.mills.io/prologic/observe v0.0.0-20181231082615-747b185a0928
github.com/renstrom/shortuuid v3.0.0+incompatible
github.com/robfig/cron v1.2.0
github.com/sirupsen/logrus v1.7.0
github.com/sirupsen/logrus v1.8.1
github.com/spf13/pflag v1.0.5
github.com/steambap/captcha v1.3.1
github.com/stretchr/testify v1.6.1
github.com/steambap/captcha v1.4.1
github.com/stretchr/testify v1.7.0
github.com/unrolled/logger v0.0.0-20201216141554-31a3694fe979
github.com/vcraescu/go-paginator v1.0.0
github.com/wblakecaldwell/profiler v0.0.0-20150908040756-6111ef1313a1
github.com/writeas/slug v1.2.0
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
)
require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/PuerkitoBio/goquery v1.7.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/RoaringBitmap/roaring v0.7.3 // indirect
github.com/abcum/lcp v0.0.0-20201209214815-7a3f3840be81 // indirect
github.com/andybalholm/cascadia v1.2.0 // indirect
github.com/antchfx/htmlquery v1.2.3 // indirect
github.com/antchfx/xmlquery v1.2.4 // indirect
github.com/antchfx/xpath v1.1.8 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.2.0 // indirect
github.com/blevesearch/bleve_index_api v1.0.1 // indirect
github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
github.com/blevesearch/mmap-go v1.0.2 // indirect
github.com/blevesearch/scorch_segment_api/v2 v2.0.1 // indirect
github.com/blevesearch/segment v0.9.0 // indirect
github.com/blevesearch/snowballstem v0.9.0 // indirect
github.com/blevesearch/upsidedown_store_api v1.0.1 // indirect
github.com/blevesearch/vellum v1.0.5 // indirect
github.com/blevesearch/zapx/v11 v11.2.2 // indirect
github.com/blevesearch/zapx/v12 v12.2.2 // indirect
github.com/blevesearch/zapx/v13 v13.2.2 // indirect
github.com/blevesearch/zapx/v14 v14.2.2 // indirect
github.com/blevesearch/zapx/v15 v15.2.2 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/daaku/go.zipexe v1.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.12.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/kennygrant/sanitize v1.2.4 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/plar/go-adaptive-radix-tree v1.0.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.29.0 // indirect
github.com/prometheus/procfs v0.7.0 // indirect
github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be // indirect
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca // indirect
github.com/steveyen/gtreap v0.1.0 // indirect
github.com/temoto/robotstxt v1.1.1 // indirect
go.etcd.io/bbolt v1.3.5 // indirect
golang.org/x/exp v0.0.0-20210722180016-6781d3edade3 // indirect
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d // indirect
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

563
go.sum

File diff suppressed because it is too large

2
internal/auth/manager.go

@ -5,7 +5,7 @@ import (
"github.com/julienschmidt/httprouter"
"git.mills.io/prologic/twtse/internal/session"
"git.mills.io/yarnsocial/yarns/internal/session"
)
// Options ...

2
internal/bitcask_store.go

@ -7,7 +7,7 @@ import (
"git.mills.io/prologic/bitcask"
log "github.com/sirupsen/logrus"
"git.mills.io/prologic/twtse/internal/session"
"git.mills.io/yarnsocial/yarns/internal/session"
)
const (

8
internal/context.go

@ -10,8 +10,8 @@ import (
"github.com/justinas/nosurf"
"git.mills.io/prologic/twtse"
"git.mills.io/prologic/twtse/internal/session"
"git.mills.io/yarnsocial/yarns"
"git.mills.io/yarnsocial/yarns/internal/session"
)
type Meta struct {
@ -74,11 +74,11 @@ func NewContext(conf *Config, db Store, req *http.Request) *Context {
BaseURL: conf.BaseURL,
InstanceName: conf.Name,
SoftwareVersion: twtse.FullVersion(),
SoftwareVersion: yarns.FullVersion(),
SearchPrompt: conf.RandomSearchPrompt(),
Commit: twtse.Commit,
Commit: yarns.Commit,
Theme: conf.Theme,
Title: "",

9
internal/links.go

@ -8,12 +8,11 @@ import (
"regexp"
"time"
"git.mills.io/prologic/twtse"
"git.mills.io/yarnsocial/yarn/types"
"git.mills.io/yarnsocial/yarn/types/lextwt"
"git.mills.io/yarnsocial/yarns"
"github.com/gocolly/colly/v2"
log "github.com/sirupsen/logrus"
"github.com/jointwt/twtxt/types"
"github.com/jointwt/twtxt/types/lextwt"
)
func init() {
@ -45,7 +44,7 @@ func GetFeeds(url string) (feeds chan string, err error) {
func FindFeeds(url string) chan string {
c := colly.NewCollector(
colly.Async(),
colly.UserAgent(fmt.Sprintf("%s (+https://search.twtxt.net)", twtse.FullVersion())),
colly.UserAgent(fmt.Sprintf("%s (+https://search.twtxt.net)", yarns.FullVersion())),
)
// Limit the number of threads started by colly to two

4
internal/options.go

@ -18,7 +18,7 @@ const (
DefaultData = "./data"
// DefaultStore is the default data store used for accounts, sessions, etc
DefaultStore = "bitcask://twtse.db"
DefaultStore = "bitcask://yarns.db"
// DefaultBaseURL is the default Base URL for the app used to construct feed URLs
DefaultBaseURL = "http://0.0.0.0:8000"
@ -36,7 +36,7 @@ const (
DefaultMetaTitle = ""
DefaultMetaAuthor = "search.twtxt.net"
DefaultMetaKeywords = "spider, crawler, search, engine, twtxt, index, find, lookup"
DefaultMetaDescription = "🔍 twtse is a Search Engine for Twtxt"
DefaultMetaDescription = "🔍 yarns is a Search Engine for Twtxt"
// DefaultTheme is the default theme to use ('light' or 'dark')
DefaultTheme = "dark"

2
internal/pages/about.md

@ -1,5 +1,5 @@
---
title: About Twtse, a Search Engine for Twtxt.
title: About yarns, a Search Engine for Twtxt.
---
# About {{ .InstanceName }}

363
internal/rice-box.go

File diff suppressed because one or more lines are too long

4
internal/scraper.go

@ -6,9 +6,9 @@ import (
"regexp"
"strings"
"git.mills.io/yarnsocial/yarn/types"
"git.mills.io/yarnsocial/yarn/types/lextwt"
"github.com/apex/log"
"github.com/jointwt/twtxt/types"
"github.com/jointwt/twtxt/types/lextwt"
)
const (

16
internal/server.go

@ -10,17 +10,17 @@ import (
"syscall"
"time"
"git.mills.io/prologic/observe"
rice "github.com/GeertJohan/go.rice"
"github.com/NYTimes/gziphandler"
"github.com/gabstv/merger"
"github.com/justinas/nosurf"
"git.mills.io/prologic/observe"
"github.com/robfig/cron"
log "github.com/sirupsen/logrus"
"github.com/unrolled/logger"
"git.mills.io/prologic/twtse"
"git.mills.io/prologic/twtse/internal/session"
"git.mills.io/yarnsocial/yarns"
"git.mills.io/yarnsocial/yarns/internal/session"
)
var (
@ -28,7 +28,7 @@ var (
)
func init() {
metrics = observe.NewMetrics("twtse")
metrics = observe.NewMetrics("yarns")
}
// Server ...
@ -226,9 +226,9 @@ func (s *Server) setupMetrics() {
)
metrics.GaugeVec("server", "info").
With(map[string]string{
"full_version": twtse.FullVersion(),
"version": twtse.Version,
"commit": twtse.Commit,
"full_version": yarns.FullVersion(),
"version": yarns.Version,
"commit": yarns.Commit,
}).Set(1)
metrics.NewCounter(
"server", "queries",
@ -399,7 +399,7 @@ func NewServer(bind string, options ...Option) (*Server, error) {
server: &http.Server{
Addr: bind,
Handler: logger.New(logger.Options{
Prefix: "twtse",
Prefix: "yarns",
RemoteAddressHeaders: []string{"X-Forwarded-For"},
}).Handler(
gziphandler.GzipHandler(

2
internal/session_store.go

@ -6,7 +6,7 @@ import (
"github.com/patrickmn/go-cache"
log "github.com/sirupsen/logrus"
"git.mills.io/prologic/twtse/internal/session"
"git.mills.io/yarnsocial/yarns/internal/session"
)
// SessionStore ...

2
internal/static/css/yarns.min.css

File diff suppressed because one or more lines are too long

1
internal/static/js/yarns.min.js

File diff suppressed because one or more lines are too long

2
internal/store.go

@ -4,7 +4,7 @@ import (
"errors"
"fmt"
"git.mills.io/prologic/twtse/internal/session"
"git.mills.io/yarnsocial/yarns/internal/session"
)
var (

2
internal/support_handlers.go

@ -9,7 +9,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/steambap/captcha"
"git.mills.io/prologic/twtse/internal/session"
"git.mills.io/yarnsocial/yarns/internal/session"
)
// CaptchaHandler ...

10
internal/templates/base.html

@ -7,10 +7,10 @@
<link href="/css/01-pico.css" rel="stylesheet" />
<link href="/css/02-icss.css" rel="stylesheet" />
<link href="/css/03-icons.css" rel="stylesheet" />
<link href="/css/99-twtse.css" rel="stylesheet" />
<link href="/css/99-yarns.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="/img/favicon.png" />
{{ else }}
<link href="/css/{{ .Commit }}/twtse.min.css" rel="stylesheet" />
<link href="/css/{{ .Commit }}/yarns.min.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="/img/{{ .Commit}}/favicon.png" />
{{ end }}
@ -101,7 +101,7 @@
</main>
<footer class="container">
<div class="footer-copyright">
<a href="https://git.mills.io/prologic/twtse" target="_blank">twtse v{{ .SoftwareVersion }}</a>
<a href="https://git.mills.io/yarnsocial/yarns" target="_blank">yarns v{{ .SoftwareVersion }}</a>
·
&copy; 2020 <a href="https://git.mills.io/prologic" target="_blank">James Mills</a>. All rights reserved.
</div>
@ -117,9 +117,9 @@
<script type="application/javascript" src="/js/01-umbrella.js"></script>
<script type="application/javascript" src="/js/02-polyfill.js"></script>
<script type="application/javascript" src="/js/03-twix.js"></script>
<script type="application/javascript" src="/js/99-twtse.js"></script>
<script type="application/javascript" src="/js/99-yarns.js"></script>
{{ else }}
<script type="application/javascript" src="/js/{{ .Commit }}/twtse.min.js"></script>
<script type="application/javascript" src="/js/{{ .Commit }}/yarns.min.js"></script>
{{ end }}
</body>

7
internal/templates/page.html

@ -2,13 +2,6 @@
<article class="grid">
<div>
{{ .Content }}
<hr />
<footer class="container">
This is a <a href="https://twt.social">Twt.Social</a> pod.
If you would like your own pod, please contact <a href="https://twt.social/support">support</a>.
::
<a href="https://github.com/jointwt/twtxt/edit/master/internal/pages/{{ .Page }}.md">Edit on github</a>
</footer>
</div>
</article>
{{ end }}

7
internal/utils.go

@ -23,11 +23,12 @@ import (
_ "image/gif"
_ "image/jpeg"
"git.mills.io/prologic/twtse"
"github.com/goware/urlx"
log "github.com/sirupsen/logrus"
"github.com/writeas/slug"
"golang.org/x/crypto/blake2b"
"git.mills.io/yarnsocial/yarns"
)
const (
@ -110,8 +111,8 @@ func Request(conf *Config, method, url string, headers http.Header) (*http.Respo
headers.Set(
"User-Agent",
fmt.Sprintf(
"twtse/%s (%s Support: %s)",
twtse.FullVersion(), conf.Name, URLForPage(conf.BaseURL, "support"),
"yarns/%s (%s Support: %s)",
yarns.FullVersion(), conf.Name, URLForPage(conf.BaseURL, "support"),
),
)
}

2
version.go

@ -1,4 +1,4 @@
package twtse
package yarns
import (
"fmt"

15
twtse.yml → yarns.yml

@ -2,11 +2,11 @@
version: "3.8"
services:
twtse:
image: r.mills.io/prologic/twtse:latest
command: -d /data -s bitcask:///data/twtse.db -u https://search.twtxt.net
yarns:
image: r.mills.io/yarnsocial/yarns:latest
command: -d /data -s bitcask:///data/yarns.db -u https://search.twtxt.net
volumes:
- twtse:/data
- yarns:/data
networks:
- traefik
deploy:
@ -18,8 +18,9 @@ services:
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.services.twtse.loadbalancer.server.port=8000"
- "traefik.http.routers.twtse.rule=Host(`search.twtxt.net`)"
- "traefik.http.services.yarns_yarns.loadbalancer.server.port=8000"
- "traefik.http.routers.yarns_yarns.rule=Host(`search.twtxt.net`)"
- "traefik.http.routers.gitea.priority=2"
restart_policy:
condition: on-failure
@ -28,5 +29,5 @@ networks:
external: true
volumes:
twtse:
yarns:
driver: local
Loading…
Cancel
Save