Skip to content

Commit

Permalink
Revert "Revert "Fixes #2074: Simplifies documentation (#2101)" (#2107)…
Browse files Browse the repository at this point in the history
…" (#2108)

This reverts commit c0e9064.
  • Loading branch information
abishekvashok authored Aug 19, 2019
1 parent c0e9064 commit 9d94e2d
Show file tree
Hide file tree
Showing 112 changed files with 126 additions and 123 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ The user can:

Badgeyay's frontend and backend can be deployed easily and a detailed installation instruction of frontend and backend have been provided below.

1. [Badgeyay Frontend](/frontend/README.md)
2. [Badgeyay Backend](/api/README.md)
1. [Badgeyay Frontend](/docs/frontend/installation/README.md)
2. [Badgeyay Backend](/docs/backend/installation/README.md)
3. **Installing git pre-push hook:**
- Run file `scripts/install-hook.py`. It will copy contents of `scripts/pre-push-hook.py` to `.git/hooks/pre-push`. Make sure that you have `.git/hooks/pre-push.sample` in your `.git` directory before performing this step.
- This will install git `pre-push-hook` in your local `.git` directory. It will run the commits against linting tests before pushing to a remote. See `scripts/pre-push-hook.py` if you encounter any errors.
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Badgeyay Backend

> **Badgeyay provide an interface to event organizers for generating badges of events from concerts to conferences and meet-ups.**
Badgeyay is an awesome Badge generator with a simple web UI to add data and generate printable badges in a PDF.

This directory contains the backend for badgeyay.
[Installation instructions](/docs/backend/installation/README.md)
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions api/README.md → docs/backend/installation/README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Badgeyay Backend

> **Badgeyay provide an interface to event organizers for generating badges of events from concerts to conferences and meet-ups.**
Badgeyay is an awesome Badge generator with a simple web UI to add data and generate printable badges in a PDF.

## Prerequisites

Badgeyay backend depends on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ $ git clone https://github.com/fossasia/badgeyay.git && cd badgeyay
* **Step 3** - Now we need to build the Docker image for Badgeyay

```sh
$ cd api/
$ cd backend/
$ docker-Compose build
```

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* **Step 1** - Clone the project and `cd` into it.

```bash
git clone https://github.com/fossasia/badgeyay.git && cd badgeyay/api
git clone https://github.com/fossasia/badgeyay.git && cd badgeyay/backend
```

* **Step 2** - Then set the required `SERVER_NAME` environment variable. `SERVER_NAME` should the same as the domain on which the server is running and it should not include 'http', 'https',
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $ git remote add upstream https://github.com/fossasia/badgeyay.git
* System Wide Installation

```sh
sudo -H pip3 install -r api/requirements.txt
sudo -H pip3 install -r backend/requirements.txt
```
Note: Errors might result here, just see which package is unmet, and just install them using the distro's package manager. You may need to upgrade your pip version
Expand Down Expand Up @@ -72,7 +72,7 @@ $ git remote add upstream https://github.com/fossasia/badgeyay.git
* Install all the requirements.
```sh
(badgeyay)$ pip install -r api/requirements.txt
(badgeyay)$ pip3 install -r backend/requirements.txt
```
- **Postgres Installation**
Expand Down Expand Up @@ -146,14 +146,14 @@ It is necessary to run both the ember server and as well as the python backend s
Then, in a terminal, type
```sh
(badgeyay/api) $ export FLASK_APP=run.py
(badgeyay/api)$ flask run
(badgeyay/backend) $ export FLASK_APP=run.py
(badgeyay/backend)$ flask run
```
* To run the project on a local machine (debug mode).
```sh
(badgeyay/api) $ export FLASK_DEBUG=1
(badgeyay/api)$ flask run
(badgeyay/backend) $ export FLASK_DEBUG=1
(badgeyay/backend)$ flask run
```
If Flask Run does not work on Mac Try using :
```py
Expand Down
106 changes: 106 additions & 0 deletions docs/frontend/installation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
## Prerequisites

You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with npm) (Preferred version is v9.11.2) (It's tricky to install npm on most system, maybe use nvm)
* [Ember CLI](https://ember-cli.com/)
* [Google Chrome](https://google.com/chrome/) (for testing purposes only)

## Installation

To install the app, run the following commands in a command line:

* `git clone https://github.com/fossasia/badgeyay`
* `cd badgeyay/frontend`
* `npm install`
* `bower install`
## Running locally:

To run the app locally on your machine, run the following commands in a command line:

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

### Running Tests

* `ember test`
* `ember test --server`

### Building

* `ember build` (development)
* `ember build --environment production` (production)

### Deploying on Kubernetes

For deploying on Kubernetes, you need following things properly installed on your local machine:

* [Docker](https://docs.docker.com/install/)
* [Docker Machine](https://docs.docker.com/machine/install-machine/)
* [Google Cloud SDK](https://cloud.google.com/sdk/docs/quickstarts)
* [VirtualBox](https://www.virtualbox.org/wiki/Linux_Downloads)

#### Enabling Google Kubernetes Engine API:
* Visit the [Kubernetes Engine page](https://console.cloud.google.com/projectselector/kubernetes?_ga=2.190554988.-672712410.1518259944) in the Google Cloud Platform Console.
* Create or select a project.
* Wait for the API and related services to be enabled.

##### Creating local VM
* `docker-machine create --driver virtualbox default`
* `docker-machine env default`
* `eval "$(docker-machine env default)"`

##### Installing Kubernetes Command line tool:
* `gcloud components install kubectl`

##### Building and deploying the container image:
* `export PROJECT_ID="$(gcloud config get-value project -q)"`
* `docker build -t gcr.io/${PROJECT_ID}/badgeyay:v1 .` (Build Container Image)
* `gcloud docker -- push gcr.io/${PROJECT_ID}/badgeyay:v1` (Push Container Image)
* `gcloud container clusters create badgeyay-cluster --num-nodes=3` (Create Container cluster)
* `kubectl run badgeyay-web --image=gcr.io/${PROJECT_ID}/badgeyay:v1 --port 4200` (Deploy your application)
* `kubectl expose deployment badgeyay-web --type=LoadBalancer --port 80 --target-port 4200` (Expose deployment over the Internet)
* `kubectl get service`
* Copy the External-IP from the showed list corresponding to your cluster's name and run it in your browser.

# Deploying on Heroku :

## Prerequisites

You will need the following things properly installed on your computer.

Git
Node.js (with NPM)
Ember CLI
PhantomJS
Running Locally

````
$ git clone https://github.com/fossasia/badgeyay
$ cd badgeyay/frontend
$ yarn install
$ ember server
````

Your app should now be running on localhost:4200.

## Deploying to Heroku

````
$ heroku create --buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz
$ git push heroku master
$ heroku open
````



## Further Reading / Useful Links

* [Heroku Ember.js Buildpack](https://github.com/heroku/heroku-buildpack-emberjs)
* [ember.js](https://emberjs.com/)
* [ember-cli](https://ember-cli.com/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
107 changes: 1 addition & 106 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,109 +8,4 @@ This directory contains the frontend for badgeyay.

> Note to mobile users: On google chrome of mobile device, you need to **disable data saver** option in settings to open the [website](http://badgeyay.com/). Try clearing cache and cookies if the problem still persists.
## Prerequisites

You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with npm) (Preferred version is v9.11.2) (It's tricky to install npm on most system, maybe use nvm)
* [Ember CLI](https://ember-cli.com/)
* [Google Chrome](https://google.com/chrome/) (for testing purposes only)

## Installation

To install the app, run the following commands in a command line:

* `git clone https://github.com/fossasia/badgeyay`
* `cd badgeyay/frontend`
* `npm install`
* `bower install`
## Running locally:

To run the app locally on your machine, run the following commands in a command line:

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

### Running Tests

* `ember test`
* `ember test --server`

### Building

* `ember build` (development)
* `ember build --environment production` (production)

### Deploying on Kubernetes

For deploying on Kubernetes, you need following things properly installed on your local machine:

* [Docker](https://docs.docker.com/install/)
* [Docker Machine](https://docs.docker.com/machine/install-machine/)
* [Google Cloud SDK](https://cloud.google.com/sdk/docs/quickstarts)
* [VirtualBox](https://www.virtualbox.org/wiki/Linux_Downloads)

#### Enabling Google Kubernetes Engine API:
* Visit the [Kubernetes Engine page](https://console.cloud.google.com/projectselector/kubernetes?_ga=2.190554988.-672712410.1518259944) in the Google Cloud Platform Console.
* Create or select a project.
* Wait for the API and related services to be enabled.

##### Creating local VM
* `docker-machine create --driver virtualbox default`
* `docker-machine env default`
* `eval "$(docker-machine env default)"`

##### Installing Kubernetes Command line tool:
* `gcloud components install kubectl`

##### Building and deploying the container image:
* `export PROJECT_ID="$(gcloud config get-value project -q)"`
* `docker build -t gcr.io/${PROJECT_ID}/badgeyay:v1 .` (Build Container Image)
* `gcloud docker -- push gcr.io/${PROJECT_ID}/badgeyay:v1` (Push Container Image)
* `gcloud container clusters create badgeyay-cluster --num-nodes=3` (Create Container cluster)
* `kubectl run badgeyay-web --image=gcr.io/${PROJECT_ID}/badgeyay:v1 --port 4200` (Deploy your application)
* `kubectl expose deployment badgeyay-web --type=LoadBalancer --port 80 --target-port 4200` (Expose deployment over the Internet)
* `kubectl get service`
* Copy the External-IP from the showed list corresponding to your cluster's name and run it in your browser.

# Deploying on Heroku :

## Prerequisites

You will need the following things properly installed on your computer.

Git
Node.js (with NPM)
Ember CLI
PhantomJS
Running Locally

````
$ git clone https://github.com/fossasia/badgeyay
$ cd badgeyay/frontend
$ yarn install
$ ember server
````

Your app should now be running on localhost:4200.

## Deploying to Heroku

````
$ heroku create --buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz
$ git push heroku master
$ heroku open
````



## Further Reading / Useful Links

* [Heroku Ember.js Buildpack](https://github.com/heroku/heroku-buildpack-emberjs)
* [ember.js](https://emberjs.com/)
* [ember-cli](https://ember-cli.com/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
[Installation instructions](/docs/frontend/installation/README.md)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-r api/requirements.txt
-r backend/requirements.txt

0 comments on commit 9d94e2d

Please sign in to comment.