mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:31 +02:00
add scrapyd-onbuild
This commit is contained in:
parent
195c9e5c41
commit
571d74d6d4
58
scrapyd-onbuild/Dockerfile
Normal file
58
scrapyd-onbuild/Dockerfile
Normal file
@ -0,0 +1,58 @@
|
||||
#
|
||||
# Dockerfile for scrapyd-onbuild
|
||||
#
|
||||
|
||||
FROM debian:jessie
|
||||
MAINTAINER kev <noreply@datageek.info>
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y autoconf \
|
||||
build-essential \
|
||||
curl \
|
||||
git \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libtool \
|
||||
python \
|
||||
python-dev \
|
||||
vim-tiny \
|
||||
&& mkdir libxml2 \
|
||||
&& curl -sSL ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz | tar xz --strip 1 -C libxml2 \
|
||||
&& cd libxml2 \
|
||||
&& ./configure --prefix=/usr \
|
||||
&& make \
|
||||
&& make install \
|
||||
&& ldconfig \
|
||||
&& cd .. \
|
||||
&& rm -rf libxml2 \
|
||||
&& mkdir libxslt \
|
||||
&& curl -sSL https://git.gnome.org/browse/libxslt/snapshot/libxslt-1.1.28.tar.xz | tar xJ --strip 1 -C libxslt \
|
||||
&& cd libxslt \
|
||||
&& ./autogen.sh --prefix=/usr \
|
||||
&& make \
|
||||
&& make install \
|
||||
&& ldconfig \
|
||||
&& cd .. \
|
||||
&& rm -rf libxslt \
|
||||
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python \
|
||||
&& pip install scrapy==0.24.6 scrapyd==1.0.1 \
|
||||
&& curl -sSL https://github.com/scrapy/scrapy/raw/master/extras/scrapy_bash_completion -o /etc/bash_completion.d/scrapy_bash_completion \
|
||||
&& echo 'source /etc/bash_completion.d/scrapy_bash_completion' >> /root/.bashrc \
|
||||
&& apt-get remove -y autoconf \
|
||||
build-essential \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libtool \
|
||||
python-dev \
|
||||
&& apt-get autoremove -y
|
||||
|
||||
ADD ./scrapyd.conf /etc/scrapyd/
|
||||
VOLUME /etc/scrapyd/ /var/lib/scrapyd/
|
||||
EXPOSE 6800
|
||||
|
||||
ONBUILD ADD ./packages.txt /etc/scrapyd/
|
||||
ONBUILD RUN cat /etc/scrapyd/packages.txt | xargs apt-get install -y
|
||||
ONBUILD ADD ./requirements.txt /etc/scrapyd/
|
||||
ONBUILD RUN pip install -r /etc/scrapyd/requirements.txt
|
||||
|
||||
CMD ["scrapyd"]
|
5
scrapyd-onbuild/README.md
Normal file
5
scrapyd-onbuild/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
scrapyd-onbuild
|
||||
===============
|
||||
|
||||
Dockerfile for building an image that runs [scrapyd][1].
|
||||
|
1
scrapyd-onbuild/packages.txt
Normal file
1
scrapyd-onbuild/packages.txt
Normal file
@ -0,0 +1 @@
|
||||
libpq-dev
|
1
scrapyd-onbuild/requirements.txt
Normal file
1
scrapyd-onbuild/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
psycopg2
|
26
scrapyd-onbuild/scrapyd.conf
Normal file
26
scrapyd-onbuild/scrapyd.conf
Normal file
@ -0,0 +1,26 @@
|
||||
[scrapyd]
|
||||
eggs_dir = /var/lib/scrapyd/eggs
|
||||
logs_dir = /var/lib/scrapyd/logs
|
||||
items_dir = /var/lib/scrapyd/items
|
||||
dbs_dir = /var/lib/scrapyd/dbs
|
||||
jobs_to_keep = 5
|
||||
max_proc = 0
|
||||
max_proc_per_cpu = 4
|
||||
finished_to_keep = 100
|
||||
poll_interval = 5
|
||||
http_port = 6800
|
||||
debug = off
|
||||
runner = scrapyd.runner
|
||||
application = scrapyd.app.application
|
||||
launcher = scrapyd.launcher.Launcher
|
||||
|
||||
[services]
|
||||
schedule.json = scrapyd.webservice.Schedule
|
||||
cancel.json = scrapyd.webservice.Cancel
|
||||
addversion.json = scrapyd.webservice.AddVersion
|
||||
listprojects.json = scrapyd.webservice.ListProjects
|
||||
listversions.json = scrapyd.webservice.ListVersions
|
||||
listspiders.json = scrapyd.webservice.ListSpiders
|
||||
delproject.json = scrapyd.webservice.DeleteProject
|
||||
delversion.json = scrapyd.webservice.DeleteVersion
|
||||
listjobs.json = scrapyd.webservice.ListJobs
|
Loading…
Reference in New Issue
Block a user