Skip to content

Codefresh

msushkevich edited this page Mar 5, 2016 · 16 revisions
  • [Sign in or sign up to your github account] (https://github.com).
  • Fork demo_nodejs_auth project to your github account.
  • Sign up or sign in to codefresh account using github.
  • From the Codefresh console, click the SERVICES option on the left.
  • Click ADD SERVICE.

image

image

  • On the tab Dockerfile clik on the NO, I DON’T HAVE A DOCKERFILEand choose the Node.js.

image

Three next steps are optional. You can skip them by clicking on the CREATE button during the previous step.

  • Click NEXT.

  • On the tab Customize you can change default Dockerfile and click NEXT.

  • On the tab Test you can specify optional bash script. This script will be run to test your code. Then click CREATE.

  • Review the results and click Close & Build. image

  • Click BUILDS on the left, in the sidebar navigation.

  • Click on the rocket icon to launch your newly built image in a container.

image

  • Demo application isn't launched. But don't worry:) Follow the next steps to fix it.

image

  • Click on your avatar in the upper right corner to pull down the menu and go to ACCOUNT MANAGEMENT to access your account settings.

image

  • Click INTEGRATIONand activate the docker hub integration.
  • If you don't have a docker hub account, you can create it from here.
  • Then enter your Docker Hub username and password in the fields to docker hub integration with codefresh and click SAVE.

image

  • Back to BUILDS on the left, in the sidebar navigation and click on the gear icon for your new Service.

image

  • You will see screen Pipelines

image

  • Click Push to Docker Registry and then click Docker Hub and click SAVE

image

  • Click COMPOSITIONS on the left, in the sidebar navigation click ADD NEW COMPOSITION.

image

  • Enter name for a new composition and click the + icon to add a service to the composition.
  • Select your service from the Pre-configured service option and click ADD.

image

  • Click the + icon to add another service to the composition and choose Pre-built image.
  • Type mongo into the field and click ADD.

image

  • Add a links line with the value of mongo. Your composition will look like the one below:
YOUR_COMPOSITION_NAME:
  image: YOUR_DOCKER_HUB_USERNAME/YOUR_DOCKER_HUB_REPO:master
  ports:
    - 5000
  links:
    - mongo
mongo:
  image: mongo

  • Click SAVE button.

image

  • Click the rocket icon to LAUNCH your composition.
  • Click on generated link to see demo_nodejs_auth application.

image

Clone this wiki locally