Starting scrapyd docker container with eggs included
See original GitHub issueHi I’ve been experimenting a little with scrapyd on docker, and done the following:
- in the config file, i specified different directory for eggs
eggs_dir = /src/eggs
- in dockerfile, i added prebuilt projects to this directory
ADD eggs /src/eggs
At first glance, it looked like it’s working
but, when I wanted to make a scheduje.json post, it returned me an error
{“node_name”: “295e305bea8e”, “status”: “error”, “message”: “Scrapy 1.4.0 - no active project\n\nUnknown command: list\n\nUse "scrapy" to see available commands\n”}
I could type anything into project and spider fields and the result was the same. How can I fix this issue?
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Running command after server started - Docker, scrapyd ...
So, I found a way to get the scrapyd server process to the ... Set bash monitor mode on; run server on the...
Read more >vimagick/scrapyd - Docker Image
scrapyd is a service for running Scrapy spiders. It allows you to deploy your Scrapy projects and control their spiders using a HTTP...
Read more >Introduction — Gerapy 0.9.3 documentation
Complete the deployment of Scrapy projects with Scrapyd; Control the startup and status monitoring of Scrapy projects through the API provided by Scrapyd...
Read more >基于Docker的Scrapy+Scrapyd+Scrapydweb部署 - CSDN博客
文章开始,先摘录一下文中各软件的官方定义ScrapyAn open source and collaborative framework for extracting the data youneed from websites.
Read more >Scrapyd | My knowledge base - My deep learning
Scrapyd is an application for deploying and running Scrapy spiders. ... Загрузка egg на сервер Scrapyd через конечную точку addversion.json.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@VanDavv @iamprageeth @radyz
I managed to solve the problem without using the API. Unfortunately, there is no way to deploy Scrapy projects without the
egg
files completely (the only way is to override somescrapyd
components), so you’ll need a simple deployment script:build.sh
:Dockerfile
:That’s all! So instead of deploying
myproject.egg
into theeggs
folder directly, you have to create the following structure:eggs/myproject/1_0.egg
wheremyproject
is your project name, and1_0
is a version of your project inscrapyd
I managed to get through this by running a background deploy after my scrapyd instance has started. Not sure it’s the best way but it works for me now
Dockerfile
Entrypoint script
scrapy.cfg
This assumes you are copying your scrapy project folder into
/scrapyd
and have therequirements.tx
with all your dependencies (including scrapyd server)