-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
103 lines (94 loc) · 2.4 KB
/
docker-compose.yml
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'
services:
fusion-server:
build: .
command: yarn start
environment:
- NODE_ENV=production
expose:
- '3000'
healthcheck:
test:
[
'CMD-SHELL',
'curl -H "Accept: text/html" -f http://localhost:3000 || exit 1',
]
interval: 5s
timeout: 10s
retries: 5
chrome-standalone:
image: selenium/standalone-chrome:latest@sha256:8f265a536bb69b89c029bb05024a11eaa71315b89ad51deda05a4e9d6b942cfd
restart: always
firefox-standalone:
image: selenium/standalone-firefox:latest@sha256:ee0abb000eb116e1ed3299ad887390539835887369cc2caf52889806315856cb
restart: always
sauce-tunnel:
image: henrrich/docker-sauce-connect:latest@sha256:9921657d1a3db8832f868ab25491363756abae52025a8d5af888aadc42ed31e9
restart: always
expose:
- '4445'
command:
[
'-u',
'${SAUCE_USERNAME}',
'-k',
'${SAUCE_ACCESS_KEY}',
'-i',
'${BUILDKITE_JOB_ID}',
]
environment:
- SAUCE_USERNAME
- SAUCE_ACCESS_KEY
- BUILDKITE_JOB_ID
healthcheck:
test:
[
'CMD-SHELL',
'grep -R "Sauce Connect is up" /tmp/sc-${BUILDKITE_JOB_ID}.log || exit 1',
]
interval: 5s
timeout: 5m
retries: 10
# docker-compose run does not wait on healthchecks, so proxy using this service.
sauce-tunnel-healthy:
build: .
depends_on:
sauce-tunnel:
condition: service_healthy
# wait for running server.
fusion-server-healthy:
build: .
depends_on:
fusion-server:
condition: service_healthy
# For running integration tests in CI
browser-tests:
build: .
depends_on:
- sauce-tunnel-healthy
- fusion-server-healthy
environment:
- SAUCE_USERNAME
- SAUCE_ACCESS_KEY
- BUILDKITE_JOB_ID
# For running linters and static analysis
browser-tests-linters:
build: .
environment:
- SAUCE_USERNAME
- SAUCE_ACCESS_KEY
- BUILDKITE_JOB_ID
# For running integration tests locally in chrome
browser-test-chrome:
build: .
depends_on:
- chrome-standalone
- fusion-server-healthy
command: ./test-standalone.sh
# For running integration tests locally in firefox
browser-test-firefox:
build: .
depends_on:
- firefox-standalone
- fusion-server-healthy
command: ./test-standalone.sh