A modern, open-source Stackoverflow alternative.
241
RailOverflow (we're looking for a better name) is a self-hosted, open-source alternative to StackOverflow.
RailOverflow requires Ruby 2.7.0. The easiest way to use this is by using our Vagrantfile or using a service like Heroku
You must have Postgresql installed to use this application. Install it on Ubuntu with:
$ sudo apt install postgresql
You must install all Ruby and JavaScript dependencies before running any database migrations and before running the web app. To do this, we use Bundler and Yarn. (click on the links to see install instructions for each) Once you have Bundler and Yarn, run these two commands in the app directory.
$ bundle install
$ yarn install
To create the necessary production database, run:
$ sudo -u postgres createdb railoverflow_production
Note: If you are not running in production, substitute the word
productionfor your Rails environment. (developmentortest)
To initialize the database, you will have to migrate it. No population is needed.
To migrate the database, run:
$ RAILS_ENV=production rake db:migrate
Run it yourself, like this:
$ export PORT=3000 # can be any port you want, just make sure it is open and accessible to the user that will be running the application
$ export MODE="production" # can also be "development" or "test"
$ bundle exec puma -t 5:5 -p $PORT -e $MODE
Note: The
-t 5:5argument we sent to thebundle exec pumacommand represents the number of worker threads puma will spawn. You can set this to something else based on your system, but remember these two things:
- The more threads you create, the faster your application will run, but it will also use more memory.
- Every system has a maximum amount of threads it can run at once. Be mindful of this as it will error if you somehow go over.
This application is licensed under the permissive MIT license.
Content type
Image
Digest
Size
208.7 MB
Last updated
over 6 years ago
docker pull raildev/rail-overflow