pastebinner/README.md

32 lines
1.5 KiB
Markdown
Raw Normal View History

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
2018-08-16 14:54:08 -05:00
2022-01-27 03:41:43 +00:00
### 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
2022-01-27 03:41:43 +00:00
1. Create a .pastebin_creds file that contains the following environment vars
2018-08-16 14:54:08 -05:00
```
pastebin_api_key
pastebin_username
pastebin_password
```
2018-08-16 14:54:08 -05:00
2022-01-27 03:41:43 +00:00
this should store the creds in a file that is .gitignored and will allow the application to correctly scrape paste data.
2022-01-27 03:41:43 +00:00
### To use:
`docker-compose up`
2022-01-27 03:41:43 +00:00
This will create the following containers and services:
- pastebinner-rails
- pastebinner-elasticsearch
- pastebinner-redis
- pastebinner-kibana
- pastebinner-sidekiq
2018-08-16 14:54:08 -05:00
2022-01-27 03:41:43 +00:00
### 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`