Configuration and cli example

This commit is contained in:
Maurice 2022-11-03 17:30:34 +01:00
parent 42cb515813
commit b46c107a85
3 changed files with 33 additions and 4 deletions

@ -1,5 +1,11 @@
server {
listen 443 http2;
server_name paste.plabble.org;
access_log /var/log/nginx/access.log;
ssl_early_data on;
include certs/plabble.org/config.conf;
location / {
proxy_pass http://127.0.0.1:8080;
}

@ -1,11 +1,19 @@
#!/sbin/openrc-run
# Copyright 2022 Plabble
depend() { need sysfs cgroups; }
start() {
podman rm pastabble-c || true
podman run --name pastabble-c -p 8080:8080 -v pastabble-v:/data -dt pastabble
su podman -c 'podman rm pastabble-c' || true
su podman -c 'podman run \
--name pastabble-c -d \
--read-only \
--cap-drop ALL \
--security-opt=no-new-privileges \
-p 127.0.0.1:8080:8080 \
-v pastabble-v:/app/data \
pastabble'
}
stop() {
podman stop pastabble-c
su podman -c 'podman stop pastabble' || true
}

15
pastabble-cli.sh Normal file

@ -0,0 +1,15 @@
#!/bin/sh
# Shell aliasses and functions.
# Load or copy this file into your .profile or (b)ashrc
PURL="paste.plabble.org"
alias pcopy="curl -F 'content=<-' $PURL -w '\n'"
alias pshort="curl -F 'link=<-' $PURL/to -w '\n'"
function ppaste() {
curl $PURL/$1
}
function pgo() {
firefox $PURL/to/$1
}