Skip to content

Instantly share code, notes, and snippets.

@chiefy chiefy/wercker.yml
Created Feb 3, 2016

Embed
What would you like to do?
wercker
dev:
box:
id: quay.io/oddnetworks/alpine-nodejs-builder
tag: 4.2.6
registry: https://quay.io
services:
- elasticsearch
steps:
- script:
name: export env
code: |
export ODD_ES_HOST=${ELASTICSEARCH_PORT_9200_TCP_ADDR}:9200
export NODE_ENV=development
- internal/watch:
code: node index.js
reload: true
build:
box:
id: alpine
cmd: /bin/sh
services:
- elasticsearch
steps:
- script:
name: npm install
code: |
apk update && apk add git build-base python krb5-dev nodejs && npm install && apk del build-base git python krb5-dev
- script:
name: export env
code: |
export ODD_ES_HOST=${ELASTICSEARCH_PORT_9200_TCP_ADDR}:9200
export NODE_ENV=test
- npm-test
- script:
name: copy files
code: |
cp $(which node) "$WERCKER_OUTPUT_DIR"
cp -RL node_modules config lib middleware lib public routes services config.js index.js odd-device-service.js package.json "$WERCKER_OUTPUT_DIR"
deploy:
box:
id: alpine
cmd: /bin/sh
steps:
- internal/docker-scratch-push:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
cmd: ./node ./index.js
tag: $WERCKER_GIT_COMMIT
ports: "8000"
repository: chiefy/odd-device-api
registry: https://registry.hub.docker.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.