lumi-api/Makefile

37 lines
849 B
Makefile
Raw Normal View History

2019-04-05 22:44:06 +00:00
.DEFAULT_GOAL := all
d ?= api
c ?= $(shell date +%F | tr "-" ".")
r ?= $(shell git rev-list --count HEAD)
name = miniloom/$(d):$(c).$(r)
2019-04-06 21:35:44 +00:00
master_key := $(shell cat config/master.key)
2019-04-06 20:41:44 +00:00
doc:
./bin/yardoc --output-dir=./docs/ \
app/controllers/*.rb \
app/models/*.rb
2019-04-05 22:44:06 +00:00
clean:
rm -f log/*.log
rm -rf tmp/cache/assets
build:
2019-04-06 21:35:44 +00:00
docker build --build-arg MASTER_KEY=$(master_key) -t $(name) .
2019-04-05 22:44:06 +00:00
tag:
git tag $(c).$(r)
docker tag $(name) miniloom/$(d):latest
docker tag $(name) registry.forja.lainventoria.com.ar/$(name)
docker tag $(name) registry.forja.lainventoria.com.ar/miniloom/$(d):latest
push:
docker push registry.forja.lainventoria.com.ar/$(name)
docker push registry.forja.lainventoria.com.ar/miniloom/$(d):latest
2019-04-06 21:39:26 +00:00
run:
docker run -v $(PWD)/data:/srv/http/data \
-e RAILS_MASTER_KEY=$(master_key) $(name)
all: clean doc build tag