Skip to content

Commit

Permalink
dockerized
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmark committed Feb 13, 2017
1 parent 7ec1e9e commit e0eba73
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:latest
MAINTAINER Mark Larah <markl@yelp.com>

RUN mkdir /code

COPY package.json /code/package.json
COPY bin /code/bin
COPY dist /code/dist

ENTRYPOINT ["/code/bin/entrypoint"]
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
export DOCKER_TAG ?= wafflebot-$(USER)

all: test

.PHONY: docker-build
docker-build:
docker build -t $(DOCKER_TAG) .

.PHONY: docker-run
docker-run: docker-build
docker run -it --rm --name $(DOCKER_TAG) \
-v "$(HOME)/.wafflebot":/root/.wafflebot \
$(DOCKER_TAG)

venv: Makefile requirements-dev.txt
rm -rf venv
virtualenv venv --python=python3
Expand Down
4 changes: 4 additions & 0 deletions bin/entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -eu
pushd /code
npm install --production
npm start

0 comments on commit e0eba73

Please sign in to comment.