{% extends 'base.html' %} {% block title %}deploy project{% endblock %} {% block head %} {% if SCRAPYD_SERVERS_AMOUNT > 1 %} {% endif %} {% endblock %} {% block body %}
Deploying your project involves packaging it and uploading the egg file to Scrapyd. (See Scrapyd addversion.json) You can do this manually, but the easiest way is to use the scrapyd-deploy tool. (See scrapyd-client)
Note: Scrapyd uses the distutils LooseVersion to interpret the version numbers you provide. (See _ClassType LooseVersion) And setting the version arbitrarily may cause the scrapyd API 'listversions' to raise error like "builtins.TypeError: '<' not supported between instances of 'str' and 'int'".
Auto packaging (projects stored in the ScrapydWeb host)
Step 1: set up the SCRAPY_PROJECTS_DIR option for locating projects before starting up ScrapydWeb
Step 2: select any project found in SCRAPY_PROJECTS_DIR to deploy via this page
Upload an egg file (from any host)
Step 0: execute the "pip install scrapyd-client" command
Step 1: cd into your project's root, then execute the "scrapyd-deploy --build-egg projectname.egg" command
Step 2: upload the built egg file via this page
Upload a compressed file (from any host)
Step 1: compress your project folder into an archive file (.zip) with an archiving software or via the tar command:
$ tar -czvf projectname.tar.gz /path/to/your/projectname
Step 2: upload the compressed file via this page
{{ SCRAPY_PROJECTS_DIR }}