Simple text pasting service similar to pastebin
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
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://
or https://
+ your domain
(e.g. https://somesite.dev
)
export BASE_URL=https://somesite.dev
export PORT=80
git clone https://git.sr.ht/~yerinalexey/gobin
cd gobin
go build
./gobin-migrate up
If something goes wrong, you can apply migrations manually by running up.sql
files in subdirectories of ./migrations
.
./gobin
It's a good idea to run gobin
binary as a system service. Make sure to
provide all environment variables.