mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-19 03:06:27 +00:00
Default PubNub and Mixpanel keys are now passed at build time
This commit is contained in:
parent
ae6b042318
commit
33d402c3c0
@ -1,3 +1,5 @@
|
||||
* Remove default Pubnub and Mixpanel keys as they are now passed at build time [Pablo]
|
||||
|
||||
# v1.1.0
|
||||
|
||||
* Switch back to using arch-based node images [Pablo]
|
||||
|
7
Makefile
7
Makefile
@ -12,6 +12,10 @@ all: supervisor
|
||||
IMAGE = "resin/$(ARCH)-supervisor:$(SUPERVISOR_VERSION)"
|
||||
SUPERVISOR_IMAGE=$(DEPLOY_REGISTRY)$(IMAGE)
|
||||
|
||||
PUBNUB_SUBSCRIBE_KEY = sub-c-bananas
|
||||
PUBNUB_PUBLISH_KEY = pub-c-bananas
|
||||
MIXPANEL_TOKEN = bananasbananas
|
||||
|
||||
ifeq ($(ARCH),rpi)
|
||||
GOARCH = arm
|
||||
endif
|
||||
@ -54,6 +58,9 @@ stop-supervisor:
|
||||
supervisor: gosuper
|
||||
cp Dockerfile.$(ARCH) Dockerfile
|
||||
echo "ENV VERSION "`jq -r .version package.json` >> Dockerfile
|
||||
echo "ENV PUBNUB_PUBLISH_KEY $(PUBNUB_PUBLISH_KEY)" >> Dockerfile
|
||||
echo "ENV PUBNUB_SUBSCRIBE_KEY $(PUBNUB_SUBSCRIBE_KEY)" >> Dockerfile
|
||||
echo "ENV MIXPANEL_TOKEN $(MIXPANEL_TOKEN)" >> Dockerfile
|
||||
docker build --no-cache=$(DISABLE_CACHE) -t $(IMAGE) .
|
||||
-rm Dockerfile
|
||||
|
||||
|
@ -12,5 +12,19 @@ docker pull resin/${ARCH}-supervisor:${ESCAPED_BRANCH_NAME} || docker pull resin
|
||||
make SUPERVISOR_VERSION=${VERSION} JOB_NAME=${JOB_NAME} test-gosuper
|
||||
|
||||
# Build the images
|
||||
make SUPERVISOR_VERSION=${ESCAPED_BRANCH_NAME} ARCH=${ARCH} JOB_NAME=${JOB_NAME} DEPLOY_REGISTRY= deploy
|
||||
make SUPERVISOR_VERSION=${VERSION} ARCH=${ARCH} JOB_NAME=${JOB_NAME} DEPLOY_REGISTRY= deploy
|
||||
make SUPERVISOR_VERSION=${ESCAPED_BRANCH_NAME} \
|
||||
ARCH=${ARCH} \
|
||||
JOB_NAME=${JOB_NAME} \
|
||||
DEPLOY_REGISTRY= \
|
||||
PUBNUB_SUBSCRIBE_KEY=${PUBNUB_SUBSCRIBE_KEY} \
|
||||
PUBNUB_PUBLISH_KEY=${PUBNUB_PUBLISH_KEY} \
|
||||
MIXPANEL_TOKEN=${MIXPANEL_TOKEN} \
|
||||
deploy
|
||||
make SUPERVISOR_VERSION=${VERSION} \
|
||||
ARCH=${ARCH} \
|
||||
JOB_NAME=${JOB_NAME} \
|
||||
DEPLOY_REGISTRY= \
|
||||
PUBNUB_SUBSCRIBE_KEY=${PUBNUB_SUBSCRIBE_KEY} \
|
||||
PUBNUB_PUBLISH_KEY=${PUBNUB_PUBLISH_KEY} \
|
||||
MIXPANEL_TOKEN=${MIXPANEL_TOKEN} \
|
||||
deploy
|
||||
|
@ -13,9 +13,9 @@ module.exports = config =
|
||||
gosuperAddress: "http://unix:#{process.env.GOSUPER_SOCKET}:"
|
||||
registryEndpoint: process.env.REGISTRY_ENDPOINT ? 'registry.resin.io'
|
||||
pubnub:
|
||||
subscribe_key: process.env.PUBNUB_SUBSCRIBE_KEY ? 'sub-c-bananas'
|
||||
publish_key: process.env.PUBNUB_PUBLISH_KEY ? 'pub-c-bananas'
|
||||
mixpanelToken: process.env.MIXPANEL_TOKEN ? 'bananasbananas'
|
||||
subscribe_key: process.env.PUBNUB_SUBSCRIBE_KEY ? ''
|
||||
publish_key: process.env.PUBNUB_PUBLISH_KEY ? ''
|
||||
mixpanelToken: process.env.MIXPANEL_TOKEN ? ''
|
||||
dockerSocket: process.env.DOCKER_SOCKET ? '/run/docker.sock'
|
||||
supervisorImage: process.env.SUPERVISOR_IMAGE ? 'resin/rpi-supervisor'
|
||||
configMountPoint: process.env.CONFIG_MOUNT_POINT ? '/mnt/mmcblk0p1/config.json'
|
||||
|
Loading…
Reference in New Issue
Block a user