🏡 index : ~doyle/bin.git

author Jordan Doyle <jordan@doyle.la> 2022-03-14 22:45:28.0 +00:00:00
committer Jordan Doyle <jordan@doyle.la> 2022-03-14 22:45:28.0 +00:00:00
commit
776bec1b3004d0f9afa009ea76ac38504b17d7ab [patch]
tree
10c4949b8485c4a456b78ab6cf02e8555f7328dc
parent
e1639c032a1342d308baf589f7ef30a46d44b439
download
776bec1b3004d0f9afa009ea76ac38504b17d7ab.tar.gz

Bump version



Diff

 Cargo.lock |  2 +-
 Cargo.toml |  4 ++--
 Dockerfile |  9 +++------
 README.md  | 19 ++++++++++++++++---
 4 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 5a70380..531008a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -413,7 +413,7 @@ dependencies = [

[[package]]
name = "bin"
version = "1.0.3"
version = "2.0.0"
dependencies = [
 "actix",
 "actix-web",
diff --git a/Cargo.toml b/Cargo.toml
index da259de..3230c8b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,11 +1,11 @@
[package]
name = "bin"
version = "1.0.3"
version = "2.0.0"
description = "a paste bin."
repository = "https://github.com/w4/bin"
license = "WTFPL OR 0BSD"
authors = ["Jordan Doyle <jordan@doyle.la>"]
edition = "2018"
edition = "2021"

[dependencies]
argh = "0.1"
diff --git a/Dockerfile b/Dockerfile
index df3ab05..12dcf03 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,15 +1,12 @@
FROM rust:1.45-slim-stretch AS builder
RUN rustup install nightly-x86_64-unknown-linux-gnu

RUN apt update && apt install -y libclang-dev
FROM rust:1-slim AS builder

COPY . /sources
WORKDIR /sources
RUN cargo +nightly build --release
RUN cargo build --release
RUN chown nobody:nogroup /sources/target/release/bin


FROM debian:stretch-slim
FROM debian:bullseye-slim
COPY --from=builder /sources/target/release/bin /pastebin

USER nobody
diff --git a/README.md b/README.md
index 71f8337..68c5e52 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ a paste bin.

A paste bin that's actually minimalist. No database requirement, no commenting functionality, no self-destructing or time bomb messages and no social media integration—just an application to quickly send snippets of text to people.

[bin]https://bin.gy/ is written in Rust in around 200 lines of code. It's fast, it's simple, there's code highlighting and you can ⌘+A without going to the 'plain' page. It's revolutionary in the paste bin industry, disrupting markets and pushing boundaries never seen before.
[bin]https://bin.gy/ is written in Rust in around 300 lines of code. It's fast, it's simple, there's code highlighting and you can ⌘+A without going to the 'plain' page. It's revolutionary in the paste bin industry, disrupting markets and pushing boundaries never seen before.

##### so how do you get bin?

@@ -29,9 +29,22 @@ $ ./bin

##### funny, what settings are there?

bin uses [rocket]https://rocket.rs so you can add a [rocket config file]https://api.rocket.rs/v0.3/rocket/config/ if you like. You can set `ROCKET_PORT` in your environment if you want to change the default port (8820).
```
$ ./bin

Usage: bin [<bind_addr>] [--buffer-size <buffer-size>] [--max-paste-size <max-paste-size>]

bin's only configuration value is `BIN_BUFFER_SIZE` which defaults to 2000. Change this value if you want your bin to hold more pastes.
a pastebin.

Positional Arguments:
  bind_addr         socket address to bind to (default: 127.0.0.1:8820)

Options:
  --buffer-size     maximum amount of pastes to store before rotating (default:
                    1000)
  --max-paste-size  maximum paste size in bytes (default. 32kB)
  --help            display usage information
```

##### is there curl support?