-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to deploy the server manually? #12
Comments
Hi ramsestom, to deploy it manually you need to set up the dependencies:
You'll need to create a database and user account in mongodb, and create credentials for your game just like the instructions here: http://playtomic.org/games.html except in your own mongodb database. You will need an ENV var that contains your mongodb connection string: And then it's just a nodejs project you can start via: You may also set up mailchimp's ENV vars for newsletters, you can see the expected variables here: |
Thanks for your reply. Also, I guess I can delete the .c9 and .idea directories so as the Procfile and mongod file (that seems to be requiered for c9.io, Heroku or idea hosts deployment only. No?) |
You can change the port by providing a PORT var or changing the default here: Those files should be deletable - c9 is from the web IDE, .idea is from IntelliJ I think, the Procfile is for starting the server on Heroku, and the mongod file is for starting mongodb on C9 (that was me). |
Well it do not work EDIT: I made some test with the openshift node.js sample application and if, in its package.json file, I change EDIT2: looking at the nodejs.log, here is the error I get: var app = express.createServer(); |
You might have more luck now, there was a pending pull request that added support for a module (express) that had obsoleted some parts of their API. I have also prepared instructions for deploying to DigitalOcean: create ubuntu droplet and ssh into server dependencies$ sudo apt-get update && sudo apt-get install -y nodejs npm mongodb git copy api server and install its dependencies$ git clone https://github.com/playtomic/apiserver.git setup mongodb$ mongo setup configecho PORT=3000 > start start serverbash start |
Yes seems to work now (the application build successfully on Openshift. Not tried to interact with it yet though). Thanks And just for information. You have twice the same process.env.MONGOLAB_URI test in your config.js file now. So you can delete one ;) EDIT: for the publickey and privatekey does it need to be ssh keys or can I put any string as private/public keys? I really don't understand why there is a public and a private key as both needs to be provided both in the database and in the public applications that would connect through api (usually if you have a public/private key pair, the private key is supposed to remain private and would not be provided to the public applications (i.e. games that would connect to your server) and the public key do not need to be provided to the private server either (he only needs the private key to decipher messages encoded with public keys)) |
The keys date back to when playtomic was a commercial service, the public key was used to isolate each game to separate subdomains on the api server while the private key was the actual credential. They definitely shouldn't be ssh keys, you can use any value you want for them. |
Hello, I try to set up Playtomic on my own server too. I followed your tutorial and when I run
And then the server is listening, but when I try to connect a player, I always have the error 1, which is:
I have searched for the error about module bson, and some people said to update mongoose. I tried to do that but it doesn't change anything. Have you an idea to resolve this error? Or perhaps I am wrong and this error is not important, and the problem comes to my authentication ? |
What are the steps I should follow manually deploy the server?
The instructions in here: http://playtomic.org/server.html are only for an Heroku installation and I want to put it on openshift...
So once I have downloaded and copied the git source on my openshift application, what am I supposed to do? Is there any config file I must change or something?
The text was updated successfully, but these errors were encountered: