mirror of
https://github.com/netzbegruenung/green-spider.git
synced 2024-05-03 01:24:51 +02:00
Change to run spider in Docker container
This commit is contained in:
parent
7ce779e52d
commit
4de5890c60
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
.git
|
||||||
|
webapp
|
||||||
|
docs
|
||||||
|
secrets
|
||||||
|
temp
|
||||||
|
venv
|
|
@ -1 +1,10 @@
|
||||||
FROM python:3.6-alpine3.7
|
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
|
.PHONY: webapp
|
||||||
|
|
||||||
# Python venv for running the spider locally
|
# Build docker image and run spider in Docker container
|
||||||
venv:
|
spider:
|
||||||
virtualenv -p python3 venv
|
docker pull python:3.6-alpine3.7
|
||||||
venv/bin/pip3 install -r requirements.txt
|
docker build -t spider .
|
||||||
|
docker run --rm -ti -v $(PWD):/out spider
|
||||||
spider: venv
|
|
||||||
venv/bin/python ./spider.py
|
|
||||||
|
|
||||||
screenshots: venv
|
screenshots: venv
|
||||||
docker pull netzbegruenung/green-spider-screenshotter:latest
|
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_direcory_data_path = 'data/countries/de'
|
||||||
green_directory_local_path = './cache/green-directory'
|
green_directory_local_path = './cache/green-directory'
|
||||||
|
|
||||||
result_path = './webapp/dist/data'
|
result_path = '/out'
|
||||||
|
|
||||||
# IP address of the newthinking GCMS server
|
# IP address of the newthinking GCMS server
|
||||||
gcms_ip = "91.102.13.20"
|
gcms_ip = "91.102.13.20"
|
||||||
|
|
Loading…
Reference in a new issue