Install Privatebin on OKD4x

From Bitbull Wiki
Jump to navigation Jump to search

oc new-project privatebin
oc new-app --image=privatebin/nginx-fpm-alpine:latest --name privatebin CONFIG_PATH=/srv/data/cfg
oc set volume deployment/privatebin --remove --mount-path=/srv/data --confirm
oc set volume deployment/privatebin --add --name=data --mount-path=/srv/data -t pvc --claim-size=5G --claim-mode=ReadWriteOnce

oc rsh deployment/privatebin /bin/sh << EOF
#!/bin/sh
test -f /srv/data/cfg || cp -rv /srv/cfg /srv/data/cfg
echo '
[main]
name = "BitBin"
fileupload = true
sizelimit = 104857600
[model]
class = Filesystem
[model_options]
dir = PATH "data"' > /srv/data/cfg/conf.php
EOF


oc create route edge privatebin --service=privatebin --port=8080 --hostname=bin.domain.tld