Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onaio/ansible-react
Install and configure React apps
https://github.com/onaio/ansible-react
ansible ansible-react ansible-role ansible-roles react
Last synced: 26 days ago
JSON representation
Install and configure React apps
- Host: GitHub
- URL: https://github.com/onaio/ansible-react
- Owner: onaio
- License: apache-2.0
- Created: 2018-10-02T12:17:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-01T13:42:17.000Z (11 months ago)
- Last Synced: 2024-04-17T08:07:09.597Z (10 months ago)
- Topics: ansible, ansible-react, ansible-role, ansible-roles, react
- Language: Python
- Homepage:
- Size: 139 KB
- Stars: 4
- Watchers: 30
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ansible-react
[![Build Status](http://cicd.onalabs.org/api/badges/onaio/ansible-react/status.svg)](http://cicd.onalabs.org/onaio/ansible-react)
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](https://github.com/facebook/create-react-app).
We only install and configure:
- node
- yarn
- and of course all the javascript packages that your project usesWe 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.
```yml
react_system_user: "react" # name of the user that will own the django installation
react_node_version: 10.x # the version of node to installreact_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](https://github.com/facebook/create-react-app) supports [custom environment variables](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-custom-environment-variables) and this role does too!
You can set custom environment variables by using the `react_app_settings` variable, like so:
```yml
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](https://docs.vagrantup.com/v2/) for getting setup with vagrant
## License
Apache 2
## Authors
[Ona Engineering](https://ona.io)