From 3b4b89c0e96b4107d6a66c4e34f2026ced692725 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 5 Jul 2016 00:03:48 +0100 Subject: [PATCH] Store ember app in 'app' folder --- .dockerignore | 2 +- .gitignore | 1 + Dockerfile | 2 +- Makefile | 12 ++++++++++++ circle.yml | 8 ++------ web/routes.go | 2 +- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.dockerignore b/.dockerignore index 9c2ae2db..9babcdb9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,3 @@ * -!gui +!app !surreal \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2f93a020..53b3ebd2 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ surreal.db # Other # ----------------------------------- +app/ dev/ vendor/ node_modules/ diff --git a/Dockerfile b/Dockerfile index b165576a..ef386348 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:3.4 RUN apk add --no-cache ca-certificates -ADD gui gui/ +ADD app app/ ADD surreal . EXPOSE 8000 33693 diff --git a/Makefile b/Makefile index 9d94dcb0..4568a238 100644 --- a/Makefile +++ b/Makefile @@ -99,3 +99,15 @@ install: clean install: glide install: CGO_ENABLED=0 $(GO) install -a -v -ldflags '$(LDF)' + +# The `make ember` command compiles +# the ember project, and outputs +# the build files in the app folder. + +.PHONY: ember +ember: + # npm install -g bower + # npm install -g ember-cli + cd gui && npm cache clean && bower cache clean + # cd gui && npm install && bower install + cd gui && ember build -prod -o ../app/ \ No newline at end of file diff --git a/circle.yml b/circle.yml index 5111eeca..fa4fe2b9 100644 --- a/circle.yml +++ b/circle.yml @@ -32,12 +32,7 @@ checkout: dependencies: override: - - cd gui/ - - npm install -g bower - - npm install -g ember-cli - - npm cache clean && bower cache clean - - npm install && bower install - - ember build -prod + - docker info - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - go get -u github.com/Masterminds/glide @@ -47,6 +42,7 @@ test: override: - make test - make build + - make ember - docker build -t abcum/surreal . - docker run -d abcum/surreal start; sleep 15 diff --git a/web/routes.go b/web/routes.go index d1a2ee06..a24ba78e 100644 --- a/web/routes.go +++ b/web/routes.go @@ -34,7 +34,7 @@ func output(c *fibre.Context, res interface{}) error { func routes(s *fibre.Fibre) { - s.Dir("/", "gui/dist/") + s.Dir("/", "app/") // -------------------------------------------------- // Endpoint for health checks