add install scripts
This commit is contained in:
Родитель
6215f28cc0
Коммит
4a15ded42b
|
@ -5,3 +5,4 @@ loop-server
|
|||
selenium-*
|
||||
|
||||
node_modules
|
||||
pm2
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
language: ruby
|
||||
|
||||
services:
|
||||
- redis-server
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
before_install:
|
||||
- brew install node
|
||||
|
||||
script:
|
||||
- npm i
|
|
@ -0,0 +1,32 @@
|
|||
## fxa-local-dev
|
||||
> An easy way to contribute to Firefox Accounts
|
||||
|
||||
### Getting Started
|
||||
|
||||
1. Install required system [#dependencies](dependencies)
|
||||
1. Clone this repository and run `npm install`.
|
||||
```
|
||||
git clone https://github.com/vladikoff/fxa-local-dev.git && fxa-local-dev && npm i
|
||||
```
|
||||
1. Run `pm2 logs` and make sure there are no startup errors from the servers.
|
||||
1. Run `pm2 status` to display running servers, such as [127.0.0.1:3030](http://127.0.0.1:3030/) and [127.0.0.1:8080](http://127.0.0.1:8080/).
|
||||
|
||||
### Dependencies
|
||||
|
||||
### Global
|
||||
|
||||
[Git](http://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [node.js](http://nodejs.org/), Redis, libgmp.
|
||||
|
||||
### OSX (with [Brew](http://brew.sh/)
|
||||
|
||||
```
|
||||
brew install gmp redis
|
||||
```
|
||||
|
||||
(You might also need to run `xcode-select --install` to get OS X Command Line Tools)
|
||||
|
||||
### Ubuntu
|
||||
|
||||
```
|
||||
sudo apt-get install libgmp3-dev
|
||||
```
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Clone all the projects
|
||||
|
||||
git clone https://github.com/mozilla/fxa-content-server.git
|
||||
git clone https://github.com/mozilla/fxa-auth-server.git
|
||||
git clone https://github.com/vladikoff/browserid-verifier.git -b http
|
||||
|
||||
git clone https://github.com/mozilla/fxa-oauth-server.git
|
||||
git clone https://github.com/mozilla/fxa-oauth-console.git
|
||||
|
||||
git clone https://github.com/mozilla/fxa-profile-server.git
|
||||
|
||||
git clone https://github.com/mozilla/123done.git -b oauth
|
||||
|
||||
git clone https://github.com/mozilla-services/loop-server.git
|
||||
|
||||
# Install and Setup all the projects
|
||||
|
||||
cd fxa-content-server && npm i && cp server/config/local.json-dist server/config/local.json && cd ..
|
||||
|
||||
cd fxa-auth-server && npm i && node ./scripts/gen_keys.js && cd ..
|
||||
# Install a custom http only verifier
|
||||
cd browserid-verifier && npm i && npm i vladikoff/browserid-local-verify#http && cd ..
|
||||
|
||||
cd fxa-oauth-server && npm i && cd ..
|
||||
cd fxa-oauth-console && npm i && cd ..
|
||||
|
||||
cd fxa-profile-server && npm i && mkdir -p var/public/ && cd ..
|
||||
|
||||
cd 123done && npm i && node ./scripts/gen_keys.js && cp config-local.json config.json && cd ..
|
||||
|
||||
cd loop-server && npm i && cd ..
|
||||
|
||||
ln -s node_modules/.bin/pm2 pm2
|
|
@ -0,0 +1,3 @@
|
|||
sh _scripts/install_all.sh
|
||||
pm2 delete servers.json && pm2 start servers.json
|
||||
echo "Use 'pm2 kill' to stop all the servers"
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "fxa-local-dev",
|
||||
"version": "1.0.0",
|
||||
"description": "An easy way to contribute to Firefox Accounts",
|
||||
"scripts": {
|
||||
"postinstall": "_scripts/postinstall.sh"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MPL",
|
||||
"dependencies": {
|
||||
"pm2": "^0.11.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
{
|
||||
"apps": [
|
||||
{
|
||||
"name": "auth-server mailer",
|
||||
"script": "test/mail_helper.js",
|
||||
"cwd": "fxa-auth-server",
|
||||
"env": {
|
||||
"NODE_ENV": "dev"
|
||||
},
|
||||
"max_restarts": "1"
|
||||
},
|
||||
{
|
||||
"name": "auth-server db memory",
|
||||
"script": "node_modules/fxa-auth-db-mem",
|
||||
"cwd": "fxa-auth-server",
|
||||
"env": {
|
||||
"NODE_ENV": "dev"
|
||||
},
|
||||
"max_restarts": "1"
|
||||
},
|
||||
{
|
||||
"name": "auth-server key server",
|
||||
"script": "bin/key_server.js",
|
||||
"cwd": "fxa-auth-server",
|
||||
"env": {
|
||||
"NODE_ENV": "dev"
|
||||
},
|
||||
"max_restarts": "1"
|
||||
},
|
||||
{
|
||||
"name": "content-server PORT 3030",
|
||||
"script": "node_modules/.bin/grunt",
|
||||
"args": ["server"],
|
||||
"cwd": "fxa-content-server",
|
||||
"max_restarts": "1"
|
||||
},
|
||||
{
|
||||
"name": "oauth-server",
|
||||
"script": "bin/server.js",
|
||||
"cwd": "fxa-oauth-server",
|
||||
"env": {
|
||||
"NODE_ENV": "dev"
|
||||
},
|
||||
"max_restarts": "1"
|
||||
},
|
||||
{
|
||||
"name": "profile-server PORT 1111",
|
||||
"script": "bin/server.js",
|
||||
"cwd": "fxa-profile-server",
|
||||
"max_restarts": "1",
|
||||
"env": {
|
||||
"NODE_ENV": "dev"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "profile-server worker PORT 1112",
|
||||
"script": "bin/_static.js",
|
||||
"cwd": "fxa-profile-server",
|
||||
"max_restarts": "1",
|
||||
"env": {
|
||||
"NODE_ENV": "dev"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "123done",
|
||||
"script": "server.js",
|
||||
"cwd": "123done",
|
||||
"max_restarts": "1",
|
||||
"env": {
|
||||
"NODE_ENV": "dev"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "loop-server PORT 5000",
|
||||
"script": "loop/index.js",
|
||||
"cwd": "loop-server",
|
||||
"env": {
|
||||
"NODE_ENV": "test",
|
||||
"PORT": "5000"
|
||||
},
|
||||
"max_restarts": "1"
|
||||
},
|
||||
{
|
||||
"name": "fxa-oauth-console PORT 10137",
|
||||
"script": "bin/server.js",
|
||||
"cwd": "fxa-oauth-console",
|
||||
"env": {
|
||||
"NODE_ENV": "dev"
|
||||
},
|
||||
"max_restarts": "1"
|
||||
},
|
||||
{
|
||||
"name": "browserid-verifier PORT 5050",
|
||||
"script": "server.js",
|
||||
"cwd": "browserid-verifier",
|
||||
"env": {
|
||||
"PORT": "5050"
|
||||
},
|
||||
"max_restarts": "1"
|
||||
}
|
||||
]
|
||||
}
|
Загрузка…
Ссылка в новой задаче