Take the hassle out of web scraping
Ruby, Docker, MySQL, SQLite 3, Redis, mitmproxy. (See below for more details about installing Docker)
An ansible playbook is provided to provision:
Read the provisioning README for further details.
.rubocop.yml) to encourage good practicesapp/assets/images/logo.png (you can add this after the app is
created)/github/webhook on the endFor staging servers, you will need to add the callback url.
https://morph-staging.thesite.info/users/auth/github/callbackNext you'll need to fill in some values in the .env file which come from the GitHub App that you've just created.
GITHUB_APP_ID - Look for "App ID" near the top of the page. This should be an integerGITHUB_APP_NAME - Look for "Public link". The name is what appears after "https://github.com/settings/apps/".
It's essentially a url happy version of the name you gave the app.GITHUB_APP_CLIENT_ID - Look for "Client ID" near the top of the page.GITHUB_APP_CLIENT_SECRET - Go to "Generate a new client secret".GITHUB_APP_INSTALLED_BY - A user that has installed the app (used by tests)Also, a private key for the GitHub app is needed.
This can be generated by clicking the "Generate a private key" button and will be automatically downloaded.
Move and rename it to config/morph-github-app.private-key.pem.
For the staging server it will need to be copied to:
deploy@morph-staging:/var/www/shared/config/morph-github-app.private-key.pem
And it should have permission 0600 and be owned by deploy user.
You may have to add write perms to this file first using
chmod +w /var/www/shared/config/morph-github-app.private-key.pem,
if the staging server is a clone of production as otherwise you won't be able to update it.
Now setup the databases:
bundle exec dotenv rake db:setupNow you can start the server
bundle exec dotenv foreman startand point your browser at http://127.0.0.1:3000
To get started, log in with GitHub. There is a simple admin interface accessible at http://127.0.0.1:3000/admin. To access this, run the following to give your account admin rights:
bundle exec rake app:promote_to_adminSee TESTING.md for automated and manual testing instructions.
We use Guard and Livereload so that whenever you edit a view in development the web page gets automatically reloaded. It's a massive time saver when you're doing design or lots of work in the view. To make it work run
bundle exec guardGuard will also run tests when files change. See TESTING.md for how to control which tests are run.
By default in development mails are sent to Mailcatcher. To install
gem install mailcatcherUnder Run → Edit Configurations → your RSpec configuration, set Environment variable: DISABLE_SPRING=1
This section will not be relevant to most people. It will however be relevant if you're deploying to a production server.
To deploy morph.io to production, normally you'll just want to deploy using Capistrano:
cap production deployRead the provisioning README for details of how to provision from updated ansible playbooks.
Copyright OpenAustralia Foundation Limited. Licensed under the Affero GPL. See LICENSE file for more details.
No open issues yet, or sync has not completed.