Skip to content

Commit

Permalink
Update haipproxy/config/settings.py
Browse files Browse the repository at this point in the history
make docker start easily.
  • Loading branch information
kongminhao committed Nov 11, 2018
1 parent 2fe6210 commit 320e5c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions haipproxy/config/settings.py
Expand Up @@ -5,6 +5,7 @@
# Scrapy settings of this project
#####################################################################
# scrapy basic info
import os
BOT_NAME = 'haiproxy'
SPIDER_MODULES = ['haipproxy.crawler.spiders', 'haipproxy.crawler.validators']
NEWSPIDER_MODULE = 'haipproxy.crawler'
Expand All @@ -25,6 +26,8 @@

# splash settings.If you use docker-compose,SPLASH_URL = 'http://splash:8050'
SPLASH_URL = 'http://127.0.0.1:8050'
if os.getenv("ISDOCKER"):
SPLASH_URL = 'http://splash:8050'

# extension settings
RETRY_ENABLED = False
Expand Down Expand Up @@ -58,6 +61,8 @@
# redis settings.If you use docker-compose, REDIS_HOST = 'redis'
# if some value is empty, set like this: key = ''
REDIS_HOST = '127.0.0.1'
if os.getenv("ISDOCKER"):
REDIS_HOST = 'redis'
REDIS_PORT = 6379
REDIS_PASSWORD = '123456'
REDIS_DB = 0
Expand Down

0 comments on commit 320e5c3

Please sign in to comment.