Change to run spider in Docker container

This commit is contained in:
Marian Steinbach 2018-05-03 10:22:10 +02:00
parent 7ce779e52d
commit 4de5890c60
4 changed files with 21 additions and 8 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
.git
webapp
docs
secrets
temp
venv

View File

@ -1 +1,10 @@
FROM python:3.6-alpine3.7
ADD requirements.txt /
RUN pip install -r requirements.txt
RUN apk add --no-cache git
ADD spider.py /
ENTRYPOINT ["python", "spider.py"]

View File

@ -2,13 +2,11 @@
.PHONY: webapp
# Python venv for running the spider locally
venv:
virtualenv -p python3 venv
venv/bin/pip3 install -r requirements.txt
spider: venv
venv/bin/python ./spider.py
# Build docker image and run spider in Docker container
spider:
docker pull python:3.6-alpine3.7
docker build -t spider .
docker run --rm -ti -v $(PWD):/out spider
screenshots: venv
docker pull netzbegruenung/green-spider-screenshotter:latest

View File

@ -37,7 +37,7 @@ green_directory_repo = 'https://github.com/netzbegruenung/green-directory.git'
green_direcory_data_path = 'data/countries/de'
green_directory_local_path = './cache/green-directory'
result_path = './webapp/dist/data'
result_path = '/out'
# IP address of the newthinking GCMS server
gcms_ip = "91.102.13.20"