b3988399739599deb57d67a2aef24cfe0a699ff4 — Alexey Yerin 10 months ago f4793c3
chore: add installation instructions
1 files changed, 40 insertions(+), 0 deletions(-)

M README.md => README.md +40 -0
@@ 1,2 1,42 @@
# gobin
Simple text pasting service similar to pastebin

# Installation
## Database
Two basic requirements are Go compiler and PostgreSQL running. As soon as
PostgreSQL is running, set `DATABASE_URI` to `postgresql://`-URI:
export DATABASE_URI=posgtresql://user:password@localhost/db

## Configuration
If you want to change port on which application is running, set `PORT`
environment variable (4000 is default).

If your application is hosted not on localhost, you should change `BASE_URL`
environment variable to `http://`/`https://` + your domain
(e.g. `https://somesite.dev`)

export BASE_URL=https://somesite.dev
export PORT=80

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

go build

## Running
# Setup database
./gobin-migrate up

# Run the service

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