Giter VIP home page Giter VIP logo

react-redux-boilerplate's Introduction

react-redux-boilerplate

CircleCI

Setup

# use node version in .nvmrc
nvm use

# install packages
yarn install

# run development
yarn start

# verify style
yarn run lint

# format code
yarn run format

# build distribution
yarn build

Docker

# build image
docker build \
  -t brightwindanalysis/react-redux-boilerplate:latest \
  -f docker/Dockerfile .

# start temporary container
docker run \
  --rm \
  -p 8080:80 \
  --name react-redux-boilerplate \
  brightwindanalysis/react-redux-boilerplate

# access container
docker exec -it react-redux-boilerplate sh

Continuous integration and deployment

Requirements for deployment on AWS

  • two EC2 instances (dev/prod) e.g. ec2-000-000-000-000.AWS_REGION.compute.amazonaws.com
  • EC2 Container Registry configured e.g. AWS_ACCOUNT_ID.dkr.ecr.AWS_REGION.amazonaws.com/react-redux-boilerplate
  • Credentials (Access Key ID and Secret Access Key) of a unique IAM user with AmazonEC2ContainerRegistryPowerUser permission to push on the registry

CircleCI v2 setup

  • add the repository to CircleCI
  • AWS CodeDeploy: set the AWS keypair (Access Key ID and Secret Access Key)
  • SSH Permissions: add a private key (PEM) to deploy to the EC2 machine
  • Chat Notifications: set a Webhook URL for Slack to get a notification on each build

Configure the following CircleCI Environment Variables:

  • AWS_ACCOUNT_ID (registry)
  • AWS_REGION e.g. eu-west-1 (without a/b/c)
  • EC2_USERNAME_DEV and EC2_USERNAME_PROD
  • EC2_HOST_DEV and EC2_HOST_PROD e.g. ec2-000-000-000-000.AWS_REGION.compute.amazonaws.com
  • HTTP_PORT_DEV and HTTP_PORT_PROD e.g. 8080

Deployment

  • a push on the master branch trigger a build and a deployment in DEV
  • a push of a tag starting with v trigger a deploy in PROD of the latest image available

Local deployment (skip CircleCI)

./script/local/local_registry.sh
./script/local/local_deploy.sh

Documentation

react-redux-boilerplate's People

Contributors

niqdev avatar

Watchers

 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.