From 3132195275dabcd7c89a17ae94764879944eacd9 Mon Sep 17 00:00:00 2001 From: fiatjaf <fiatjaf@alhur.es> Date: Thu, 14 Jan 2021 21:56:40 -0300 Subject: [PATCH] deploy to heroku. --- Makefile | 4 ++-- Procfile | 1 + main.go | 2 +- postgresql.go | 2 +- sqlite.go | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 Procfile diff --git a/Makefile b/Makefile index 6c38e40..0d0813d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ relay-lite: $(shell find . -name "*.go") - go build -ldflags="-s -w" -o ./relay-lite + go build -ldflags="-s -w" -tags lite -o ./relay-lite relay-full: $(shell find . -name "*.go") - go build -ldflags="-s -w" -tags full -o ./relay-full + go build -ldflags="-s -w" -o ./relay-full diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..7a4ebb1 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: bin/nostr-relay-poc diff --git a/main.go b/main.go index 71e1e18..e9d47d0 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,7 @@ type Settings struct { Host string `envconfig:"HOST" default:"0.0.0.0"` Port string `envconfig:"PORT" default:"7447"` - PostgresDatabase string `envconfig:"POSTGRESQL_DATABASE"` + PostgresDatabase string `envconfig:"DATABASE_URL"` SQLiteDatabase string `envconfig:"SQLITE_DATABASE"` } diff --git a/postgresql.go b/postgresql.go index 6e7e713..4cb6716 100644 --- a/postgresql.go +++ b/postgresql.go @@ -1,4 +1,4 @@ -// +build full +// +build -lite package main diff --git a/sqlite.go b/sqlite.go index bc894bb..8403db5 100644 --- a/sqlite.go +++ b/sqlite.go @@ -1,4 +1,4 @@ -// +build !full +// +build !lite package main