~yerinalexey/gobin

ref: 6013cb5e58902241b8fa8b797c4cbd6ad988434f gobin/README.md -rw-r--r-- 967 bytes
6013cb5e — Alexey Yerin Use configuration file instead of environment 6 months ago

#GoBin

Simple self-hosted service for sharing text snippets

#Features

  • Totally anonymous, not even IP is logged
  • Dark theme by default
  • JavaScript-free
  • Easy to deploy

#Installation

Two basic requirements are Go compiler (unless you grab built binaries) and PostgreSQL database running.

#Configuration

Copy config.example.toml to config.toml (or whatever you want) and edit to your liking. All fields are required.

#Building

git clone https://git.sr.ht/~yerinalexey/gobin
cd gobin

go build

#Migrations

DATABASE_URI=postgres://.. ./gobin-migrate up

DATABASE_URI is the same as dbUri in config.toml.

If something goes wrong, you can apply migrations manually by running up.sql files in subdirectories of ./migrations.

#Running

./gobin

or

./gobin -config /etc/whatever.toml    # if you have a config file in different place

It's also a good idea to run gobin binary as a system service.