Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

morph

> DevOps
Open source

Take the hassle out of web scraping

480 stars0 likes3 views
WebsiteGitHub

About

Take the hassle out of web scraping

morph.io: A scraping platform

  • A Heroku lookalike system for Scrapers
  • All code and collaboration through GitHub
  • Write your scrapers in Ruby, Python, PHP, Perl or JavaScript (NodeJS, PhantomJS)
  • Simple API to grab data
  • Schedule scrapers or run manually
  • Process isolation via Docker
  • Email alerts for broken scrapers

Dependencies

Ruby, Docker, MySQL, SQLite 3, Redis, mitmproxy. (See below for more details about installing Docker)

Provisioning using Ansible

An ansible playbook is provided to provision:

  • staging on a local Vagrant VM
  • production

Read the provisioning README for further details.

Requirements

  • A supported version of Ubuntu LTS, macOS/X or MS Windows is required.
  • 8 GB of memory is the minimum, 16 GB is recommended
  • SSD Disk

Coding Standards

  • Must pass RuboCop (as configured in .rubocop.yml) to encourage good practices
  • Must pass RSpec tests – please write specs for any new code
  • Be nice to other developers and future you:
    • Clear, descriptive naming - code should tell you what it's doing
    • Add comments to explain WHY – when it's not obvious from the code itself
    • Keep methods small – ideally one paragraph, definitely under one screen page
    • Split large files – keep files /users/auth/github/callback
    • Change the port for the local urls if you are not using the default port 3000 for the rails app
  • Add an image - you can use the standard logo at app/assets/images/logo.png (you can add this after the app is created)
  • If the webhooks are active and being used in production (currently not the case) then you'll also need to:
    • add a "Webhook secret" for security.
    • add a "Webhook URL" - the ngrok url with /github/webhook on the end

For staging servers, you will need to add the callback url.

  • User settings switch context to Open Australia (if you have sufficient permissions), otherwise you will need to use an app under your personal or an organisation you have permission for.
  • Navigate to Developer Settings
  • Under GitHub Apps you should have a Morph.io app
  • Click Edit and scroll down to the "Identifying and authorizing users" section
  • Click "Add Callback URL" if your url is not already present, eg:
    • https://morph-staging.thesite.info/users/auth/github/callback

Next 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 integer
  • GITHUB_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:setup

Now you can start the server

bundle exec dotenv foreman start

and 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_admin

Testing

See TESTING.md for automated and manual testing instructions.

Guard Livereload

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 guard

Guard will also run tests when files change. See TESTING.md for how to control which tests are run.

Mail in development

By default in development mails are sent to Mailcatcher. To install

gem install mailcatcher

Rubymine specific advice

Disable Spring in RubyMine:

Under Run → Edit Configurations → your RSpec configuration, set Environment variable: DISABLE_SPRING=1

Deploying to production

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 deploy

Read the provisioning README for details of how to provision from updated ansible playbooks.

Copyright & License

Copyright OpenAustralia Foundation Limited. Licensed under the Affero GPL. See LICENSE file for more details.

Issues· 220 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubycivictechdockerwebscraping

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理