app configuration
parent
60e29a9433
commit
b5da67316f
|
@ -12,6 +12,10 @@ alias gl2='cd /usr/share/gamewheel/game-lib-v2'
|
||||||
alias 3d3='cd /usr/share/gamewheel/3d-editor-v3'
|
alias 3d3='cd /usr/share/gamewheel/3d-editor-v3'
|
||||||
alias gl3='cd /usr/share/gamewheel/game-lib-v3'
|
alias gl3='cd /usr/share/gamewheel/game-lib-v3'
|
||||||
alias ps='cd /usr/share/gamewheel && ./start_pong'
|
alias ps='cd /usr/share/gamewheel && ./start_pong'
|
||||||
|
alias api='cd /usr/share/gamewheel && ./start_api'
|
||||||
|
alias app='cd /usr/share/gamewheel && ./start_app'
|
||||||
|
alias port='cd /usr/share/gamewheel && ./start_port'
|
||||||
|
alias gate='cd /usr/share/gamewheel && ./start_gate'
|
||||||
alias e1='cd /usr/share/gamewheel && ./start_editor_v1'
|
alias e1='cd /usr/share/gamewheel && ./start_editor_v1'
|
||||||
alias e2='cd /usr/share/gamewheel && ./start_editor_v2'
|
alias e2='cd /usr/share/gamewheel && ./start_editor_v2'
|
||||||
alias e3='cd /usr/share/gamewheel && ./start_editor_v3'
|
alias e3='cd /usr/share/gamewheel && ./start_editor_v3'
|
||||||
|
|
115
bash_history
115
bash_history
|
@ -21205,3 +21205,118 @@ cd .confi`
|
||||||
cd .config
|
cd .config
|
||||||
ls
|
ls
|
||||||
exit
|
exit
|
||||||
|
gconftool
|
||||||
|
dconf
|
||||||
|
sudo apt-get install dconf-editor
|
||||||
|
dconf-editor
|
||||||
|
exit
|
||||||
|
sudo apt-get install vino
|
||||||
|
g
|
||||||
|
l;s
|
||||||
|
ls
|
||||||
|
cd app
|
||||||
|
ls
|
||||||
|
npm install
|
||||||
|
git remote -v
|
||||||
|
cd ..
|
||||||
|
cd gate/
|
||||||
|
git pull
|
||||||
|
git checkout develop
|
||||||
|
npm install
|
||||||
|
cd ..
|
||||||
|
cd cdn
|
||||||
|
git pull
|
||||||
|
git checkout develop
|
||||||
|
git pull
|
||||||
|
git status
|
||||||
|
rm npm-debug.log
|
||||||
|
ls
|
||||||
|
npm install
|
||||||
|
ls
|
||||||
|
rm npm-debug.log
|
||||||
|
ls -l
|
||||||
|
cd ...
|
||||||
|
cd connect
|
||||||
|
cd ..
|
||||||
|
git clone git@github.com:ToywheelDev/gamewheel-connect.git connect
|
||||||
|
cd connect/
|
||||||
|
git pull
|
||||||
|
git checkout develop
|
||||||
|
git pull
|
||||||
|
git status
|
||||||
|
rm mongoose.js.orig
|
||||||
|
npm install
|
||||||
|
ls -l
|
||||||
|
cd ..
|
||||||
|
git clone git@github.com:ToywheelDev/gamewheel-gamewheel.git gamewheel
|
||||||
|
cd gamewheel
|
||||||
|
git branch -a
|
||||||
|
git checkout develop
|
||||||
|
ls
|
||||||
|
cd ..
|
||||||
|
cd helper/
|
||||||
|
git pull
|
||||||
|
git checkout develop
|
||||||
|
npm install
|
||||||
|
cd ..
|
||||||
|
git clone git@github.com:ToywheelDev/gamewheel-config.git
|
||||||
|
cd gamewheel-config/
|
||||||
|
ls
|
||||||
|
git branch -a
|
||||||
|
git checkout develop
|
||||||
|
ls
|
||||||
|
npm install
|
||||||
|
cd ..
|
||||||
|
cd /etc/nginx/
|
||||||
|
ls
|
||||||
|
cd sites-enabled/
|
||||||
|
ls
|
||||||
|
ln -s ../sites-available/gate.conf
|
||||||
|
sudo ln -s ../sites-available/gate.conf
|
||||||
|
sudo service nginx restart
|
||||||
|
c
|
||||||
|
cd gamewheel-config/
|
||||||
|
ls
|
||||||
|
git branch -a
|
||||||
|
git checkout gw-crispy
|
||||||
|
cd ..
|
||||||
|
cd app
|
||||||
|
ls
|
||||||
|
gulp
|
||||||
|
bower install
|
||||||
|
gulp
|
||||||
|
gulp build
|
||||||
|
git branch -a
|
||||||
|
ls -l
|
||||||
|
cd ..
|
||||||
|
ls
|
||||||
|
cd /etc/nginx/
|
||||||
|
ls
|
||||||
|
cd sites-enabled/
|
||||||
|
ls
|
||||||
|
rm gate.conf
|
||||||
|
ls -l
|
||||||
|
sudo rm gate.conf
|
||||||
|
ls -l
|
||||||
|
sudo ln -s ../sites-available/app.conf
|
||||||
|
sudo ln -s ../sites-available/cdn.conf
|
||||||
|
sudo ln -s ../sites-available/gate-content-asset.conf
|
||||||
|
sudo ln -s ../sites-available/port-gamestate.conf
|
||||||
|
ls -l
|
||||||
|
sudo service nginx restart
|
||||||
|
ls -l
|
||||||
|
c
|
||||||
|
ls
|
||||||
|
cd api
|
||||||
|
ls
|
||||||
|
pm2
|
||||||
|
ls
|
||||||
|
cd ..
|
||||||
|
ls
|
||||||
|
ln -s config/start_api
|
||||||
|
ln -s config/start_app
|
||||||
|
ln -s config/start_gate
|
||||||
|
ln -s config/start_port
|
||||||
|
ls -l
|
||||||
|
a
|
||||||
|
exit
|
||||||
|
|
21
config.js
21
config.js
|
@ -59,10 +59,22 @@ var config = {
|
||||||
api: {
|
api: {
|
||||||
url: 'http://api.gamewheel.local'
|
url: 'http://api.gamewheel.local'
|
||||||
},
|
},
|
||||||
|
cdn: {
|
||||||
|
url: 'http://cdn.gamewheel.local'
|
||||||
|
},
|
||||||
api_runtime: {
|
api_runtime: {
|
||||||
url: 'http://api-runtime.gamewheel.com',
|
url: 'http://api-runtime.gamewheel.com',
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
},
|
},
|
||||||
|
gate: {
|
||||||
|
url: 'http://gate.gamewheel.local'
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
url: 'http://content.gamewheel.local'
|
||||||
|
},
|
||||||
|
asset: {
|
||||||
|
url: 'http://asset.gamewheel.local'
|
||||||
|
},
|
||||||
masker: {
|
masker: {
|
||||||
url: 'http://masker.gamewheel.local'
|
url: 'http://masker.gamewheel.local'
|
||||||
},
|
},
|
||||||
|
@ -72,9 +84,6 @@ var config = {
|
||||||
port: {
|
port: {
|
||||||
url: 'http://port.gamewheel.local'
|
url: 'http://port.gamewheel.local'
|
||||||
},
|
},
|
||||||
gate: {
|
|
||||||
url: 'http://gate.gamewheel.local'
|
|
||||||
},
|
|
||||||
environment: {
|
environment: {
|
||||||
mode: 'development'
|
mode: 'development'
|
||||||
}
|
}
|
||||||
|
@ -83,10 +92,10 @@ var config = {
|
||||||
if (typeof module !== 'undefined') {
|
if (typeof module !== 'undefined') {
|
||||||
|
|
||||||
if (typeof require !== 'undefined') {
|
if (typeof require !== 'undefined') {
|
||||||
var secure = require('./secure');
|
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
|
_.merge(config, require('./secure'));
|
||||||
_.merge(config, secure);
|
_.merge(config, require('./connection'));
|
||||||
|
_.merge(config, require('./model'));
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = config;
|
module.exports = config;
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
var config = {
|
||||||
|
connection: {
|
||||||
|
model: {
|
||||||
|
//
|
||||||
|
// default model connection
|
||||||
|
default: 'connect/connect.mongoose'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
schema: {
|
||||||
|
model: {
|
||||||
|
//
|
||||||
|
// default schema
|
||||||
|
default: 'connect/schema.mongoose'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
if (!!module) { module.exports = config; }
|
8
hosts
8
hosts
|
@ -22,6 +22,14 @@
|
||||||
127.0.1.1 api-v3-debug.gamewheel.local
|
127.0.1.1 api-v3-debug.gamewheel.local
|
||||||
127.0.1.1 tools.gamewheel.local
|
127.0.1.1 tools.gamewheel.local
|
||||||
127.0.1.1 tools-debug.gamewheel.local
|
127.0.1.1 tools-debug.gamewheel.local
|
||||||
|
127.0.1.1 gate.gamewheel.local
|
||||||
|
127.0.1.1 content.gamewheel.local
|
||||||
|
127.0.1.1 asset.gamewheel.local
|
||||||
|
127.0.1.1 port.gamewheel.local
|
||||||
|
127.0.1.1 app.gamewheel.local
|
||||||
|
127.0.1.1 api.gamewheel.local
|
||||||
|
127.0.1.1 cdn.gamewheel.local
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# The following lines are desirable for IPv6 capable hosts
|
# The following lines are desirable for IPv6 capable hosts
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
var config = {
|
||||||
|
model: {
|
||||||
|
connection: {
|
||||||
|
//
|
||||||
|
// default model connection
|
||||||
|
default : 'connect/connect.mongoose',
|
||||||
|
ticket : 'connect/connect.memcached',
|
||||||
|
gamestate : 'connect/connect.memcached'
|
||||||
|
},
|
||||||
|
schema: {
|
||||||
|
//
|
||||||
|
// default schema
|
||||||
|
default : 'connect/schema.mongoose',
|
||||||
|
ticket : 'connect/schema.memcached',
|
||||||
|
gamestate : 'connect/schema.memcached'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
if (!!module) { module.exports = exports = config; }
|
|
@ -0,0 +1,25 @@
|
||||||
|
#origin git@github.com:ToywheelDev/gamewheel-api.git
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
server_name api.gamewheel.local;
|
||||||
|
|
||||||
|
root /usr/share/gamewheel/api;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
add_header Access-Control-Allow-Origin $http_origin;
|
||||||
|
autoindex on;
|
||||||
|
try_files $uri $uri/ @node;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @node {
|
||||||
|
proxy_pass_request_headers on;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
||||||
|
proxy_pass http://127.0.0.1:3111;
|
||||||
|
proxy_ssl_session_reuse off;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_redirect off;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
#origin git@github.com:ToywheelDev/gamewheel-app.git
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
server_name app.gamewheel.local;
|
||||||
|
|
||||||
|
root /usr/share/gamewheel/app/dist;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass_request_headers on;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
||||||
|
proxy_pass http://127.0.0.1:3110;
|
||||||
|
proxy_ssl_session_reuse off;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_redirect off;
|
||||||
|
|
||||||
|
# WebSocket support (nginx 1.4)
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
# Path rewriting
|
||||||
|
rewrite /(.*) /$1 break;
|
||||||
|
proxy_redirect off;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
#origin git@github.com:ToywheelDev/gamewheel-cdn.git
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
server_name cdn.gamewheel.local;
|
||||||
|
|
||||||
|
root /usr/share/gamewheel/cdn;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
add_header Access-Control-Allow-Origin $http_origin;
|
||||||
|
autoindex on;
|
||||||
|
try_files $uri $uri/ 404;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
#origin git@github.com:ToywheelDev/gamewheel-gate.git
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
server_name gate.gamewheel.local content.gamewheel.local asset.gamewheel.local;
|
||||||
|
|
||||||
|
root /usr/share/gamewheel/gate;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass_request_headers on;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
||||||
|
proxy_pass http://127.0.0.1:3115;
|
||||||
|
proxy_ssl_session_reuse off;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_redirect off;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
#origin git@github.com:ToywheelDev/gamewheel-port.git
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
server_name port.gamewheel.local gamestate.gamewheel.local;
|
||||||
|
|
||||||
|
root /usr/share/gamewheel/port;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
|
||||||
|
# redirect all HTTP traffic to userInterface1
|
||||||
|
proxy_pass http://127.0.0.1:3114;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
||||||
|
|
||||||
|
proxy_ssl_session_reuse off;
|
||||||
|
proxy_pass_request_headers on;
|
||||||
|
|
||||||
|
# WebSocket support (nginx 1.4)
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
# Path rewriting
|
||||||
|
#rewrite /(.*) /$1 break;
|
||||||
|
proxy_redirect off;
|
||||||
|
}
|
||||||
|
}
|
4
start
4
start
|
@ -1,8 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd /usr/share/gamewheel
|
cd /usr/share/gamewheel
|
||||||
|
./start_api
|
||||||
|
./start_app
|
||||||
./start_editor_v1
|
./start_editor_v1
|
||||||
./start_editor_v2
|
./start_editor_v2
|
||||||
./start_editor_v3
|
./start_editor_v3
|
||||||
|
./start_gate
|
||||||
./start_pong
|
./start_pong
|
||||||
|
./start_port
|
||||||
./start_racing
|
./start_racing
|
||||||
./start_tools
|
./start_tools
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cd /usr/share/gamewheel/api
|
||||||
|
pm2 start bin/start --node-args="--debug=3211" --name api
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cd /usr/share/gamewheel/app
|
||||||
|
pm2 start bin/start --node-args="--debug=3210" --name app
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cd /usr/share/gamewheel/gate
|
||||||
|
pm2 start bin/start --node-args="--debug=3215" --name gate
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cd /usr/share/gamewheel/port
|
||||||
|
pm2 start bin/start --node-args="--debug=3214" --name port
|
Loading…
Reference in New Issue