2014-07-03 15:29:49 +00:00
|
|
|
DISABLE_CACHE = 'false'
|
|
|
|
|
2014-10-17 11:53:04 +00:00
|
|
|
ARCH = rpi# rpi/x86_64/i386
|
2014-07-03 15:29:49 +00:00
|
|
|
|
2015-02-11 17:21:10 +00:00
|
|
|
DEPLOY_REGISTRY = registry.resindev.io:5000
|
|
|
|
|
2014-07-03 15:29:49 +00:00
|
|
|
SUPERVISOR_VERSION = latest
|
|
|
|
|
|
|
|
all: supervisor
|
|
|
|
|
2015-02-03 17:10:37 +00:00
|
|
|
IMAGE = "resin/$(ARCH)-supervisor:$(SUPERVISOR_VERSION)"
|
2014-10-17 11:23:20 +00:00
|
|
|
|
|
|
|
clean:
|
2015-02-17 00:52:45 +00:00
|
|
|
-rm Dockerfile
|
2014-10-07 17:41:49 +00:00
|
|
|
|
2015-01-27 13:04:34 +00:00
|
|
|
supervisor:
|
2014-10-17 12:21:47 +00:00
|
|
|
cp Dockerfile.$(ARCH) Dockerfile
|
|
|
|
echo "ENV VERSION "`jq -r .version package.json` >> Dockerfile
|
|
|
|
docker build --no-cache=$(DISABLE_CACHE) -t resin/$(ARCH)-supervisor:$(SUPERVISOR_VERSION) .
|
2015-02-20 16:08:18 +00:00
|
|
|
-rm Dockerfile
|
2014-07-03 15:29:49 +00:00
|
|
|
|
2015-02-11 17:21:10 +00:00
|
|
|
deploy: supervisor
|
|
|
|
docker tag -f $(IMAGE) $(DEPLOY_REGISTRY)/$(IMAGE)
|
|
|
|
docker push $(DEPLOY_REGISTRY)/$(IMAGE)
|
|
|
|
|
2014-09-22 12:45:15 +00:00
|
|
|
run-supervisor-x86_64:
|
2015-01-14 17:00:13 +00:00
|
|
|
docker run --privileged -d -v /var/run/docker.sock:/run/docker.sock -v /boot/config.json:/boot/config.json -v /:/mnt/root -v /resin-data/resin-supervisor:/data -v /proc/net/fib_trie:/mnt/fib_trie -v /var/log/supervisor-log:/var/log -e API_ENDPOINT=https://staging.resin.io -e REGISTRY_ENDPOINT=registry.staging.resin.io -e PUBNUB_SUBSCRIBE_KEY=sub-c-bananas -e PUBNUB_PUBLISH_KEY=pub-c-bananas -e MIXPANEL_TOKEN=bananasbananas resin/x86_64-supervisor /start
|
2014-09-22 12:45:15 +00:00
|
|
|
run-supervisor-i386:
|
2015-01-14 17:00:13 +00:00
|
|
|
docker run --privileged -d -v /var/run/docker.sock:/run/docker.sock -v /boot/config.json:/boot/config.json -v /:/mnt/root -v /resin-data/resin-supervisor:/data -v /proc/net/fib_trie:/mnt/fib_trie -v /var/log/supervisor-log:/var/log -e API_ENDPOINT=https://staging.resin.io -e REGISTRY_ENDPOINT=registry.staging.resin.io -e PUBNUB_SUBSCRIBE_KEY=sub-c-bananas -e PUBNUB_PUBLISH_KEY=pub-c-bananas -e MIXPANEL_TOKEN=bananasbananas resin/i386-supervisor /start
|
2014-09-22 12:45:15 +00:00
|
|
|
|
2015-02-17 00:52:45 +00:00
|
|
|
.PHONY: supervisor deploy run-supervisor-x86_64 run-supervisor-i386
|