summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md14
-rw-r--r--server/brpaste.caddy4
-rw-r--r--server/brpaste.confd3
-rwxr-xr-xserver/brpaste.initd13
4 files changed, 10 insertions, 24 deletions
diff --git a/README.md b/README.md
index 997f42a..1154f52 100644
--- a/README.md
+++ b/README.md
@@ -6,15 +6,13 @@ It provides a lightweight REST-like interface and client-side syntax highlightin
It's small and fast because it relies on redis to perform the actual storage.
### Speed
-Redis is [fast](https://redis.io/topics/benchmarks).
-D is [pretty fast](https://github.com/kostya/benchmarks).
-D is in the general range of C++ and Rust, significantly beating out common other choices (such as python, nodejs and lua).
-However, D is (subjectively) a much more friendly syntax than either C++ or Rust (note: this is written as someone that's spent a good portion of their life writing C++ professionally).
-Further, D is safe (it includes a garbage collector, and more robust RAII than C++ does, as well as more compile-time tests than C++).
-Rust would be another good choice for writing this.
+It's just fast.
+I could put a bunch of benchmarks here but people didn't really seem to care in the previous version anyway.
+Just trust me.
+It's fast.
### Configuration
-There is no configuration within `brpaste`, besides the basics (what addresses to listen on, what port to listen on, how to connect to redis).
+There is no configuration within `brpaste`, besides the basics (what address/port to listen on, how to connect to redis).
This is because the actual job being done is relatively minimal.
However, because redis is used, your instance can be greatly configured.
For instance, you could make all your pastes expire in 10 minutes.
@@ -25,8 +23,6 @@ This is the recommended configuration.
### Deployment Difficulty
`brpaste` is distributed as a single binary file.
All other files (such as html) are baked into the binary.
-It is planned to offer statically linked to musl versions in the future.
-This is possible thanks to the `diet` templates (inspired by pugjs) provided by vibe-d, which are computed at compile-time.
### Stable IDs
`brpaste` IDs are not the shortest.
diff --git a/server/brpaste.caddy b/server/brpaste.caddy
index 6c10ebd..4eaf630 100644
--- a/server/brpaste.caddy
+++ b/server/brpaste.caddy
@@ -1,5 +1,3 @@
paste.example.com {
- proxy / localhost:8080 {
- health_check /health
- }
+ proxy / localhost:8080
}
diff --git a/server/brpaste.confd b/server/brpaste.confd
index 2755b94..7e3acd5 100644
--- a/server/brpaste.confd
+++ b/server/brpaste.confd
@@ -2,8 +2,7 @@ BRPASTE_USER=nobody
BRPASTE_GROUP=nobody
# defaults to localhost, set to :: to listen on all
-#BRPASTE_IP=::
-#BRPASTE_PORT=8080
+#BRPASTE_ADDR=:8080
# if your redis is listening on a different address
# accepts redis:// style strings
diff --git a/server/brpaste.initd b/server/brpaste.initd
index ab024b0..d4f094d 100755
--- a/server/brpaste.initd
+++ b/server/brpaste.initd
@@ -1,21 +1,14 @@
#!/sbin/openrc-run
supervisor=supervise-daemon
-healthcheck_timer=30
respawn_delay=30
+command_user="nobody:nobody"
command=/usr/bin/brpaste
command_args="\
- ${BRPASTE_USER:+--uid $BRPASTE_USER} ${BRPASTE_GROUP:+--gid $BRPASTE_GROUP} \
- ${BRPASTE_REDIS:+-r $BRPASTE_REDIS} \
- ${BRPASTE_IP:+-b $BRPASTE_IP} ${BRPASTE_PORT:+-p $BRPASTE_PORT}"
+ ${BRPASTE_REDIS:+-redis $BRPASTE_REDIS} \
+ ${BRPASTE_ADDR:+-bind $BRPASTE_ADDR}
depend() {
need redis
}
-
-health() {
- curl -s "${BRPASTE_IP:-localhost}:${BRPASTE_PORT:-8080}/health"
-}
-
-unhealthy() {}