Created
November 8, 2016 23:18
-
-
Save davefinster/a3d6481a02aa8685a2f46e999e467aa2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJECT_NAME=myprojectname | |
DOCKER_NAMESPACE=myproject | |
JSLINT_ARGS=--node --nomen --indent=2 | |
JS_FILES=app.js lib/*/*.js | |
ROOT := $(shell pwd) | |
# | |
DOCKERRUN := docker run -it --rm \ | |
-v ${ROOT}:/usr/src/app \ | |
-v ${ROOT}/scripts/containerpilot_dev.json:/etc/containerpilot.json \ | |
-e CONSUL_ADDRESS=consul \ | |
-e CONSUL_ENVIRONMENT=development \ | |
--net="$(DOCKER_NAMESPACE)" \ | |
-p 6666:8080 \ | |
--name myprojectname | |
DOCKERFULLRUN := $(DOCKERRUN) ${PROJECT_NAME}_work_image | |
run: build/project_work_image waitForEnv | |
$(DOCKERRUN) ${PROJECT_NAME}_work_image node app.js | |
cmdrun: build/project_work_image waitForEnv | |
$(DOCKERRUN) -e "DB_ENV=TEST" --entrypoint=sh ${PROJECT_NAME}_work_image | |
npm: build/project_work_image waitForEnv | |
$(DOCKERRUN) --entrypoint="sh" ${PROJECT_NAME}_work_image -c "apk add --no-cache --virtual .npm-deps git python make gcc linux-headers alpine-sdk && /usr/bin/npm set progress=false && /usr/bin/npm install" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment