1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:50 +02:00
This commit is contained in:
kev 2019-11-03 04:34:23 +08:00
parent fdd9fff144
commit a92a4daac7
10 changed files with 71 additions and 0 deletions

View File

@ -65,6 +65,7 @@ A collection of delicious docker recipes.
- [x] drone-scp-arm
- [x] drone-ssh-arm
- [x] errbot :octocat:
- [x] ggr
- [x] hubot :octocat:
- [x] jenkins-arm :beetle:

15
ggr/Dockerfile Normal file
View File

@ -0,0 +1,15 @@
#
# Dockerfile for ggr
#
FROM golang:alpine
RUN apk add --no-cache git
RUN go get -v github.com/kelseyhightower/confd
FROM aerokube/ggr
RUN apk add --no-cache libxml2-utils supervisor
COPY --from=0 /go/bin/confd /usr/bin/
COPY data/confd /etc/confd
COPY data/supervisor.d /etc/supervisor.d
COPY data/grid-router /etc/grid-router
ENTRYPOINT ["supervisord", "-n", "-c", "/etc/supervisord.conf"]

8
ggr/README.md Normal file
View File

@ -0,0 +1,8 @@
ggr
===
Go Grid Router (aka [Ggr][1]) is a lightweight active load balancer used to
create scalable and highly-available Selenium clusters.
[1]: https://github.com/aerokube/ggr

View File

@ -0,0 +1,6 @@
[template]
src = "guest.xml.tmpl"
dest = "/etc/grid-router/quota/guest.xml"
keys = ["/"]
check_cmd = "xmllint --noout /etc/grid-router/quota/guest.xml"
reload_cmd = "supervisorctl signal HUP ggr"

View File

@ -0,0 +1,11 @@
<qa:browsers xmlns:qa="urn:config.gridrouter.qatools.ru">
<browser name="{{getenv "BROWSER_NAME" "chrome"}}" defaultVersion="{{getenv "BROWSER_VERSION" "78.0"}}">
<version number="{{getenv "BROWSER_VERSION" "78.0"}}">
<region name="{{getenv "BROWSER_REGION" "1"}}">
{{range lookupIP (getenv "BROWSER_HOSTS" "tasks.chrome")}}
<host name="{{.}}" port="{{getenv "BROWSER_PORT" "5555"}}" count="{{getenv "BROWSER_COUNT" "1"}}"/>
{{end}}
</region>
</version>
</browser>
</qa:browsers>

View File

@ -0,0 +1,8 @@
<qa:browsers xmlns:qa="urn:config.gridrouter.qatools.ru">
<browser name="chrome" defaultVersion="78.0">
<version number="78.0">
<region name="1">
</region>
</version>
</browser>
</qa:browsers>

View File

View File

@ -0,0 +1,2 @@
[program:confd]
command = confd -watch -backend file -file /dev/null

View File

@ -0,0 +1,2 @@
[program:ggr]
command = ggr -listen :4444 -users /etc/grid-router/users.htpasswd -quotaDir /etc/grid-router/quota -guests-allowed

18
ggr/docker-compose.yml Normal file
View File

@ -0,0 +1,18 @@
version: "3.7"
services:
ggr:
image: vimagick/ggr
ports:
- "4444:4444"
volumes:
- ./data/grid-router:/etc/grid-router
environment:
- BROWSER_NAME=chrome
- BROWSER_VERSION=78.0
- BROWSER_REGION=1
- BROWSER_HOSTS=tasks.chrome
- BROWSER_PORT=5555
- BROWSER_COUNT=10
restart: unless-stopped