Lasa is a stateless proxy that generates a RSS or an Atom feed from a Standard.site publication. lasa.anhgelus.world
rss atom atprotocol standard-site atproto
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

build(docker): create dockerfile

+75 -5
+24
Dockerfile
··· 1 + FROM golang:alpine as builder 2 + 3 + WORKDIR /app 4 + 5 + COPY . . 6 + 7 + RUN apk add just 8 + 9 + RUN just build 10 + 11 + FROM alpine:latest 12 + 13 + WORKDIR /app 14 + 15 + # expose default port 16 + EXPOSE 8000 17 + 18 + COPY --from=builder /app/build/lasad . 19 + COPY --from=builder /app/build/lasa . 20 + 21 + # generate default config file 22 + RUN /app/lasad gen-config 23 + 24 + ENTRYPOINT [ "/app/lasad" ]
+35
README.md
··· 27 27 https://lasa.example.org/did:plc:revjuqmkvrw6fnkxppqtszpv/3lwafzkjqm25s/atom 28 28 ``` 29 29 30 + ## Dev 31 + 32 + Requires **just** as a command runner. 33 + 34 + Starts the web server: 35 + ```bash 36 + just 37 + # or 38 + just dev 39 + ``` 40 + 41 + Starts Valkey in Docker and exposes its port: 42 + ```bash 43 + just valkey 44 + ``` 45 + 30 46 ## Deploy 31 47 32 48 Lasa is a standalone binary that requires nothing. 33 49 You can use Valkey as a cache. 50 + 51 + ### Building 34 52 35 53 Building binaries: 36 54 ```bash ··· 39 57 40 58 `build/lasad` is the daemon running the web server. 41 59 Run `lasad -h` to get the help. 60 + Read `lasad(1)` for more information. 42 61 43 62 `build/lasa` is a CLI. 44 63 Run `lasa -h` to get the help. 64 + Read `lasa(1)` for more information. 45 65 46 66 You must have **scdoc** installed to build the man pages. 67 + If scdoc is not installed, it skips the building. 68 + 69 + You can use 70 + ```bash 71 + just build-docker localhost/lasa 72 + ``` 73 + to build the Dockerfile containing `lasa` and `lasad`. 74 + You can replace `localhost/lasa` by the name of the image. 75 + 76 + ### Installing 77 + 78 + Building and installing binaries and man pages to `/usr/local/`: 79 + ```bash 80 + just install 81 + ```
+16 -5
justfile
··· 1 1 builder := 'go build -ldflags "-s -w"' 2 2 testConfig := '"test.toml"' 3 3 4 + docker := 'podman' 5 + 4 6 dev: 5 7 if [[ ! -f {{testConfig}} ]]; then go run ./cmd/lasad/ gen-config -c {{testConfig}}; fi 6 8 go run ./cmd/lasad/ -c {{testConfig}} 7 9 10 + valkey: 11 + {{docker}} run --rm --name valkey -p 6379:6379 -d docker.io/valkey/valkey:alpine 12 + 8 13 build: build-lasa build-lasad 9 14 10 15 build-lasa: 11 16 {{builder}} -o build/lasa ./cmd/lasa/ 12 - just build-doc lasa 17 + # do not require building man pages 18 + -just build-doc lasa 13 19 14 20 build-lasad: 15 21 {{builder}} -o build/lasad ./cmd/lasad/ 16 - just build-doc lasad 22 + # do not require building man pages 23 + -just build-doc lasad 17 24 18 25 build-doc file: 19 26 scdoc < {{file}}.1.scd > build/{{file}}.1 20 27 28 + build-docker name: 29 + {{docker}} build -t {{name}} . 30 + 21 31 install: build 22 32 mv build/lasa /usr/local/bin/ 23 33 mv build/lasad /usr/local/bin/ 24 - mkdir -p /usr/local/man/man1 25 - mv build/lasa.1 /usr/local/man/man1/ 26 - mv build/lasad.1 /usr/local/man/man1/ 34 + # if cannot install man pages, skip 35 + -mkdir -p /usr/local/man/man1 36 + -mv build/lasa.1 /usr/local/man/man1/ 37 + -mv build/lasad.1 /usr/local/man/man1/