Permalink
Browse files

dockerized

  • Loading branch information...
adrw committed Feb 25, 2017
1 parent 1a8f3cf commit 29afc7551e916c580698271f57eb2156150c0067
Showing with 44 additions and 0 deletions.
  1. +31 −0 Makefile
  2. +13 −0 docker-compose.yml
@@ -0,0 +1,31 @@
DOCKER_COMPOSE=$(shell which docker-compose)
DOCKER_COMPOSE_TARGETS=-f docker-compose.yml

define DOCKER_NICE
trap '$(DOCKER_COMPOSE) $(DOCKER_COMPOSE_TARGETS) down' SIGINT SIGTERM && \
$(DOCKER_COMPOSE) $(DOCKER_COMPOSE_TARGETS)
endef

export DOCKER_NICE

default: run

init:

build: init
bash -c "$$DOCKER_NICE build"

rebuild: init
bash -c "$$DOCKER_NICE build --no-cache"

compile: init
bash -c "$$DOCKER_NICE run app webpack"

run: init
bash -c "$$DOCKER_NICE up"

.PHONY: init
.PHONY: build
.PHONY: rebuild
.PHONY: compile
.PHONY: run
@@ -0,0 +1,13 @@
version: '2'
services:

api:
image: jekyll/jekyll
container_name: andrewparadi_github_io
volumes:
- ./:/src
working_dir: /src
command: bash -c 'jekyll serve -s /src --watch'
ports:
- "4000:4000"
- "80:4000"

0 comments on commit 29afc75

Please sign in to comment.