Go to file
Georg G 141db2e521 Merge branch 'master' of github.com:Retrospring/retrospring 2015-04-19 00:43:04 +02:00
app Merge branch 'master' of github.com:Retrospring/retrospring 2015-04-19 00:43:04 +02:00
bin
config Markdown preview through AJAX (/ajax/preview) 2015-04-19 03:47:13 +05:30
db forgot to add migration and everything 2015-01-25 20:30:53 +01:00
docs added nginx configuration, ASS runscript 2015-04-02 01:12:01 +02:00
lib added jquery.guillotine 2014-12-29 15:47:10 +01:00
log
public it would be nice if you'd actually include this icon 2015-01-10 13:58:51 +01:00
spec update test 2015-01-31 16:26:22 +01:00
tmp
vendor/assets
.gitignore
.rspec
Gemfile update gems 2015-04-18 21:50:08 +02:00
Gemfile.lock update gems 2015-04-18 21:50:08 +02:00
LICENSE added license (AGPLv3) 2015-04-02 01:39:46 +02:00
Procfile
README.md update README 2015-04-02 01:39:55 +02:00
Rakefile update Rakefile 2015-03-27 18:06:30 +01:00
TODO Update TODO 2015-04-02 02:07:17 +02:00
config.ru

README.md

justask (aka. the software behind Retrospring)

This is the source code that powered Retrospring. Yep, all of it. Including all the branches where we left off.

Requirements

  • UNIX-like system (Linux, FreeBSD, ...)
  • Ruby 2.0.0+
  • Bundler
  • PostgreSQL
  • Redis (for Sidekiq)
  • ImageMagick (for image processing)

Installation (production)

We've installed justask on FreeBSD 10 using rvm. What we also did was creating a new, seperate user just for justask to run in. On FreeBSD, this is done with:

# pw user add justask

Database

At Retrospring, we were using PostgreSQL as the database backend. The software might work on MySQL too, but that was not tested.

Installation from Ports (using portmaster):

# portmaster databases/postgresql93-server

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

nginx

See docs/nginx.conf for the configuration we used on Retrospring.

justask

Clone the Source

$ git clone https://github.com/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

Now, 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 (this can be done via the web interface by visiting an user as an admin):

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

Add/remove supporters (this can be done via the web interface by visiting an user as an admin/mod):

$ bundle exec rake 'justask:sup[someone_else]' RAILS_ENV=production
$ bundle exec rake 'justask:desup[someone_else]' RAILS_ENV=production

Export user data:

$ bundle exec rake 'justask:export[jdoe@example.tld]' RAILS_ENV=production

Find the user(s) with the most self-asked anonymous questions:

$ bundle exec rake justask:loners

The Official Retrospring Closedown Soundtrack™

License

AGPLv3.