Dokku deployment recipe
This commit is contained in:
23
Makefile
23
Makefile
@ -1,10 +1,13 @@
|
||||
DOKKU_HOST := dokku@dev.lookingfora.name
|
||||
SHELL := /bin/bash
|
||||
|
||||
build: vendor
|
||||
CGO_ENABLED=0 go build -mod=vendor -v -o bin/server ./cmd/server
|
||||
|
||||
test:
|
||||
go test -v -race ./...
|
||||
|
||||
release:
|
||||
release: vendor
|
||||
@$(SHELL) ./misc/script/release.sh
|
||||
|
||||
vendor:
|
||||
@ -46,6 +49,24 @@ hydra-interactive:
|
||||
hydra \
|
||||
/bin/sh
|
||||
|
||||
dokku-build:
|
||||
docker build \
|
||||
-t hydra-passwordless-dokku:latest \
|
||||
.
|
||||
|
||||
dokku-run:
|
||||
docker run -it --rm -p 4444:4444 -p 3002:3002 hydra-passwordless-dokku:latest
|
||||
|
||||
dokku-deploy: dokku-deploy-passwordless dokku-deploy-sso
|
||||
|
||||
dokku-deploy-passwordless:
|
||||
$(if $(shell git config remote.dokku-passwordless.url),, git remote add dokku-passwordless $(DOKKU_HOST):passwordless)
|
||||
git push -f dokku-passwordless $(shell git rev-parse HEAD):refs/heads/master
|
||||
|
||||
dokku-deploy-sso:
|
||||
$(if $(shell git config remote.dokku-sso.url),, git remote add dokku-sso $(DOKKU_HOST):sso)
|
||||
git push -f dokku-sso $(shell git rev-parse HEAD):refs/heads/master
|
||||
|
||||
clean:
|
||||
rm -rf release
|
||||
rm -rf data
|
||||
|
Reference in New Issue
Block a user