diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..067877f1e --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,47 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/node:11 + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + + - run: yarn install + + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + + # run tests! + - run: yarn test + +deploy: + docker: + -image: buildpack-deps:trusty + steps: + - checkout: + - run: + name: Deploy Master to Heroku + command: | + git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git master + + workflows: + version: 2 + build-deploy: + jobs: + - build + - deploy: + requires: + - build + filters: + branches: + only: master + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..9a6c211be --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:11 +WORKDIR /dist +COPY package.json /dist +RUN npm install +COPY . /dist +CMD node server.js +EXPOSE 4000 \ No newline at end of file diff --git a/labreports/LAB.md b/ex/labreports/LAB.md similarity index 100% rename from labreports/LAB.md rename to ex/labreports/LAB.md diff --git a/labreports/LAB_INSTRUCTIONS.md b/ex/labreports/LAB_INSTRUCTIONS.md similarity index 100% rename from labreports/LAB_INSTRUCTIONS.md rename to ex/labreports/LAB_INSTRUCTIONS.md diff --git a/lab02screenshot.png b/lab02screenshot.png new file mode 100644 index 000000000..cb36be3f1 Binary files /dev/null and b/lab02screenshot.png differ diff --git a/labreport/2020-04-19-12-09-06.png b/labreport/2020-04-19-12-09-06.png new file mode 100644 index 000000000..b4fa0f85f Binary files /dev/null and b/labreport/2020-04-19-12-09-06.png differ diff --git a/labreport/2020-04-19-12-09-41.png b/labreport/2020-04-19-12-09-41.png new file mode 100644 index 000000000..97f5160e5 Binary files /dev/null and b/labreport/2020-04-19-12-09-41.png differ diff --git a/labreport/Labreport.md b/labreport/Labreport.md new file mode 100644 index 000000000..246cf5cc0 --- /dev/null +++ b/labreport/Labreport.md @@ -0,0 +1,22 @@ +Course: Messiah College CIS 411, Spring 2020
+Instructors: [Trevor Bunch](https://github.com/trevordbunch)
+Name: Matthew Coates
+GitHub: [slycatm2](https://github.com/slycatm2)
+Heroku App: https://cis411lab2-slycatm2.herokuapp.com/graphql
+1. Why would a containerized version of an application be +beneficial if you can run the application locally already? +Containerized versions can use memory, CPU usage and storage more efficiently +than running an application locally. Contrainerized software will also always +run the same regardless of the infrastructure used, which can't be said of +local apps. Lastly, it allows businesses to launch individual applications +without the need to rent an entire VM.
+ +2. If we have the ability to publish directly to Heroku, +why involve a CI solution like CircleCI? What benefit does it provide? +It shows whether or not your master pushes were successfully pushed to git or not.
+ +* A screenshot of the _Jobs_ list in CircleCI +![](2020-04-19-12-09-41.png) + +* A screenshot of the heroku app working. +![](2020-04-19-12-09-06.png) \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 485e285fb..f72acc3a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2857,6 +2857,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -3181,7 +3182,8 @@ "is-buffer": { "version": "1.1.6", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "is-builtin-module": { "version": "1.0.0", @@ -3265,6 +3267,7 @@ "version": "3.2.2", "bundled": true, "dev": true, + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -3311,7 +3314,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "lru-cache": { "version": "4.1.3", @@ -3577,7 +3581,8 @@ "repeat-string": { "version": "1.6.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "require-directory": { "version": "2.1.1",