diff --git a/README.md b/README.md index 66ee876..9963ee9 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,29 @@ a web UI for sharing code and text with links that expire on your terms. - API-first — every UI action is also a plain HTTP call - Single binary — templates and assets are embedded; no external deps +## Screenshots + +| | | +|---|---| +| ![Editor in midnight](docs/palette-previews/midnight-new.png) | ![Paste view in pastel-peach](docs/palette-previews/pastel-peach-paste.png) | +| ![History in pastel-lavender](docs/palette-previews/pastel-lavender-history.png) | ![Saved in pastel-cloud](docs/palette-previews/pastel-cloud-mine.png) | + ## Get Started +### Docker + +```bash +docker run -p 8080:8080 -v palette-data:/data git.archfox.org/poslop/palette +``` + +The SQLite database lives in the `/data` volume inside the container. + +## Docker Compose + +See [docker-compose.yml](docker-compose.yml) for a ready-to-use example with +every environment variable documented, including which are required (only the +/data volume) and which are optional. + ### Build from source Requires Go 1.21+. @@ -28,20 +49,6 @@ go build -o palette . # open http://localhost:8080 ``` -### Docker - -```bash -docker run -p 8080:8080 -v palette-data:/data git.archfox.org/poslop/palette -``` - -The SQLite database lives in the `/data` volume inside the container. - -## Screenshots - -| | | -|---|---| -| ![Editor in midnight](docs/palette-previews/midnight-new.png) | ![Paste view in pastel-peach](docs/palette-previews/pastel-peach-paste.png) | -| ![History in pastel-lavender](docs/palette-previews/pastel-lavender-history.png) | ![Saved in pastel-cloud](docs/palette-previews/pastel-cloud-mine.png) | ## Configuration @@ -67,27 +74,8 @@ curl -X POST http://localhost:8080/api/pastes -d '{"content":"hello"}' Design docs: [docs/design/](docs/design/). -## Performance Notes -The history and Saved pages use client-side filtering: when you type in the -search box, the UI fetches the most recent 100 pastes (`limit=100`, the API -maximum) once per query and filters/sorts them in the browser. Pastes beyond -the newest 100 are not searched; a match count against the full total is still -shown. This keeps search instant without a server-side query. If large -instances need full search later, it will be a server-side endpoint (see -issue #32). -## CI - -Gitea Actions workflow at `.gitea/workflows/ci.yml`: -- On push to main: `go vet` + `go test` -- On tags: build and push Docker image to `git.archfox.org/poslop/palette` - -## Docker Compose - -See [docker-compose.yml](docker-compose.yml) for a ready-to-use example with -every environment variable documented, including which are required (only the -/data volume) and which are optional. ## License