1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 01:36:23 +00:00
Files
geek-cookbook/docs/recipes/privatebin.md
David Young cf44acda27 Add recipe for searxng (#274)
* Add recipe for searxng

Signed-off-by: David Young <davidy@funkypenguin.co.nz>

* Fussy linter

Signed-off-by: David Young <davidy@funkypenguin.co.nz>

---------

Signed-off-by: David Young <davidy@funkypenguin.co.nz>
2023-03-10 17:47:52 +00:00

2.4 KiB

title, description, recipe
title description recipe
Run PrivateBin on Docker A private imgur/pastebin, running on Docker PrivateBin

PrivateBin

PrivateBin is a minimalist, open source online pastebin where the server (can) has zero knowledge of pasted data. We all need to paste data / log files somewhere when it doesn't make sense to paste it inline. With PrivateBin, you can own the hosting, access, and eventual deletion of this data.

PrivateBin Screenshot{ loading=lazy }

{{ page.meta.recipe }} Requirements

--8<-- "recipe-standard-ingredients.md"

Preparation

Setup data locations

We'll need a single location to bind-mount into our container, so create /var/data/privatebin, and make it world-writable (there might be a more secure way to do this!)

mkdir /var/data/privatebin
chmod 777 /var/data/privatebin/

{{ page.meta.recipe }} Docker Swarm config

Create a docker swarm config file in docker-compose syntax (v3), something like the example below:

--8<-- "premix-cta.md"

version: '3'

services:
  app:
    image: privatebin/nginx-fpm-alpine
    volumes:
      - /var/data/privatebin:/srv/data
    networks:
      - traefik_public
    deploy:
      labels:
        # traefik common
        - traefik.enable=true
        - traefik.docker.network=traefik_public

        # traefikv1
        - traefik.frontend.rule=Host:privatebin.example.com
        - traefik.port=4180     

        # traefikv2
        - "traefik.http.routers.privatebin.rule=Host(`privatebin.example.com`)"
        - "traefik.http.services.privatebin.loadbalancer.server.port=4180"
        - "traefik.enable=true"

networks:
  traefik_public:
    external: true

Serving

Launch PrivateBin stack

Launch the PrivateBin stack by running docker stack deploy privatebin -c <path -to-docker-compose.yml>

Log into your new instance at https://YOUR-FQDN, with user "root" and the password you specified in gitlab.env.

--8<-- "recipe-footer.md"