Skip to content

david-codefresh/react-starter-kit

 
 

Repository files navigation

pipeline name Last build status
Build-first-image Codefresh build status
Build-codefresh-yml Codefresh build status

Setup your first service using Codefresh.

Step-by-step tutorial:

1. Fork this repo.

2. Login into codefresh using your github account.

3. Add your first service and build it.

Start by adding new service

Select the repo you just forked and click next

Select Dockerfile option

Click next

Review the Dockerfile, click next than

Click Build

4. Wait a bit until the build is done.

Make yourself a cup of coffee in the time we build an image for you

5. Open images and click 'lunch' and choose 'standalone'.

5. VOILÀ codefresh

Start using codefresh.yml

Using codefresh.yml you can customize your pipeline

Now when your first service is setup and your first pipeline produced an image, lets move forward and push the image to Dockerhub registry. We at Codefresh already build for you the basic codefresh.yml template, use it.

  • Click on your service react-starter-kit.
  • Switch to Use YML build.
  • Under Environment variables fill your Dockerhub credentials to be.
    • DOCKER_USER_NANE your Dockerhub user name
    • DOCKER_PASSWORD your Dockerhub password
  • Dont forget to encrypt them!
  • Save your updated pipeline
  • Build and launch
Full credit for the application react-starter-kit

Push your image to AWS-ECR

Requirements:

  • registry url
  • accessKeyId
  • secretAccessKey
  • region

How-to get the requirements

  • Go to Amazon console
  • Open EC2 Container Service
  • Open Respositories and create new one, in our case containers101/reactstarterkit
  • Create
  • Get the repository url and the region
  • Get the accessKeyId and the secretAccessKey from the console settings

####Configuration in Codefresh: We assume you already forked this repo and create a service for it

  • In ./codefresh.aws.ecr.example.yml change build_step config
    • image_name should be the new name of your repository.
    • Push your change
  • Open the service and add new pipeline
  • Switch to Use YML build
  • Change the YML File Location to be ./codefresh.aws.ecr.example.yml
  • Under Environment variables fill the next variables:
    • AWS_REGISTRY to be the registry url (note that the url already have the repository name)
    • AWS_ACCESS_KEY your access key id
    • AWS_SECRET_KEY your secret key
    • AWS_REGION the region of your registry Your screen should look like:

About

Codefresh.io image creation tutorial. Based on react-starter-kit.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 80.6%
  • CSS 19.4%