Skip to content

Commit

Permalink
Update docker to include templates and statics
Browse files Browse the repository at this point in the history
  • Loading branch information
Rickard Dybeck committed Nov 11, 2015
1 parent 83751de commit e97725f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
eremetic
eremetic.yml
docker/static
docker/templates
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all deps test docker
.PHONY: all deps test docker copy_templates

DOCKERTAG?=eremetic
SRC=$(shell find . -name '*.go')
Expand All @@ -18,5 +18,9 @@ eremetic: ${SRC}
docker/eremetic: ${SRC}
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o $@

docker: docker/eremetic
copy_templates:
cp -r static docker
cp -r templates docker

docker: docker/eremetic copy_templates
docker build -t ${DOCKERTAG} docker
9 changes: 8 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
FROM alpine:3.2
COPY eremetic /bin/eremetic

RUN mkdir -p /opt/eremetic

COPY eremetic /opt/eremetic/eremetic
COPY static /opt/eremetic/static
COPY templates /opt/eremetic/templates
COPY marathon.sh /marathon.sh

WORKDIR /opt/eremetic
CMD [ "/marathon.sh" ]
2 changes: 1 addition & 1 deletion docker/marathon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export MESSENGER_ADDRESS=`lookup_host ${HOST}${DOMAIN:+.$DOMAIN}`
export MESSENGER_PORT=$PORT1


exec /bin/eremetic
exec /opt/eremetic/eremetic

0 comments on commit e97725f

Please sign in to comment.