Giter Site home page Giter Site logo

ansible-react's Introduction

ansible-react

Build Status

Install and configure react apps.

This is a simple and straight-to-the-point role to install react apps. it is tested against apps that were created using create react app.

We only install and configure:

  • node
  • yarn
  • and of course all the javascript packages that your project uses

We intentionally consider the installation and configuration of web servers, and other things as out of scope for this role. Therefore, naturally this role is to be used in a playbook that installs and configures those other things, if you need them.

Role Variables

Some of the more important variables are briefly described below. You can see all variables by looking at the defaults/main.yml file.

react_system_user: "react"  # name of the user that will own the django installation
react_node_version: 10.x  # the version of node to install

react_git_url: "https://github.com/onaio/kaznet-frontend.git"  # the git repo of your django app which we are installing
react_git_key:

react_remote_js_build: # whether to compile the app on the target host or on the controlling host. 
# When compiling the app on the controlling host, you will need to make sure that node and yarn is installed.

Custom environment variables

Create react app supports custom environment variables and this role does too!

You can set custom environment variables by using the react_app_settings variable, like so:

react_app_settings:
    REACT_APP_WEBSITE_NAME: 'Example App'
    SOMETHING_ELSE: "you can put anything here"

Testing

This project comes with a Vagrantfile, this is a fast and easy way to test changes to the role, fire it up with vagrant up.

See vagrant docs for getting setup with vagrant

License

Apache 2

Authors

Ona Engineering

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.