-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
103 lines (99 loc) · 2.19 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
version: '2.1'
networks:
net:
driver: bridge
services:
app:
build: ./app
networks:
net:
aliases:
- app
- app.net
ports: ["8080:8080"]
hub:
image: selenium/hub:3.141.59-mercury
networks:
net:
aliases:
- hub
- hub.net
ports: ['4444:4444']
healthcheck:
test: curl http://127.0.0.1:4444/ || exit 1
chrome:
image: selenium/node-chrome:3.141.59-mercury
volumes:
- /dev/shm:/dev/shm
depends_on:
hub:
condition: service_healthy
environment:
HUB_HOST: hub.net
HUB_PORT: 4444
#SCREEN_DEPTH: 24
#SCREEN_WIDTH: 1360
#SCREEN_HEIGHT: 768
#NODE_MAX_SESSION: 2
networks:
net:
aliases:
- chrome
- chrome.net
#ports: ['5555']
healthcheck:
test: curl http://127.0.0.1:5555/ || exit 1
firefox:
image: selenium/node-firefox:3.141.59-mercury
shm_size: 2g
depends_on:
hub:
condition: service_healthy
environment:
HUB_HOST: hub.net
HUB_PORT: 4444
#SCREEN_DEPTH: 24
#SCREEN_WIDTH: 1360
#SCREEN_HEIGHT: 768
#NODE_MAX_SESSION: 2
networks:
net:
aliases:
- firefox
- firefox.net
#ports: ['5555']
healthcheck:
test: curl http://127.0.0.1:5555/ || exit 1
## run app without intermediate docker image, only by using docker-compose
# app:
# image: openjdk:8u191-jdk-alpine3.9
# networks: [net]
# ports: ["8080:8080"]
# volumes: ["./app/build/libs:/tmp/app"]
# working_dir: /tmp/app
# command: ash -c 'java -jar *.war'
# healthcheck:
# disable: true
## standalone (for example: chrome)
# app:
# build: ./app
# networks:
# net:
# aliases:
# - app
# - app.net
# ports: ["8080:8080"]
# chrome:
# image: selenium/standalone-chrome:3.141.59-mercury
# volumes:
# - /dev/shm:/dev/shm
# environment:
# JAVA_OPTS: -Djava.security.egd=file:/dev/./urandom
# networks:
# net:
# aliases:
# - chrome
# - chrome.net
# ports: ['4444:4444']
# healthcheck:
# test: curl http://127.0.0.1:4444/ || exit 1