Go to file
nilsding e2394ed4f3 updated README 2014-12-29 02:34:11 +01:00
.capistrano
app added following information thingy 2014-12-29 02:32:44 +01:00
bin
config made tabs work 2014-12-29 01:25:48 +01:00
db added deleted column to reports 2014-12-28 21:34:36 +01:00
lib
log
public added iconses!!! 2014-12-21 23:18:36 +01:00
spec added follow user spec 2014-12-26 15:28:53 +01:00
tmp
vendor/assets
.gitignore
.rspec
Capfile
Gemfile added sanitize gem 2014-12-28 18:54:04 +01:00
Gemfile.lock added sanitize gem 2014-12-28 18:54:04 +01:00
Procfile
README.md updated README 2014-12-29 02:34:11 +01:00
Rakefile Merge remote-tracking branch 'origin/master' into moderation 2014-12-28 19:29:01 +01:00
TODO
config.ru

README.md

justask build status

Requirements

  • UNIX-like system (Linux, *BSD, ...)
  • Ruby 2.0.0+
  • Bundler
  • PostgreSQL
  • Redis

Installation (production)

Database

PostgreSQL

$ sudo -u postgres psql -d template1
template1=# CREATE USER justask CREATEDB;
template1=# CREATE DATABASE justask_production OWNER justask;
template1=# \q

Try connecting to the database:

$ psql -U justask -d justask_production

justask

Clone the Source

$ git clone https://git.rrerr.net/nilsding/justask.git justask

Configure It

# Change into the justask directory
$ cd justask

# Copy the example config
$ cp config/justask.yml.example config/justask.yml

# Edit the configuration file
$ vi config/justask.yml

Database Configuration

$ cp config/database.yml.postgres config/database.yml
$ vi config/database.yml

# Make database.yml readable only for you
chmod o-rwx config/database.yml

Install Gems

# Deployment:
$ bundle install --deployment --without development test mysql

# Development:
$ bundle install --without production mysql

Initialize Database

$ bundle exec rake db:migrate RAILS_ENV=production

Compile Assets

$ bundle exec rake assets:precompile RAILS_ENV=production

Run the server

# Production mode:
$ foreman start

# Development mode:
$ bundle exec rails server

Create an account on your justask installation.

To make yourself an admin, just execute:

$ bundle exec rake 'justask:admin[your_username]' RAILS_ENV=production

If you want to remove admin status from a certain user, you can do this:

$ bundle exec rake 'justask:deadmin[get_rekt]' RAILS_ENV=production

Add/remove moderators:

$ bundle exec rake 'justask:mod[someone_else]' RAILS_ENV=production
$ bundle exec rake 'justask:demod[someone_else]' RAILS_ENV=production