This commit is contained in:
@@ -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
|
- API-first — every UI action is also a plain HTTP call
|
||||||
- Single binary — templates and assets are embedded; no external deps
|
- Single binary — templates and assets are embedded; no external deps
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|
| | |
|
||||||
|
|---|---|
|
||||||
|
|  |  |
|
||||||
|
|  |  |
|
||||||
|
|
||||||
## Get Started
|
## 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
|
### Build from source
|
||||||
|
|
||||||
Requires Go 1.21+.
|
Requires Go 1.21+.
|
||||||
@@ -28,20 +49,6 @@ go build -o palette .
|
|||||||
# open http://localhost:8080
|
# 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
|
|
||||||
|
|
||||||
| | |
|
|
||||||
|---|---|
|
|
||||||
|  |  |
|
|
||||||
|  |  |
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
@@ -67,27 +74,8 @@ curl -X POST http://localhost:8080/api/pastes -d '{"content":"hello"}'
|
|||||||
|
|
||||||
Design docs: [docs/design/](docs/design/).
|
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
|
## License
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user