Giter Site home page Giter Site logo

lizainslie / rail-overflow Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.82 MB

A Stack Overflow clone written in Ruby

Home Page: https://overflow.raildev.tech

Ruby 55.79% JavaScript 6.36% CSS 3.28% HTML 31.13% Dockerfile 1.54% Shell 0.34% Procfile 0.12% SCSS 1.44%
rails ruby ruby-on-rails stackoverflow

rail-overflow's Introduction

RailOverflow

Deploy

RailOverflow (we're looking for a better name) is a self-hosted, open-source alternative to StackOverflow.

Ruby version

RailOverflow requires Ruby 2.7.0. The easiest way to use this is by using our Vagrantfile or using a service like Heroku

System dependencies

You must have Postgresql installed to use this application. Install it on Ubuntu with:

$ sudo apt install postgresql

Configuration

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

Database creation

To create the necessary production database, run:

$ sudo -u postgres createdb railoverflow_production

Note: If you are not running in production, substitute the word production for your Rails environment. (development or test)

Database initialization

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

Deployment instructions

Heroku

Manual Deploy

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:5 argument we sent to the bundle exec puma command 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.

Credits and License

Credits:

License:

This application is licensed under the permissive MIT license.

rail-overflow's People

Contributors

lizainslie avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.