Giter Club home page Giter Club logo

demochat's Introduction

Let's Chat Greylock

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

Screenshot

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

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

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

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

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

Screenshot

Clicking on Build button will trigger a regular build.

Screenshot

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

Push your image to Docker registry

Click on Repositories, and then click on the Pipelines gear.

Screenshot

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

Unit test your image

Let's head over to Piplines again. Screenshot

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

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

Choose a name for your composition

Screenshot

We are going to build our comp from scrath, so click Empty Composition

Screenshot

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

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

Screenshot

Success! We have successfully launched a composition.

Screenshot

demochat's People

Contributors

superfresh avatar verchol avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.