-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
Instructions to install to VPS/server other than heroku #50
Comments
We should add these - however, I am running on Heroku so it would be ideal if someone that has setup on VPS would type on the steps. |
What type of documentation are you looking for? Setting up a VPS from scratch takes a ton of steps, and it's probably out of scope for any Stringer documentation. Perhaps the docs could provide links that show how to setup a VPS (in general), and then explain Stringer installation after that? |
@bolandrm Yeah, I think it is safe to assume that a VPS has been setup. We should link to the pre-reqs that need to be installed (Ruby, Postgres, Git) and then provide instructions to get the app running from there. |
@swanson Yes, you are correct. There is good amount of documentation on setting up a RoR server on VPS. That can be safely left out. Just pre-reqs, installation steps and if any code modification/addition that needs to be done for installing it. |
These are the steps I took to get it running on my Ubuntu VPS, it's running sqlite at the moment rather than postgresql Install some dependencies:
Create a user for stringer:
Install Ruby:
Clone stringer from github:
Set up Stringer:
Set up the DB:
Run the application:
Set up a cron job to parse the rss feeds.
add the lines
|
great instructions mick solution was to install libcurl-dev (i think) i ran the following:
|
I might not have put all the needed dependencies in the apt-get line, I should really wipe my VPS and run the commands from scratch. |
bundle install doesn't work for me.
My bundle version is 1.3.5. |
Probably a version of ruby installed by your package manager is superceding the version we selected with rbenv for the string user, in the short term if you don't need ruby for anything else uninstall it with the package manager. The solution must lie in doing something clever with the path variable to ensure this doesn't happen, I'll do some googling about it later this evening. |
I destroyed the old vagrant box and did a fresh install and your steps worked fine. Just need to apt-get install build-essential for make. |
I think the only thing missing is to get the app using postgres (as per #64) then the instructions are good to go. |
The instructions are distro agnostic apart from the apt-get line, so would be useful if people would submit an equivalent line for all the various distributions likely to be offered as a VPS. Fedora, Suse, Centos, FreeBSD etc. Also I'll look into writing an init script for it. |
This is how you get it working with postgres Install Postgres
Set up the database:
Edit config file database.yml with the setting fro the database you just created:
Add the following text to the file, and change the password to the one you created when setting up the stringer user for postgres
Switch over from sqlite to postgres
|
Updated instructions: Install some dependenciesThe first step is installing some essential dependencies from your VPS's package manager. Ubuntu/Debian
CentOS/Fedora
Set up the databaseCreate a postgresql user to own the database stringer will use, you will need to create a password too, make a note of it.
Now create the database Stringer will use
Create your stringer userWe will run stringer as it's own user for security, also as we'll be installing a specific version of ruby to be used for the stringer user alone in the stringer user's home directory, this saves us worrying whether the version of ruby and some dependencies provided by your distro are compatible with Stringer.
Install Ruby for your stringer userWe are going to use Rbenv to manage the version of Ruby you use.
We also need to install bundle which will handle Stringer's dependencies
Install Stringer and set it upGrab Stringer from github
Use bundle to grab and build Stringer's dependencies
Stringer uses environment variables to determine information about your database, edit these values to reflect your database and the password you chose earlier
Tell stringer to run the database in production mode, using the postgres database you created earlier.
Run the application:
Set up a cron job to parse the rss feeds.
add the lines
|
Added instructions to the repo here. Thanks @mickstephenson @cnu @s3nk4s |
Any chances of adding these to the documentation please?
Regards,
Deepak Kundu
The text was updated successfully, but these errors were encountered: