Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab: Cloud Container slycatm2 #50

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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:[email protected]/$HEROKU_APP_NAME.git master

workflows:
version: 2
build-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master

7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:11
WORKDIR /dist
COPY package.json /dist
RUN npm install
COPY . /dist
CMD node server.js
EXPOSE 4000
File renamed without changes.
File renamed without changes.
Binary file added lab02screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labreport/2020-04-19-12-09-06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labreport/2020-04-19-12-09-41.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions labreport/Labreport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Course: Messiah College CIS 411, Spring 2020<br/>
Instructors: [Trevor Bunch](https://github.com/trevordbunch)<br/>
Name: Matthew Coates<br/>
GitHub: [slycatm2](https://github.com/slycatm2)<br/>
Heroku App: https://cis411lab2-slycatm2.herokuapp.com/graphql<br/>
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.<br/>

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. <br/>

* 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)
11 changes: 8 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.