-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for HAPROXY load balancer (#6)
* 1) Added support for HAPROXY load balancer and example in docker-compose 2) Fixed Readme * 1) Fixed compose and README.md for it. * Forgot to fix in click Co-authored-by: Yatskov <[email protected]>
- Loading branch information
Showing
13 changed files
with
76 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: "3.7" | ||
|
||
services: | ||
|
||
scrapy-puppeteer-service-1: | ||
build: | ||
context: . | ||
ports: | ||
- "3001:3000" | ||
|
||
scrapy-puppeteer-service-2: | ||
build: | ||
context: . | ||
ports: | ||
- "3002:3000" |
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,25 @@ | ||
version: "3.7" | ||
|
||
services: | ||
haproxy: | ||
image: "haproxy" | ||
ports: | ||
- "3000:3000" | ||
volumes: | ||
- "./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro" | ||
|
||
scrapy-puppeteer-service-1: | ||
image: "isprascrawlers/scrapy-puppeteer-service" | ||
environment: | ||
TIMEOUT: 600000 | ||
cap_add: | ||
- SYS_ADMIN | ||
restart: always | ||
|
||
scrapy-puppeteer-service-2: | ||
image: "isprascrawlers/scrapy-puppeteer-service" | ||
environment: | ||
TIMEOUT: 600000 | ||
cap_add: | ||
- SYS_ADMIN | ||
restart: always |
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,15 @@ | ||
frontend entrypoint | ||
bind 0.0.0.0:3000 | ||
mode http | ||
default_backend balancer | ||
|
||
backend balancer | ||
mode http | ||
option httpclose | ||
balance leastconn | ||
stick-table type string len 64 size 100k expire 15m | ||
stick store-response res.hdr(scrapy-puppeteer-service-context-id) | ||
stick match urlp(contextId) | ||
server app1 scrapy-puppeteer-service-1:3000 check | ||
server app2 scrapy-puppeteer-service-2:3000 check | ||
|
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
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
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