Configuration and cli example
This commit is contained in:
parent
42cb515813
commit
b46c107a85
@ -1,5 +1,11 @@
|
|||||||
server {
|
server {
|
||||||
|
listen 443 http2;
|
||||||
server_name paste.plabble.org;
|
server_name paste.plabble.org;
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
|
||||||
|
ssl_early_data on;
|
||||||
|
include certs/plabble.org/config.conf;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:8080;
|
proxy_pass http://127.0.0.1:8080;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,19 @@
|
|||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
# Copyright 2022 Plabble
|
|
||||||
|
depend() { need sysfs cgroups; }
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
podman rm pastabble-c || true
|
su podman -c 'podman rm pastabble-c' || true
|
||||||
podman run --name pastabble-c -p 8080:8080 -v pastabble-v:/data -dt pastabble
|
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() {
|
stop() {
|
||||||
podman stop pastabble-c
|
su podman -c 'podman stop pastabble' || true
|
||||||
}
|
}
|
15
pastabble-cli.sh
Normal file
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
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user