From 1f064d1f4e35633203464f36ac015959632c6450 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Sun, 5 Nov 2017 11:52:36 +0000 Subject: [PATCH] rename server to api --- .circleci/config.yml | 27 +++++++++++++++++++++++++++ {server => api}/bookshelf.js | 0 {server => api}/index.js | 0 {server => api}/io/connection.js | 0 {server => api}/io/content/routes.js | 0 {server => api}/io/engine/routes.js | 0 {server => api}/io/graphic/model.js | 0 {server => api}/io/graphic/routes.js | 0 {server => api}/io/preset/model.js | 0 {server => api}/io/preset/routes.js | 0 {server => api}/io/router.js | 0 {server => api}/koa.js | 0 {server => api}/middlewares.js | 0 index.js | 2 +- 14 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .circleci/config.yml rename {server => api}/bookshelf.js (100%) rename {server => api}/index.js (100%) rename {server => api}/io/connection.js (100%) rename {server => api}/io/content/routes.js (100%) rename {server => api}/io/engine/routes.js (100%) rename {server => api}/io/graphic/model.js (100%) rename {server => api}/io/graphic/routes.js (100%) rename {server => api}/io/preset/model.js (100%) rename {server => api}/io/preset/routes.js (100%) rename {server => api}/io/router.js (100%) rename {server => api}/koa.js (100%) rename {server => api}/middlewares.js (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..75606db --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,27 @@ +version: 2 +jobs: + build: + docker: + - image: docker:17.05.0-ce-git + working_directory: ~/caspar-sup + steps: + - checkout + - setup_remote_docker + - run: + name: Build docker image + command: docker build -t nfpis/caspar-sup:build_${CIRCLE_BUILD_NUM} -t nfpis/caspar-sup:${CIRCLE_SHA1} -t nfpis/caspar-sup:latest . + - run: + name: Push to docker + command: | + docker login -u $DOCKER_USER -p $DOCKER_PASS + docker push nfpis/caspar-sup + - deploy: + name: Deploy to production + command: | + echo Not implemented +workflows: + version: 2 + build_deploy: + jobs: + - build: + context: org-global diff --git a/server/bookshelf.js b/api/bookshelf.js similarity index 100% rename from server/bookshelf.js rename to api/bookshelf.js diff --git a/server/index.js b/api/index.js similarity index 100% rename from server/index.js rename to api/index.js diff --git a/server/io/connection.js b/api/io/connection.js similarity index 100% rename from server/io/connection.js rename to api/io/connection.js diff --git a/server/io/content/routes.js b/api/io/content/routes.js similarity index 100% rename from server/io/content/routes.js rename to api/io/content/routes.js diff --git a/server/io/engine/routes.js b/api/io/engine/routes.js similarity index 100% rename from server/io/engine/routes.js rename to api/io/engine/routes.js diff --git a/server/io/graphic/model.js b/api/io/graphic/model.js similarity index 100% rename from server/io/graphic/model.js rename to api/io/graphic/model.js diff --git a/server/io/graphic/routes.js b/api/io/graphic/routes.js similarity index 100% rename from server/io/graphic/routes.js rename to api/io/graphic/routes.js diff --git a/server/io/preset/model.js b/api/io/preset/model.js similarity index 100% rename from server/io/preset/model.js rename to api/io/preset/model.js diff --git a/server/io/preset/routes.js b/api/io/preset/routes.js similarity index 100% rename from server/io/preset/routes.js rename to api/io/preset/routes.js diff --git a/server/io/router.js b/api/io/router.js similarity index 100% rename from server/io/router.js rename to api/io/router.js diff --git a/server/koa.js b/api/koa.js similarity index 100% rename from server/koa.js rename to api/koa.js diff --git a/server/middlewares.js b/api/middlewares.js similarity index 100% rename from server/middlewares.js rename to api/middlewares.js diff --git a/index.js b/index.js index 0a08fff..fe17d2d 100644 --- a/index.js +++ b/index.js @@ -31,7 +31,7 @@ log.info('Running database integrity scan.') let setup = require('./script/setup') setup().then(() => { - require('./server') + require('./api') }).catch((error) => { log.error(error, 'Error while preparing database') process.exit(1)