Difference between revisions of "Install Privatebin on OKD4x"
Jump to navigation
Jump to search
(Created page with "* https://privatebin.info/ <pre> oc new-project privatebin oc new-app --image=privatebin/nginx-fpm-alpine:latest --name privatebin oc set volume deployment/privatebin --remov...") |
|||
| Line 2: | Line 2: | ||
<pre> | <pre> | ||
| + | |||
oc new-project privatebin | oc new-project privatebin | ||
| − | oc new-app --image=privatebin/nginx-fpm-alpine:latest --name 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 --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 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 | ||
| + | |||
| − | |||
</pre> | </pre> | ||
[[Category:4x]] | [[Category:4x]] | ||
[[Category:OpenShift & K8S]] | [[Category:OpenShift & K8S]] | ||
Latest revision as of 11:50, 5 November 2023
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