v0.2.2
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE1MTdYA1m9lqO/FEeGPNoXAAiv/MFAltOf00ACgkQGPNoXAAi
v/OZpQ//Z+RYCfI/gyslhp9nZr423uQFHCyZPANhXfvoPGt2nUcz7QqxvlGwnK3T
BUqN00ErkHvVysdV9+2BH/JweDvVIzM+6pl++U4idI0q1/0t9T6aUhXMWbXWd+mP
OZcvDHwb8DBV9gL/GjhuHK2BN3gQ3sobczRCs9Dg1UX4PB1z6BQXCwMD4YLlxk1g
oEHzFy2XRkIvc+nsAZJzldDgJC9M9UHKM98RnadYc500Bus/Is/7DTRxu8FtxuaY
YBx/ItiLkdD4yiH832vSb+AmS1WX6n5DuWz73TwhRm2+0LfwZNJshiwSFiZ0uHHo
feZJBEJEWwL/9hK6XaxWYIx06hNsUxbTjoJokbRrHbNa4E8t4A0j6pe3CcGH96Rj
Pzo4uILI6I411wOZ0Y2USdzw268ndXuEn2lv3eMb53Da3tZtGTi0hwCCg9v1GUmF
jg0KTzofpdl1sY3KyHDG0LIYggLPBFH5FZOKcOXBGgRis1kdpeIVztgFeGJ8puJx
sl7OkYncHpd0S28g8NF8tpKyNbJqo9+SZJdz+UqmOCIOTxo7n01obZxo9UdclNSq
YHzLAM782JVTQWLN2It2kA83ZjXHwM+WyDRl4j11BbDOCK/zC4OVJkg8+b/mIk+K
pP02yPc44USK+70xxCPcCbSciGOfHXycjn8RuPmSoqaxtHteg5w=
=7aSi
-----END PGP SIGNATURE-----
Bump version to v0.2.2

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
1 file changed
tree: cc2ee9f5701305dfbb84348f48faf4b522cebfab
  1. .gitignore
  2. .goosarch
  3. .travis.yml
  4. .traviskey
  5. Dockerfile
  6. Gopkg.lock
  7. Gopkg.toml
  8. LICENSE
  9. Makefile
  10. README.md
  11. VERSION.txt
  12. main.go
  13. server.go
  14. server/
  15. vendor/
  16. version/
README.md

pastebinit

Travis CI GoDoc

Go implementation of pastebinit. Host your own pastebin and post things there. Example file I posted here.

Why? You ask.. because pastebin.com has ads (booo) & is fugly as eff.

Installation

Binaries

For installation instructions from binaries please visit the Releases Page.

Via Go

$ go get github.com/jessfraz/pastebinit

Usage

Client

You need to set PASTEBINIT_USERNAME and PASTEBINIT_PASS as environment variables, so the client knows how to auth on paste. To change the uri, pass the -b flag.

Just like the pastebinit you are used to, this client can read from stdin & input. Heres some examples:

# pipe to pastebinit
$ docker images | pastebinit -b yoururl.com

# pass a file
$ pastebinit -b yoururl.com server.go
$ pastebinit -h
pastebinit -  Command line paste bin.

Usage: pastebinit <command>

Flags:

  -b, --uri       pastebin base uri (default: https://paste.j3ss.co/)
  -d, --debug     enable debug logging (default: false)
  -p, --password  password (or env var PASTEBINIT_PASSWORD) (default: <none>)
  -u, --username  username (or env var PASTEBINIT_USERNAME)

Commands:

  server   Run the server.
  version  Show the version information.

Server

The server can be run in a docker container, via the included dockerfile. You can use my image on the hub: jess/pastebinit or you can build the image yourself via:

$ git clone git@github.com/jessfraz/pastebinit.git
$ cd pastebinit
$ docker build -t your_name/pastebinit .

To run the image do, you need to pass the PASTEBINIT_USERNAME and PASTEBINIT_PASS environment variables to the container. You can also pass the following options as cli flags to the binary in the container, these are:

$ pastebinit server -h
Usage: pastebinit server [OPTIONS]

Run the server.

Flags:

  --asset-path    Path to assets and templates (default: /src/static)
  -b, --uri       pastebin base uri (default: https://paste.j3ss.co/)
  --cert          path to ssl cert (default: <none>)
  -d, --debug     enable debug logging (default: false)
  --key           path to ssl key (default: <none>)
  -p, --password  password (or env var PASTEBINIT_PASSWORD) (default: <none>)
  --port          port for server to run on (default: 8080)
  -s, --storage   directory to store pastes (default: /etc/pastebinit/files)
  -u, --username  username (or env var PASTEBINIT_USERNAME)

Running in a container

Example command to run the container:

# to share the paste volume with your host
$ docker run -d \
    --name=pastebinit \
    --restart=always \
    -e PASTEBINIT_USERNAME=your_username \
    -e PASTEBINIT_PASS=your_pass \
    -v  /home/jess/pastes:/src/files \
    jess/pastebinit server \
        -b https://myserver.com

# to not share the paste volume
$ docker run -d \
    --name=pastebinit \
    --restart=always \
    -e PASTEBINIT_USERNAME=your_username \
    -e PASTEBINIT_PASS=your_pass \
    jess/pastebinit server \
        -b https://myserver.com

# ssl example
$ docker run -d 
    --name=pastebinit \
    --restart=always \
    -e PASTEBINIT_USERNAME=your_username \
    -e PASTEBINIT_PASS=your_pass \
    -v /path/to/ssl/stuffs:/ssl \
    jess/pastebinit server \
        -b https://myserver.com --cert=/ssl/cert.crt --key=/ssl/key.key

Then you are all set! Happy pasting!