This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
1,072 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"taskdb": "couchdb+taskdb://couchdb:5984", | ||
"projectdb": "couchdb+projectdb://couchdb:5984", | ||
"resultdb": "couchdb+resultdb://couchdb:5984", | ||
"message_queue": "amqp://rabbitmq:5672/%2F", | ||
"webui": { | ||
"username": "username", | ||
"password": "password", | ||
"need-auth": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
version: "3.7" | ||
|
||
# replace /path/to/dir/ to point to config.json | ||
|
||
# The RabbitMQ and CouchDB services can take some time to startup. | ||
# During this time most of the pyspider services will exit and restart. | ||
# Once RabbitMQ and CouchDB are fully up and running everything should run as normal. | ||
|
||
services: | ||
rabbitmq: | ||
image: rabbitmq:alpine | ||
container_name: rabbitmq | ||
networks: | ||
- pyspider | ||
command: rabbitmq-server | ||
couchdb: | ||
image: couchdb:latest | ||
container_name: couchdb | ||
networks: | ||
- pyspider | ||
ports: | ||
- "5984:5984" | ||
environment: | ||
- COUCHDB_NAME=couchdb | ||
- COUCHDB_PORT_5984_TCP_ADDR=couchdb | ||
- COUCHDB_PORT_5984_TCP_PORT=5984 | ||
- COUCHDB_USER=user | ||
- COUCHDB_PASSWORD=password | ||
#- COUCHDB_HTTPS=true # enable if running couchdb over https | ||
# OR we can replace couchdb with mysql | ||
#mysql: | ||
# image: mysql:latest | ||
# container_name: mysql | ||
# volumes: | ||
# - /tmp:/var/lib/mysql | ||
# environment: | ||
# - MYSQL_ALLOW_EMPTY_PASSWORD=yes | ||
# networks: | ||
# - pyspider | ||
phantomjs: | ||
image: pyspider:latest | ||
container_name: phantomjs | ||
networks: | ||
- pyspider | ||
volumes: | ||
- /path/to/dir/config.json:/opt/pyspider/config.json | ||
command: -c config.json phantomjs | ||
environment: | ||
- COUCHDB_NAME=couchdb | ||
- COUCHDB_PORT_5984_TCP_ADDR=couchdb | ||
- COUCHDB_PORT_5984_TCP_PORT=5984 | ||
- COUCHDB_USER=user | ||
- COUCHDB_PASSWORD=password | ||
depends_on: | ||
- couchdb | ||
- rabbitmq | ||
restart: unless-stopped | ||
result: | ||
image: pyspider:latest | ||
container_name: result | ||
networks: | ||
- pyspider | ||
volumes: | ||
- /path/to/dir/config.json:/opt/pyspider/config.json | ||
command: -c config.json result_worker | ||
environment: | ||
- COUCHDB_NAME=couchdb | ||
- COUCHDB_PORT_5984_TCP_ADDR=couchdb | ||
- COUCHDB_PORT_5984_TCP_PORT=5984 | ||
- COUCHDB_USER=user | ||
- COUCHDB_PASSWORD=password | ||
depends_on: | ||
- couchdb | ||
- rabbitmq | ||
restart: unless-stopped # Sometimes we'll get a connection refused error because couchdb has yet to fully start | ||
processor: | ||
container_name: processor | ||
image: pyspider:latest | ||
networks: | ||
- pyspider | ||
volumes: | ||
- /path/to/dir/config.json:/opt/pyspider/config.json | ||
command: -c config.json processor | ||
environment: | ||
- COUCHDB_NAME=couchdb | ||
- COUCHDB_PORT_5984_TCP_ADDR=couchdb | ||
- COUCHDB_PORT_5984_TCP_PORT=5984 | ||
- COUCHDB_USER=user | ||
- COUCHDB_PASSWORD=password | ||
depends_on: | ||
- couchdb | ||
- rabbitmq | ||
restart: unless-stopped | ||
fetcher: | ||
image: pyspider:latest | ||
container_name: fetcher | ||
networks: | ||
- pyspider | ||
volumes: | ||
- /path/to/dir/config.json:/opt/pyspider/config.json | ||
command : -c config.json fetcher | ||
environment: | ||
- COUCHDB_NAME=couchdb | ||
- COUCHDB_PORT_5984_TCP_ADDR=couchdb | ||
- COUCHDB_PORT_5984_TCP_PORT=5984 | ||
- COUCHDB_USER=user | ||
- COUCHDB_PASSWORD=password | ||
depends_on: | ||
- couchdb | ||
- rabbitmq | ||
restart: unless-stopped | ||
scheduler: | ||
image: pyspider:latest | ||
container_name: scheduler | ||
networks: | ||
- pyspider | ||
volumes: | ||
- /path/to/dir/config.json:/opt/pyspider/config.json | ||
command: -c config.json scheduler | ||
environment: | ||
- COUCHDB_NAME=couchdb | ||
- COUCHDB_PORT_5984_TCP_ADDR=couchdb | ||
- COUCHDB_PORT_5984_TCP_PORT=5984 | ||
- COUCHDB_USER=user | ||
- COUCHDB_PASSWORD=password | ||
depends_on: | ||
- couchdb | ||
- rabbitmq | ||
restart: unless-stopped | ||
webui: | ||
image: pyspider:latest | ||
container_name: webui | ||
ports: | ||
- "5050:5000" | ||
networks: | ||
- pyspider | ||
volumes: | ||
- /path/to/dir/config.json:/opt/pyspider/config.json | ||
environment: | ||
- SCHEDULER_PORT_23333_TCP_ADDR=scheduler | ||
- COUCHDB_NAME=couchdb | ||
- COUCHDB_PORT_5984_TCP_ADDR=couchdb | ||
- COUCHDB_PORT_5984_TCP_PORT=5984 | ||
- COUCHDB_USER=user | ||
- COUCHDB_PASSWORD=password | ||
command: -c config.json webui | ||
depends_on: | ||
- couchdb | ||
- rabbitmq | ||
restart: unless-stopped | ||
|
||
networks: | ||
pyspider: | ||
external: | ||
name: pyspider | ||
default: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.