This is the project for the Appatite website.
If you want to run Appatite on your own machine, follow these instructions.
The easiest way to get everything installed is by using Vagrant. Run the following command to spin up a dev machine running the app:
vagrant up
You can now access the machine:
vagrant ssh
cd /vagrant
Run the tests:
bin/rails rubocop # lint ruby code
bin/rails spec # test ruby code
bin/rails teaspoon # test javascript code
Start the server:
bin/rails server -b 0.0.0.0
You can now access the app on http://localhost:3000.
Follow these steps to install the web app manually on a system.
Install Ruby using rvm or rbenv. Recommended version is 2.3.1.
For RVM, do the following:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --rails --ruby=2.3.1
Install PostgreSQL by issuing the following commands:
brew install postgres
initdb /usr/local/var/postgres -E utf8
gem install lunchy
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/<VERSION>/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
lunchy start postgres
apt-get -y install postgresql postgresql-contrib libpq-dev
sudo su - postgres -c 'createuser $(whoami) -s;'
Install Bundler for managing Ruby gems:
gem install bundler
Continue to install all Ruby gem dependencies for the web app:
bundle
Create the database
bin/rails db:setup
That's it! You can now run the tests and start the server just as described above in the Vagrant section.
To enable signing in with GitHub or GitLab you need to register an app with those providers.
Register your application on Github
and Gitlab to get your ID and secret.
Set callback URL to https://<HOSTNAME>/users/auth/gitlab/callback
.
Enter the credentials on the settings page in the admin area.
If you want to use Sentry to track app crashes and errors you need to add a line
like the following to the file .env
:
SENTRY_DSN=https://XXXX:[email protected]/XXXX
Restart the app after changing this file.