rails app that takes and stores pastes from pastebin
Find a file
2022-01-27 03:41:44 +00:00
app Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
bin Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
config Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
db Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
examples converting to standalone gem for basic interaction with pastebin api and cmdline client 2019-10-29 21:01:03 -05:00
lib Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
log Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
public Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
spec made elastic search helper better and made pastebinner pack json 2019-02-01 22:19:36 -06:00
storage Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
test Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
tmp Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
vendor Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
.browserslistrc Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
.env Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
.gitignore Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
.rspec initial commit 2018-08-16 14:54:08 -05:00
.ruby-version Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
.travis.yml initial commit 2018-08-16 14:54:08 -05:00
babel.config.js Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
config.ru Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
docker-compose-2.4.yml Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
docker-compose-3.9.yml Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
docker-compose.yml Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
Dockerfile Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
Gemfile Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
Gemfile.lock Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
LICENSE Initial commit 2018-08-16 14:52:20 -05:00
NOTES.md Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
package.json Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
pastebinner-lock Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
pastebinner.gemspec slowly updating documentation with rdoc stuff so we can generate yard server 2020-01-02 01:19:10 -06:00
postcss.config.js Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
Rakefile Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
README.md Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
README.md.default made an actual readme to explain how to download pastes 2018-11-09 22:53:09 -06:00
sidekiq.sh.template Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00
yarn.lock Convert pastebinner to rails app 2022-01-27 03:41:43 +00:00

README

You need docker-compose installed.

  • disable ipv6 if you dont want to use it in this file under the networks: section. You can just comment the ipv6 subnet,gateway,enable lines to do that

Before you start:

You should have a Pastebin Pro API membership. You will also need to whitelist your IP Address. I have had success with both Ipv4 and Ipv6 addresses. This allows you access to the scraping API: https://pastebin.com/doc_scraping_api

  1. Create a .pastebin_creds file that contains the following environment vars
pastebin_api_key
pastebin_username
pastebin_password

this should store the creds in a file that is .gitignored and will allow the application to correctly scrape paste data.

To use:

docker-compose up

This will create the following containers and services:

  • pastebinner-rails
  • pastebinner-elasticsearch
  • pastebinner-redis
  • pastebinner-kibana
  • pastebinner-sidekiq

Interacting:

You can access the Kibana search interface at https://localhost:5601. This is just an interface into Kibana. You will need to create the pastes index pattern at first visit. It should then be scraping public pastes every 1 min. Any duplicate pastes keys are stored in Redis and will not be retrieved twice so we are not sending dupes to our ES db. To view status of jobs you can visit the sidekiq dashboard at http://localhost:3000/sidekiq To view the status of the worker job, you can view the sidekiq logs with docker-compose logs pastebinner-sidekiq