This repository was archived by the owner on Oct 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
[WIP] Improve installation #88
Open
JJK801
wants to merge
28
commits into
BedrockStreaming:master
Choose a base branch
from
JJK801:improve-installation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
3496a7c
ease docker installation
075cbee
Add FTP Server to docker container in dev mode
1c01e93
Fix travis
d0377da
Fix travis
000f9b1
Fix travis
9ac2130
Fix travis
0ed205a
Fix travis
55052fe
Fix travis
88e76dd
Fix travis
861c825
Fix travis
d507b56
Fix travis
6551784
Fix travis
6d54517
Fix travis
daf0e41
Fix travis
1e90143
Fix travis
deeb46a
Fix travis
7cdc470
Fix travis
c63bc94
Fix travis
34270d3
Fix travis
20c5032
Fix travis
4c6ed4c
Fix travis
8fa682e
Fix travis
daf029b
Fix travis
670077d
Fix travis
d427558
Fix Travis
fce4187
Fix Travis
80af1df
Add shared volume + overridable constants
3395b81
Add shared volume + overridable constants
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Contribute to BabitchClient | ||
|
|
||
| Help us to improve the application by: | ||
|
|
||
| * Giving us a feedback using Github Issues | ||
| * Sending us pull requests (with related tests) | ||
|
|
||
| ## Launch Tests (Unit & E2E) | ||
|
|
||
| Only unit test : | ||
| * `./node_modules/.bin/grunt test-unit` | ||
|
|
||
| Only E2E test : | ||
| * `./node_modules/.bin/grunt test-e2e` | ||
|
|
||
| All test : | ||
| * `./node_modules/.bin/grunt test` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # BabitchClient Documentation | ||
|
|
||
| * Install | ||
| ..* [With GIT](./install/git.md) | ||
| ..* [With Docker](./install/docker.md) | ||
| * Use | ||
| ..* [With GIT](./use/git.md) | ||
| ..* [With Docker](./use/docker.md) | ||
| * [Contribute](./contribute.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Install with Docker | ||
|
|
||
| You have to do this step only if you wan't to build your own custom image, otherwise go to [the next step](../usage/docker.md). | ||
|
|
||
| ## Prepare image | ||
|
|
||
| Follow the [GIT Installation process](./git.md). | ||
|
|
||
| ## Build image | ||
|
|
||
| ```shell | ||
| $ docker build -t m6web/babitch-client . | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Install with GIT | ||
|
|
||
| ## Clone the project | ||
|
|
||
| ```shell | ||
| $ git clone https://github.com/M6Web/BabitchClient.git | ||
| ``` | ||
|
|
||
| ## Configure | ||
|
|
||
| ```shell | ||
| $ cd BabitchClient | ||
| $ cp app/scripts/config.js.dist app/scripts/config.js | ||
| ``` | ||
|
|
||
| Then edit app/scripts/config.js to match your requirements | ||
|
|
||
| ## For production purposes | ||
|
|
||
| * Install the Babitch Server API => [M6Web/Babitch](https://github.com/M6Web/Babitch) | ||
| * Go to app/scripts/config.js and change server config | ||
|
|
||
| ``` | ||
| $ ./node_modules/.bin/bower install | ||
| $ ./node_modules/.bin/grunt build | ||
| ``` | ||
|
|
||
| ## For dev purposes | ||
|
|
||
| ``` | ||
| $ npm install | ||
| $ ./node_modules/.bin/bower install | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Usage of Docker version | ||
|
|
||
| ## Development mode | ||
|
|
||
| This mode make contribution easier, it run the container with the following component: | ||
|
|
||
| - X11VNC: VNC Server used to render browser while protractor is running (port binding: `-p <your_port>:5999`) | ||
| - XVFB: Virtual frame buffer used to simulate a display for protractor purposes | ||
| - ProFTPd: FTP server used to edit files in container from your favorite editor (port binding: `-p <your_port>:21`) | ||
|
|
||
| There is no Nginx running on dev mode as your will prefer to use `grunt serve` for development purpose. | ||
|
|
||
| ```shell | ||
| $ sudo docker run --privileged -t -i -p 8000:80 -p 5999:5999 -p 2121:21 m6web/babitch-client dev | ||
| ``` | ||
|
|
||
| ## Production mode | ||
|
|
||
| This mode provide a lightweight server, it run the container with the following component: | ||
|
|
||
| - Nginx: Web server (port binding: `-p <your_port>:80`) | ||
|
|
||
| ```shell | ||
| $ sudo docker run --privileged -t -i -p 8000:80 m6web/babitch-client prod | ||
| ``` | ||
|
|
||
| You now have a BabitchClient listening on port `8000`! | ||
|
|
||
| ## Test mode | ||
|
|
||
| This mode simply launch test suites, it run the container with the following component: | ||
|
|
||
| - X11VNC: VNC Server used to render browser while protractor is running (port binding: `-p <your_port>:5999`) | ||
| - XVFB: Virtual frame buffer used to simulate a display for protractor purposes | ||
|
|
||
| ```shell | ||
| $ sudo docker run --privileged -t -i -p 5999:5999 m6web/babitch-client test | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| ## Usage of GIT version | ||
|
|
||
| ## For production purposes | ||
|
|
||
| * Configure a Web Server (Apache/Nginx/...) with the `dist` folder as the doc root | ||
| * Launch `<yourwebserver.com>/` in a browser | ||
|
|
||
| ### For dev purposes | ||
|
|
||
| Launch: | ||
|
|
||
| ``` | ||
| $ grunt serve | ||
| ``` | ||
|
|
||
| Then go to `http://127.0.0.1:8080/`, | ||
|
|
||
| You have two options for the server side : | ||
|
|
||
| * Install the Babitch Server API => [M6Web/Babitch](https://github.com/M6Web/Babitch) and change `app/scripts/config.js` | ||
| * Use the faked backend by adding `?nobackend` to the BabitchClient url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| 'use strict'; | ||
|
|
||
| angular.module('babitchServer', []) | ||
| .constant('CONFIG', { | ||
| 'BABITCH_WS_URL': '%BABITCH_WS_URL%', | ||
| 'BABITCH_LIVE_FAYE_URL' :'%BABITCH_LIVE_FAYE_URL%', | ||
| 'BABITCH_LIVE_FAYE_CHANNEL' :'%BABITCH_LIVE_FAYE_CHANNEL%', | ||
| 'BABITCH_STATS_MIN_GAME_PLAYED' : '%BABITCH_STATS_MIN_GAME_PLAYED%' | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| server { | ||
| listen 80; | ||
| root /var/www/dist/; | ||
| root /var/www/prod/; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all "production mode" had to be much more visible than dev or test mode :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right 😄