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

Check #10

Open
wants to merge 195 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
467c27c
removing expose fro Dockerfile
May 4, 2016
ec54504
change order of commands in Dockerfile
May 4, 2016
bc46ff6
updating less module in package.json
May 9, 2016
2bf04b0
Update README.md
bmeiri Jun 21, 2016
387d856
Update README.md
bmeiri Jun 21, 2016
f4bea46
adding docker-compose
Aug 13, 2016
c6c36e6
adding codefresh.yml
Sep 20, 2016
465d19d
change node version
Sep 20, 2016
bc67b6a
change node version
Sep 20, 2016
7752270
change node version
Sep 20, 2016
8afaf3e
Update defaults.yml
advance512-demo Oct 5, 2016
df77655
Update defaults.yml
advance512-demo Oct 5, 2016
21478af
Create settings.yml
advance512-demo Oct 5, 2016
7d28cee
Added multiple connection tries
advance512-demo Oct 6, 2016
f7f585c
Update app.js
advance512-demo Oct 6, 2016
cabb8c9
Updating app.js
advance512-demo Oct 6, 2016
53cfaa4
Calling tryConnect()..
advance512-demo Oct 6, 2016
fa7b383
Deleting settings.yml
advance512-demo Oct 6, 2016
56bc5a0
Merge pull request #1 from advance512-demo/master
Superfresh Oct 9, 2016
93fce75
modify yaml
verchol Nov 14, 2016
8dadac2
new yaml
verchol Nov 14, 2016
2d4414d
new yaml
verchol Nov 14, 2016
774673c
new yaml
verchol Nov 14, 2016
4b5687c
remove npm from yaml
verchol Nov 14, 2016
6c677b7
remove npm from yaml
verchol Nov 14, 2016
184429a
run with composition
verchol Nov 14, 2016
23bf354
run with composition
verchol Nov 14, 2016
53c9369
add CD
verchol Nov 14, 2016
96063f7
add staging
verchol Nov 14, 2016
e3a5413
fix codefreshCD
verchol Nov 14, 2016
7700972
add push
verchol Nov 14, 2016
06f96b8
add push
verchol Nov 14, 2016
b49118d
add push
verchol Nov 14, 2016
a35bd2d
fix yaml
verchol Nov 14, 2016
e283c88
fix
verchol Nov 14, 2016
6eec5a3
hotfix
verchol Nov 14, 2016
febacce
Merge branch 'devtlv' into staging
verchol Nov 14, 2016
07f46c3
yaml file
verchol Nov 14, 2016
dbfecd0
add staff
verchol Nov 14, 2016
5416a94
add staff
verchol Nov 14, 2016
eafbac1
add hotfix
verchol Nov 14, 2016
c17e68c
add hotfix
verchol Nov 14, 2016
6363c11
add hotfix
verchol Nov 14, 2016
277d97f
add hotfix1
verchol Nov 14, 2016
cd85546
add hotfix2
verchol Nov 14, 2016
08c742b
add hotfix4
verchol Nov 14, 2016
8d0e394
add hotfix5
verchol Nov 14, 2016
ebc04a7
add codefreshdev
verchol Nov 14, 2016
75948cc
change the title
verchol Nov 14, 2016
24e148c
add production filter to ecs
verchol Nov 14, 2016
fa75451
add integration tests
verchol Nov 14, 2016
84f6587
add integration tests
verchol Nov 14, 2016
94a8fa4
Update codefresh.yml
Superfresh Nov 15, 2016
06297cf
update yaml
Superfresh Nov 15, 2016
6e778e8
my new feature
Nov 15, 2016
f55212f
remove integrations
Superfresh Nov 15, 2016
9ccc19b
Merge branch 'master' of github.com:containers101/demochat into devcon
Nov 15, 2016
9f45699
update
Superfresh Nov 15, 2016
521b19e
Merge branch 'master' of github.com:containers101/demochat
Nov 15, 2016
65285e2
back to default
Nov 15, 2016
9c8a45b
my feature
Nov 15, 2016
e6063f3
fix titles
Superfresh Nov 23, 2016
b203274
Change the header
Superfresh Nov 23, 2016
97e0798
title
Superfresh Nov 23, 2016
a23eb61
remove underscore
Superfresh Nov 23, 2016
6b5edce
Change the title
Superfresh Nov 23, 2016
00c58dd
Merge pull request #2 from containers101/chat-webinar
Superfresh Nov 23, 2016
7454a3a
Test commit
Superfresh Nov 30, 2016
621b5af
Update login.html
Superfresh Nov 30, 2016
2abd988
changed the title
Superfresh Nov 30, 2016
aae52a8
Update login.html
Superfresh Nov 30, 2016
e25b9e9
Update login.html
Superfresh Nov 30, 2016
c353ed9
Update login.html
Superfresh Nov 30, 2016
6bb61d3
new title - don't PUSH
Superfresh Nov 30, 2016
92a4157
Doing it
Superfresh Nov 30, 2016
7e1f5f8
Update README.md
bmeiri Nov 30, 2016
2ebef7b
Update login.html
Superfresh Nov 30, 2016
db30d8e
Update login.html
Superfresh Nov 30, 2016
ecc8164
Update README.md
itai-codefresh Nov 30, 2016
c6da32c
Update login.html
Superfresh Nov 30, 2016
a6e1ff1
Update README.md
itai-codefresh Nov 30, 2016
e9541ac
Update login.html
Superfresh Nov 30, 2016
4dce04b
Eric commit msg
Superfresh Nov 30, 2016
4ed090a
name change on production
Superfresh Nov 30, 2016
02b8d04
Push to master
Superfresh Dec 1, 2016
f5f8c4c
Update login.html
Superfresh Dec 1, 2016
13c4bb1
Daniel title
Superfresh Dec 1, 2016
564a057
Update login.html
Superfresh Dec 1, 2016
d599d14
Release 1.2 - Phil
Superfresh Dec 1, 2016
6c65822
Update login.html
Superfresh Dec 1, 2016
e1941a6
Adding Ben to Codefresh
Superfresh Dec 2, 2016
24c8195
Update login.html
Superfresh Dec 2, 2016
b90eb61
Update login.html
Superfresh Dec 2, 2016
6ed47b3
Update login.html
Superfresh Dec 7, 2016
84a2c99
Merge pull request #3 from containers101/dan
Razielt77 Dec 8, 2016
4cf2ac2
fix migration
verchol Dec 28, 2016
e591c2a
fix wrong mongo url
verchol Jan 4, 2017
83205bd
Update README.md
Razielt77 Jan 18, 2017
d17e378
Update README.md
Razielt77 Jan 18, 2017
c7ffa86
add mongo db test
verchol Feb 10, 2017
9c0be29
Update codefresh.yml
bmeiri Feb 10, 2017
29e6097
second build should be much faster
verchol Mar 8, 2017
d479476
Update login.html
Superfresh Mar 14, 2017
6ff3f7a
Update codefresh.yml
Superfresh Mar 14, 2017
383ac9e
Merge pull request #6 from containers101/raziel
Superfresh Mar 14, 2017
cfbf69f
Update docker-compose.yml
Superfresh Mar 14, 2017
9d372a8
Update login.html
Superfresh Mar 14, 2017
8b797e5
Merge pull request #7 from containers101/raziel
Superfresh Mar 14, 2017
dd36f50
Update login.html
Superfresh Mar 14, 2017
b98fb66
Merge pull request #8 from containers101/chegg
Superfresh Mar 14, 2017
4456500
Update login.html
Superfresh Mar 15, 2017
c2cc9aa
Merge pull request #9 from containers101/razielbranch
Superfresh Mar 15, 2017
87f1dd4
redeploy to ecs
nIvanovp Mar 17, 2017
dee53eb
Update login.html
Superfresh Mar 30, 2017
462a837
Update codefresh.yml
Superfresh Mar 31, 2017
50035be
Update codefresh.yml
Superfresh Mar 31, 2017
feac878
add connection
verchol Apr 3, 2017
d3ae3c0
fix package json
verchol Apr 3, 2017
02b2142
Update docker-compose.yml
Superfresh Apr 3, 2017
4eb1cf7
Update docker-compose.yml
Razielt77 Apr 3, 2017
b5b3161
add retry mechaninsm
verchol Apr 4, 2017
bf49980
add retry mechaninsm
verchol Apr 4, 2017
1772f45
remove prestart
verchol Apr 4, 2017
413fc9d
Update README.md
Superfresh Apr 4, 2017
de81001
Merge pull request #10 from containers101/fix_mongo_connection
verchol Apr 4, 2017
c23f939
update to latest node
verchol Apr 4, 2017
a8447d5
Merge pull request #11 from containers101/update_docker
verchol Apr 4, 2017
dde43f0
Update docker-compose.yml
Superfresh Apr 4, 2017
b2d41d8
Update README.md
Superfresh Apr 4, 2017
e200847
Update docker-compose.yml
Razielt77 Apr 4, 2017
384ecb0
fix unit mongo test
verchol Apr 5, 2017
4523d3b
Merge pull request #12 from containers101/update_unit_tests
verchol Apr 5, 2017
70ae89b
skip tests
verchol Apr 5, 2017
15af369
Merge pull request #13 from containers101/update_unit_tests
verchol Apr 5, 2017
5bcd15e
added ecs deploy
kosta-codefresh Apr 15, 2017
ef69f04
added ecs deploy
kosta-codefresh Apr 15, 2017
d489be2
added ecs deploy
kosta-codefresh Apr 15, 2017
65cea13
added ecs deploy
kosta-codefresh Apr 15, 2017
9e4586f
Update codefresh.yaml
itai-codefresh Apr 18, 2017
e720b5a
Update codefresh.yml
itai-codefresh Apr 18, 2017
d0d763b
Update codefresh.yml
itai-codefresh Apr 18, 2017
48b6816
Update codefresh.yml
itai-codefresh Apr 18, 2017
c7e437f
Update codefresh.yml
itai-codefresh Apr 18, 2017
3274b3d
Update codefresh.yml
itai-codefresh Apr 18, 2017
66f2733
added kubernetes deploy
kosta-codefresh Apr 18, 2017
daab6aa
added kubernetes deploy
kosta-codefresh Apr 18, 2017
5ae1063
kube-deployment.yml
kosta-codefresh Apr 19, 2017
01c7e40
kube-deployment.yml
kosta-codefresh Apr 19, 2017
d265a89
test commit 1
kosta-codefresh Apr 19, 2017
ee34ad3
test commit 2
kosta-codefresh Apr 19, 2017
013a8ff
test commit 3
kosta-codefresh Apr 19, 2017
7d0e790
test commit 3
kosta-codefresh Apr 19, 2017
674be23
test commit 4
kosta-codefresh Apr 19, 2017
cf33155
test commit 5
kosta-codefresh Apr 19, 2017
4f13c1c
test commit 5
kosta-codefresh Apr 19, 2017
d37b5e4
merged with deploy-demo
kosta-codefresh Apr 19, 2017
9d397fb
Update login.html
itai-codefresh Apr 19, 2017
58923bd
update
itai-codefresh Apr 19, 2017
f8d59fd
deploy to k8
itai-codefresh Apr 19, 2017
59659b3
Update login.html
itai-codefresh Apr 19, 2017
ee271ed
test commit
itai-codefresh Apr 19, 2017
3efd93c
Update login.html
itai-codefresh Apr 19, 2017
0b9b856
Update login.html
itai-codefresh Apr 19, 2017
1af9eb5
Update login.html
itai-codefresh Apr 19, 2017
01c07af
Demo for Axway
verchol Apr 19, 2017
0a44772
Post DockerCon Cleanup
Superfresh Apr 21, 2017
25c11c2
Update codefresh.yml
Superfresh Apr 27, 2017
557ef57
Update mongo.unit.spec.js
Razielt77 Apr 27, 2017
ddd5014
Update Dockerfile
Superfresh Apr 27, 2017
d3f4274
deploy/kube-deployment.yml - moved to /deployment.yml
kosta-codefresh May 9, 2017
1d3b81e
Change codefresh yml to use composition test
roy-codefresh May 24, 2017
e3263ea
Update deployment.yml
verchol Jun 7, 2017
ddc088d
Create login.html
Superfresh Jun 15, 2017
4aa09e8
add helm variable
Jun 19, 2017
d7455ee
Update login.html
Superfresh Jun 20, 2017
1df419c
Update Dockerfile
Superfresh Jun 21, 2017
26c2b74
mongo dockerfile
Jun 28, 2017
a48d599
Update Dockerfile
Superfresh Jun 29, 2017
0405503
Update login.html
Superfresh Jun 30, 2017
0bec296
add yaml
Jul 3, 2017
37b799d
add annotation
Jul 3, 2017
8abfad4
add annotation
Jul 3, 2017
63b04ad
add annotation
Jul 3, 2017
bb0f1ec
add annotation
Jul 3, 2017
b0e7332
add annotation
Jul 3, 2017
206289d
add annotation
Jul 3, 2017
6ec4b6b
updated the readme: codefresh registry
nIvanovp Jul 5, 2017
f06ab48
Update login.html
Superfresh Jul 6, 2017
ef9fb7a
Update login.html
Superfresh Jul 6, 2017
a43da88
Update README.md
Superfresh Jul 6, 2017
ea0d1a9
Update README.md
Superfresh Jul 6, 2017
86431b4
Update login.html
Superfresh Jul 20, 2017
fbd7bcc
update
itai-codefresh Aug 8, 2017
398156e
Update .dockerignore
itai-codefresh Aug 8, 2017
c9b7c49
Update Dockerfile
itai-codefresh Aug 8, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
settings.yml
settings.js
node_modules
bower_components


npm-debug.log
.DS_Store
.idea
Expand Down
21 changes: 8 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
FROM node:0.10-slim
# Change latest to your desired node version (https://hub.docker.com/r/library/node/tags/)
FROM node:7.10

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY ./package.json /src/package.json
RUN cd /src && npm install
COPY ./ /src
RUN npm install -g mocha
RUN npm install -g istanbul
RUN npm install -g gulp
COPY package.json /usr/src/app/
COPY . /usr/src/app
RUN npm install

WORKDIR /src
#ENV DEBUG=*

EXPOSE 8080 5222

CMD ["npm", "start"]
CMD [ "npm", "start" ]
11 changes: 11 additions & 0 deletions Dockerfile.latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Change latest to your desired node version (https://hub.docker.com/r/library/node/tags/)
FROM node:latest

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY package.json /usr/src/app/
RUN npm install --silent
COPY . /usr/src/app

CMD [ "npm", "start" ]
12 changes: 12 additions & 0 deletions Dockerfile_prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:0.10-slim

COPY ./package.json /src/package.json
RUN cd /src && npm install
COPY ./ /src

WORKDIR /src
#ENV DEBUG=*


CMD ["npm", "start"]

164 changes: 158 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
Build status: [![Codefresh build status]( https://g.codefresh.io/api/badges/build?repoOwner=containers101&repoName=demochat&branch=master&pipelineName=demochatdfdf&accountName=Razielt77_github&type=cf-1)]( https://g.codefresh.io/repositories/containers101/demochat/builds?filter=trigger:build;branch:master;service:58543cb490a3f40100db408f~demochatdfdf)
Demo for Axway
![Let's Chat Greylock](http://i.imgur.com/0a3l5VF.png)
#test1
#test2
![Screenshot](http://i.imgur.com/C4uMD67.png)
Test Test
A self-hosted chat app for small teams or big Gal by [Security Compass][seccom].

[![Build Status](https://travis-ci.org/sdelements/lets-chat.svg?branch=master)](https://travis-ci.org/sdelements/lets-chat)
[![Dependency Status](https://david-dm.org/sdelements/lets-chat.svg)](https://david-dm.org/sdelements/lets-chat)
[![devDependency Status](https://david-dm.org/sdelements/lets-chat/dev-status.svg)](https://david-dm.org/sdelements/lets-chat#info=devDependencies)


## Features and Stuff

Expand Down Expand Up @@ -91,3 +88,158 @@ Released under [the MIT license][license].
[install-docker]: https://registry.hub.docker.com/u/sdelements/lets-chat/
[install-heroku]: https://github.com/sdelements/lets-chat/wiki/Heroku
[install-vagrant]: https://github.com/sdelements/lets-chat/wiki/Vagrant





![Let's Chat Greylock](https://codefresh.io/wp-content/uploads/2017/03/lets-chat.png)


Use this tutorial to familiarize yourself with codefresh.yml file and Codefresh functionality.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/11.png)


This tutorial is based on Let’s Chat [app].

https://github.com/containers101/demochat

### Let’s Chat is self-hosted chat app for small teams or big

This tutorial will walk you through the process of adding the following :


* Build step - that will build Docker image for your Let’s Chat app

* Push to registry step - that will push your image to Docker Hub

* Unit Test step - A freestyle step that runs the unit test of the demo chat after the build

* Composition step - This step will create and launch a composition.

So, the first thing you need to do is :

## Fork our repo

Enter the following link and fork Let’s Chat app!: ```https://github.com/containers101/demochat```


## Add a service
Now enter Codefresh and add your Let’s Chat app as a Codefresh service.

Click on ___Add Repository___

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/add-repo.png)


Now add your forked demochat repo. You can search for it by typing "demochat" to search. You can also Add by URL here.

Also, choose the branch for your first build (in this case ```master```)

When you finish press ___Next___.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/select-repo2.png)


Select how you would like to setup your repository. In this case, our repo has a ___Dockerfile___, so we'll select the middle option.


![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/15.png)

By default, Codefresh searches for your Dockerfile at the root level of your repository, by the name "Dockerfile". The demo-chat example includes a Dockerfile in the root level.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/16.png)


Review your Dockerfile, and click ___Create___ to add your repository.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/17.png)

Clicking on ___Build___ button will trigger a regular build.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/18.png)

Great, you are running your build for the first time!

## Push your image to Docker registry
In Codefresh the build images will be automatically pushed to Codefresh registry and there’s no need to specify the [Codefresh Docker Registry](https://docs.codefresh.io/v1.0/docs/codefresh-registry) for the block __Push to Docker Registry__ in the pipeline of repository and you can just skip this step.

Click on ___Repositories___, and then click on the ___Pipelines___ gear.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/19.png)

Scroll down to ___Workflow___, and you will see a ___Push to Docker___ button. If you have set up your credentials, click ___Save___ at the bottom of the screen. Otherwise- click on the ___integration page___ link.

Write your User/Password info, and click ___Save___ to connect.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/20.png)


## Unit test your image
Let's head over to ___Piplines___ again.
![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/19.png)

Scroll down to Workflow under ___Build and Unit Test___

We'll type in ```echo $(date)``` in the Unit Test Script area. This will print the date, and we'll be able to see our test in action.

Let's click ___Save___, and ___Build___ to see it in action.

Great- the date has been printed!

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/22.png)


Now let's add a full composition that also contains mongo db.


## Add composition

Our Let's Chat app needs mongo in order to work, so let's add it!

You can read more about compositions in our docs, but we will also walk through the process here :
https://docs.codefresh.io/docs/create-composition


Click the ___Composition___ view icon in the left pane, and click the ___Add Composition___.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/1.png)

Choose a name for your composition

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/2.png)

We are going to build our comp from scrath, so click ___Empty Composition___

![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/empty_comp.png)

Now we will click ___Add Service___ and add demochat, the port (50000), and mongo.
Everything looks good here- so let's go ahead and launch by clicking the rocket ship...

![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/savelaunch_final.png)


Once it has completed, a link to our app will be displayed. Let's click it to see if it worked.


![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/completed_in.png)

Success! We have successfully launched a composition.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/10.png)






[app]: https://github.com/containers101/demochat

## About Containers 101

[Containers 101](https://www.meetup.com/Containers-101-meetup/) is online/offline meetup group based in Mountain View that provides guides and helps developers work with Containers. Created by [Codefresh](https://codefresh.io/) which provides environments for every commit, Docker CI and CD, and an embedded registry.

[Join Containers 101](https://www.meetup.com/Containers-101-meetup/)
Learn more about [Codefresh](https://codefresh.io/)

46 changes: 46 additions & 0 deletions annotation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: '1.0'
steps:
BuildingDockerImage:
title: Building Docker Image
type: build
image_name: containers101/demochat
working_directory: ./
dockerfile: Dockerfile
metadata: # Declare the metadata attribute
set: # Specify the set operation
- Unit_Test: true
- API_Test: true
- Ave_Res_Time: 2 msec
- Packet_Loss: 0
- Security: true
RunningUnitTests:
title: Running Unit Tests
type: composition
composition: 5959cfa8e82afd0001bb2f1c
composition_candidates:
demochat:
image: '${{BuildingDockerImage}}'
entrypoint: sh /codefresh/volume/cf-generated/unit_test_script
volumes:
- '${{CF_VOLUME_NAME}}:/codefresh/volume'
add_flow_volume_to_composition: true
create_file:
path: /codefresh/volume/cf-generated
name: unit_test_script
content: npm test
on_success:
metadata:
set:
- '${{BuildingDockerImage.imageId}}':
- CF_QUALITY: true
# - Unit Test: true
# - API Test: true
# - Performance: Average Response Time 2msec
# - Performance: 0 Packet Loss
# - Security: true
on_fail:
metadata:
set:
- '${{BuildingDockerImage.imageId}}':
- CF_QUALITY: false

Loading