Change to run spider in Docker container
This commit is contained in:
parent
7ce779e52d
commit
4de5890c60
|
@ -0,0 +1,6 @@
|
|||
.git
|
||||
webapp
|
||||
docs
|
||||
secrets
|
||||
temp
|
||||
venv
|
|
@ -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"]
|
||||
|
|
12
Makefile
12
Makefile
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue