Add local syncserver instance.

This commit is contained in:
Ryan Kelly 2015-03-27 16:12:06 +11:00
Родитель 86c7141799
Коммит 08db150a13
6 изменённых файлов: 65 добавлений и 8 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -2,6 +2,7 @@ fxa-*
123done
browserid-verifier
loop-server
syncserver
selenium-*
node_modules

Просмотреть файл

@ -15,6 +15,8 @@ git clone https://github.com/mozilla/123done.git -b oauth &
git clone https://github.com/mozilla-services/loop-server.git &
git clone https://github.com/mozilla-services/syncserver.git &
wait
# Install and Setup all the projects
@ -34,4 +36,6 @@ cd 123done && npm i && CONFIG_123DONE=./config-local.json node ./scripts/gen_key
cd loop-server && npm i && cd ..
cd syncserver && make build && cd ..
ln -s node_modules/.bin/pm2 pm2

44
_scripts/syncserver.ini Normal file
Просмотреть файл

@ -0,0 +1,44 @@
[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 5000
[app:main]
use = egg:syncserver
[syncserver]
# This must be edited to point to the public URL of your server,
# i.e. the URL as seen by Firefox.
public_url = http://localhost:5000/
# This defines the database in which to store all server data.
#sqluri = sqlite:////tmp/syncserver.db
# This is a secret key used for signing authentication tokens.
# It should be long and randomly-generated.
# The following command will give a suitable value on *nix systems:
#
# head -c 20 /dev/urandom | sha1sum
#
# If not specified then the server will generate a temporary one at startup.
secret = abcdef0123456789
# Set this to "false" to disable new-user signups on the server.
# Only request by existing accounts will be honoured.
# allow_new_users = false
# Set this to "true" to work around a mismatch between public_url and
# the application URL as seen by python, which can happen in certain reverse-
# proxy hosting setups. It will overwrite the WSGI environ dict with the
# details from public_url. This could have security implications if e.g.
# you tell the app that it's on HTTPS but it's really on HTTP, so it should
# only be used as a last resort and after careful checking of server config.
force_wsgi_environ = false
# Uncomment and edit the following to use a local BrowserID verifier
# rather than posting assertions to the mozilla-hosted verifier.
# Audiences should be set to your public_url without a trailing slash.
[browserid]
backend = tokenserver.verifiers.RemoteVerifier
audiences = http://localhost:5000
verifier_url = http://localhost:5050/v2

1
_scripts/syncserver.sh Executable file
Просмотреть файл

@ -0,0 +1 @@
./local/bin/pserve ../_scripts/syncserver.ini

Просмотреть файл

@ -13,4 +13,5 @@
(cd 123done && git checkout master && git pull origin master && npm i && cd ..) || echo "123done update failed"
(cd loop-server && git checkout master && git pull origin master && npm i && cd ..) || echo "Loop update failed"
(cd syncserver && git checkout master && git pull origin master && make build && cd ..) || echo "syncserver update failed"

Просмотреть файл

@ -123,6 +123,12 @@
"CONFIG_FILES": "../_scripts/configs/loop.json"
},
"max_restarts": "1"
},
{
"name": "sync server PORT 5000",
"script": "../_scripts/syncserver.sh",
"cwd": "syncserver",
"max_restarts": "1"
}
]
}