A simple OpenFaaS/faasd wrapper around PHP Scraper. Essentially turning your scraper into a function.
- Fork and clone the fork.
- Adjust the
stack.yml
file with your docker hub name. - Change the handler to your needs.
faas-cli up --gateway http://faasd.somewhere.com:8080
.
-
Create a secret:
echo $(head -c 16 /dev/urandom | shasum | cut -d "-" -f1) > token.txt
-
Store it on the server:
faas-cli secret create phpscraper-token --from-file token.txt --gateway http://yourfaasd.somewhere.com:8080
-
Deploy as usual:
faas-cli up --gateway http://yourfaasd.somewhere.com:8080
For more information on core functionality of PHPScraper check the documentation. The tests and examples can also help understanding it better.